* Translated by TestamenT
* testament@users.sourceforge.net
* https://sourceforge.net/projects/reactospl
- * Updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (Apr, 2011)
+ * Updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (May, 2014)
* UTF-8 conversion by Caemyr (May, 2011)
*/
IDS_ABBR_CHANGE "C"
IDS_ABBR_NONE "N"
IDS_ALLOW ""
- IDS_DENY "(DENY)"
- IDS_SPECIAL_ACCESS "(special access:)"
+ IDS_DENY "(ODMÓW)"
+ IDS_SPECIAL_ACCESS "(dostęp specjalny:)"
IDS_GENERIC_READ "GENERIC_READ"
IDS_GENERIC_WRITE "GENERIC_WRITE"
IDS_GENERIC_EXECUTE "GENERIC_EXECUTE"
if (IsWindow(calc.hStatWnd))
break;
calc.hStatWnd = CreateDialog(calc.hInstance,
- MAKEINTRESOURCE(IDD_DIALOG_STAT), hWnd, (DLGPROC)DlgStatProc);
+ MAKEINTRESOURCE(IDD_DIALOG_STAT), hWnd, DlgStatProc);
if (calc.hStatWnd != NULL) {
enable_allowed_controls(hWnd, calc.base);
SendMessage(calc.hStatWnd, WM_SETFOCUS, 0, 0);
dwLayout = IDD_DIALOG_STANDARD;
/* This call will always fail if UNICODE for Win9x */
- if (NULL == CreateDialog(hInstance, MAKEINTRESOURCE(dwLayout), NULL, (DLGPROC)DlgMainProc))
+ if (NULL == CreateDialog(hInstance, MAKEINTRESOURCE(dwLayout), NULL, DlgMainProc))
break;
while (GetMessage(&msg, NULL, 0, 0)) {
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
add_executable(reg reg.c reg.rc)
set_module_type(reg win32cui UNICODE)
-add_importlibs(reg advapi32 user32 msvcrt kernel32)
+add_importlibs(reg advapi32 user32 shlwapi msvcrt kernel32)
add_cd_file(TARGET reg DESTINATION reactos/system32 FOR all)
#include <winuser.h>
#include <winreg.h>
#include <wincon.h>
+#include <shlwapi.h>
#include <wine/unicode.h>
#include "reg.h"
/* Delete subtree only if no /v* option is given */
if (!value_name && !value_empty && !value_all)
{
- if (RegDeleteTreeW(root,p)!=ERROR_SUCCESS)
+ if (SHDeleteKeyW(root, p) != ERROR_SUCCESS)
{
reg_message(STRING_CANNOT_FIND);
return 1;
if (bShowWarning)
{
- DialogBox (hInstance, MAKEINTRESOURCE(IDD_WARNINGDIALOG), hMainWnd, (DLGPROC)WarningProc);
+ DialogBox (hInstance, MAKEINTRESOURCE(IDD_WARNINGDIALOG), hMainWnd, WarningProc);
}
return TRUE;
switch (wmId)
{
case IDM_OPTIONS:
- DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOGOPTIONS), hWnd, (DLGPROC)OptionsProc);
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOGOPTIONS), hWnd, OptionsProc);
break;
case IDM_ABOUT:
- DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)AboutProc);
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, AboutProc);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
* http://www.reactos.org
* IRC: irc.freenode.net #reactos-pl
* UTF-8 conversion by Caemyr (May, 2011)
+ * Updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (May, 2014)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
MENUITEM SEPARATOR
MENUITEM "&Wyjdź", IDM_EXIT
END
- POPUP "&Device"
+ POPUP "&Urządzenie"
BEGIN
- MENUITEM "&Properties", IDM_DEVPROPS
+ MENUITEM "&Właściwości", IDM_DEVPROPS
MENUITEM SEPARATOR
- MENUITEM "&Volume Control", IDM_VOLUMECTL
+ MENUITEM "&Regulacja głośności", IDM_VOLUMECTL
END
POPUP "&Pomoc"
BEGIN
IDS_TOOLTIP_SEEKBACK "Przewiń do tyłu"
IDS_TOOLTIP_SEEKFORW "Przewiń do przodu"
IDS_TOOLTIP_FORWARD "Przeskocz do przodu"
- IDS_APPTITLE "ReactOS Multimedia Player"
+ IDS_APPTITLE "Odtwarzacz multimedialny ReactOS"
IDS_PLAY "Odtwórz"
- IDS_DEFAULTMCIERRMSG "No description is available for this error"
- IDS_UNKNOWNFILEEXT "Cannot determine the device type from the given filename extension."
+ IDS_DEFAULTMCIERRMSG "Brak dostępnego opisu dla tego błędu"
+ IDS_UNKNOWNFILEEXT "Nie można określić typu urządzenia z podanego rozszerzenia pliku."
END
add_executable(eventvwr eventvwr.c eventvwr.rc)
set_module_type(eventvwr win32gui UNICODE)
-add_importlibs(eventvwr user32 comctl32 advapi32 msvcrt kernel32)
+add_importlibs(eventvwr user32 comctl32 comdlg32 advapi32 msvcrt kernel32)
if(MSVC)
add_importlibs(eventvwr ntdll)
endif()
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
+#include <wingdi.h>
#include <winnls.h>
#include <winreg.h>
#include <commctrl.h>
+#include <commdlg.h>
#include "resource.h"
static const LPWSTR EVENT_SOURCE_APPLICATION = L"Application";
static const LPWSTR EVENT_SOURCE_SECURITY = L"Security";
static const LPWSTR EVENT_SOURCE_SYSTEM = L"System";
-static const WCHAR szWindowClass[] = L"EVENTVWR"; /* the main window class name*/
+static const WCHAR szWindowClass[] = L"EVENTVWR"; /* the main window class name*/
//MessageFile message buffer size
#define EVENT_MESSAGE_EVENTTEXT_BUFFER 1024*10
HINSTANCE hInst; /* current instance */
WCHAR szTitle[MAX_LOADSTRING]; /* The title bar text */
WCHAR szTitleTemplate[MAX_LOADSTRING]; /* The logged-on title bar text */
+WCHAR szSaveFilter[MAX_LOADSTRING]; /* Filter Mask for the save Dialog */
HWND hwndMainWindow; /* Main window */
HWND hwndListView; /* ListView control */
HWND hwndStatus; /* Status bar */
+HMENU hMainMenu; /* The application's main menu */
WCHAR szStatusBarTemplate[MAX_LOADSTRING]; /* The status bar text */
PEVENTLOGRECORD *g_RecordPtrs = NULL;
DWORD g_TotalRecords = 0;
+OPENFILENAMEW sfn;
LPWSTR lpSourceLogName = NULL;
LPWSTR lpComputerName = NULL;
g_RecordPtrs = NULL;
}
+VOID
+ShowLastWin32Error(VOID)
+{
+ DWORD dwError;
+ LPWSTR lpMessageBuffer;
+
+ dwError = GetLastError();
+ FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ dwError,
+ 0,
+ (LPWSTR)&lpMessageBuffer,
+ 0,
+ NULL);
+
+ MessageBoxW(hwndMainWindow, lpMessageBuffer, szTitle, MB_OK | MB_ICONERROR);
+ LocalFree(lpMessageBuffer);
+}
+
VOID
EventTimeToSystemTime(DWORD EventTime,
SYSTEMTIME *pSystemTime)
}
else
{
- MessageBoxW(NULL,
- L"Registry access failed!",
- L"Event Log",
- MB_OK | MB_ICONINFORMATION);
+ ShowLastWin32Error();
}
if (hSourceKey != NULL)
dwFlags = EVENTLOG_FORWARDS_READ | EVENTLOG_SEQUENTIAL_READ;
- lpSourceLogName = lpLogName;
- lpComputerName = lpMachineName;
-
/* Open the event log. */
hEventLog = OpenEventLogW(lpMachineName,
lpLogName);
if (hEventLog == NULL)
{
- MessageBoxW(NULL,
- L"Could not open the event log.",
- L"Event Log",
- MB_OK | MB_ICONINFORMATION);
+ ShowLastWin32Error();
return FALSE;
}
+ lpSourceLogName = lpLogName;
+ lpComputerName = lpMachineName;
+
/* Disable listview redraw */
SendMessage(hwndListView, WM_SETREDRAW, FALSE, 0);
GetNumberOfEventLogRecords (hEventLog , &dwTotalRecords);
g_TotalRecords = dwTotalRecords;
+ if (dwTotalRecords > 0)
+ {
+ EnableMenuItem(hMainMenu, ID_CLEAR_EVENTS, MF_BYCOMMAND | MF_ENABLED);
+ EnableMenuItem(hMainMenu, ID_SAVE_PROTOCOL, MF_BYCOMMAND | MF_ENABLED);
+ }
+ else
+ {
+ EnableMenuItem(hMainMenu, ID_CLEAR_EVENTS, MF_BYCOMMAND | MF_GRAYED);
+ EnableMenuItem(hMainMenu, ID_SAVE_PROTOCOL, MF_BYCOMMAND | MF_GRAYED);
+ }
+
g_RecordPtrs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwTotalRecords * sizeof(PVOID));
/* If we have at least 1000 records show the waiting dialog */
}
+VOID
+SaveProtocol(VOID)
+{
+ HANDLE hEventLog;
+ WCHAR szFileName[MAX_PATH];
+
+ ZeroMemory(szFileName, sizeof(szFileName));
+
+ sfn.lpstrFile = szFileName;
+ sfn.nMaxFile = MAX_PATH;
+
+ if (!GetSaveFileNameW(&sfn))
+ {
+ return;
+ }
+
+ hEventLog = OpenEventLogW(lpComputerName, lpSourceLogName);
+ if (!hEventLog)
+ {
+ ShowLastWin32Error();
+ return;
+ }
+
+ if (!BackupEventLogW(hEventLog, szFileName))
+ {
+ ShowLastWin32Error();
+ }
+
+ CloseEventLog(hEventLog);
+}
+
+
+BOOL
+ClearEvents(VOID)
+{
+ HANDLE hEventLog;
+ WCHAR szFileName[MAX_PATH];
+ WCHAR szMessage[MAX_LOADSTRING];
+
+ ZeroMemory(szFileName, sizeof(szFileName));
+ ZeroMemory(szMessage, sizeof(szMessage));
+
+ LoadStringW(hInst, IDS_CLEAREVENTS_MSG, szMessage, MAX_LOADSTRING);
+
+ sfn.lpstrFile = szFileName;
+ sfn.nMaxFile = MAX_PATH;
+
+ switch (MessageBoxW(hwndMainWindow, szMessage, szTitle, MB_YESNOCANCEL | MB_ICONINFORMATION))
+ {
+ case IDCANCEL:
+ {
+ return FALSE;
+ break;
+ }
+
+ case IDNO:
+ {
+ sfn.lpstrFile = NULL;
+ break;
+ }
+
+ case IDYES:
+ {
+ if (!GetSaveFileNameW(&sfn))
+ {
+ return FALSE;
+ }
+ break;
+ }
+ }
+
+ hEventLog = OpenEventLogW(lpComputerName, lpSourceLogName);
+ if (!hEventLog)
+ {
+ ShowLastWin32Error();
+ return FALSE;
+ }
+
+ if (!ClearEventLogW(hEventLog, sfn.lpstrFile))
+ {
+ ShowLastWin32Error();
+ CloseEventLog(hEventLog);
+ return FALSE;
+ }
+
+ CloseEventLog(hEventLog);
+
+ return TRUE;
+}
+
+
VOID
Refresh(VOID)
{
lvc.pszText = szTemp;
(void)ListView_InsertColumn(hwndListView, 8, &lvc);
+ // Initialize the save Dialog
+ ZeroMemory(&sfn, sizeof(sfn));
+ ZeroMemory(szSaveFilter, sizeof(szSaveFilter));
+
+ LoadStringW(hInst, IDS_SAVE_FILTER, szSaveFilter, MAX_LOADSTRING);
+
+ sfn.lStructSize = sizeof(sfn);
+ sfn.hwndOwner = hwndMainWindow;
+ sfn.hInstance = hInstance;
+ sfn.lpstrFilter = szSaveFilter;
+ sfn.lpstrInitialDir = NULL;
+ sfn.Flags = OFN_HIDEREADONLY | OFN_SHAREAWARE;
+ sfn.lpstrDefExt = NULL;
+
ShowWindow(hwndMainWindow, nCmdShow);
UpdateWindow(hwndMainWindow);
switch (message)
{
case WM_CREATE:
+ hMainMenu = GetMenu(hWnd);
CheckMenuRadioItem(GetMenu(hWnd),
ID_LOG_APPLICATION,
ID_LOG_SYSTEM,
}
break;
+ case ID_SAVE_PROTOCOL:
+ SaveProtocol();
+ break;
+
+ case ID_CLEAR_EVENTS:
+ if (ClearEvents())
+ {
+ Refresh();
+ }
+ break;
+
case IDM_REFRESH:
Refresh();
break;
break;
case IDM_HELP:
- MessageBoxW(NULL,
+ MessageBoxW(hwndMainWindow,
L"Help not implemented yet!",
L"Event Log",
MB_OK | MB_ICONINFORMATION);
return (INT_PTR)TRUE;
case IDHELP:
- MessageBoxW(NULL,
+ MessageBoxW(hDlg,
L"Help not implemented yet!",
L"Event Log",
MB_OK | MB_ICONINFORMATION);
MENUITEM "&Сигурност", ID_LOG_SECURITY
MENUITEM "&Уредба", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "Из&ход", IDM_EXIT
END
POPUP "Из&глед"
IDS_EVENTLOG_AUDIT_FAILURE "Audit Failure"
IDS_EVENTLOG_SUCCESS "Success"
IDS_EVENTLOG_UNKNOWN_TYPE "Unknown Event"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Zabezpečení", ID_LOG_SECURITY
MENUITEM "&Systém", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Uložit &Protokol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "&Odstranit události", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "&Konec", IDM_EXIT
END
POPUP "&Zobrazit"
IDS_EVENTLOG_AUDIT_FAILURE "Audit selhal"
IDS_EVENTLOG_SUCCESS "Úspěch"
IDS_EVENTLOG_UNKNOWN_TYPE "Neznámá událost"
+ IDS_CLEAREVENTS_MSG "Chcete tento protokol před odstraněním uložit?"
+ IDS_SAVE_FILTER "Protokol událostí (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Sicherheit", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Protokoll s&peichern...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "Alle E&reignisse löschen", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "B&eenden", IDM_EXIT
END
POPUP "&Ansicht"
IDS_EVENTLOG_AUDIT_FAILURE "Audit Fehlgeschlagen"
IDS_EVENTLOG_SUCCESS "Erfolgreich"
IDS_EVENTLOG_UNKNOWN_TYPE "Unbekanntes Ereignis"
+ IDS_CLEAREVENTS_MSG "Möchten Sie dieses Protokoll vor dem Löschen speichern?"
+ IDS_SAVE_FILTER "Ereignisprotokoll (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Ασφάλεια", ID_LOG_SECURITY
MENUITEM "&Σύστημα", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "Έ&ξοδος", IDM_EXIT
END
POPUP "&Εμφάνιση"
IDS_EVENTLOG_AUDIT_FAILURE "Audit Failure"
IDS_EVENTLOG_SUCCESS "Επιτυχία"
IDS_EVENTLOG_UNKNOWN_TYPE "Άγνωστο συμβάν"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Security", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
END
POPUP "&View"
IDS_EVENTLOG_AUDIT_FAILURE "Audit Failure"
IDS_EVENTLOG_SUCCESS "Success"
IDS_EVENTLOG_UNKNOWN_TYPE "Unknown Event"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Seguridad", ID_LOG_SECURITY
MENUITEM "&Sistema", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "S&alir", IDM_EXIT
END
POPUP "&Ver"
IDS_EVENTLOG_AUDIT_FAILURE "Auditoria Fallida"
IDS_EVENTLOG_SUCCESS "Acierto"
IDS_EVENTLOG_UNKNOWN_TYPE "Evento Desconocido"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Sécurité", ID_LOG_SECURITY
MENUITEM "&Système", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "Quitter", IDM_EXIT
END
POPUP "Affichage"
IDS_EVENTLOG_AUDIT_FAILURE "Échec de l'audit"
IDS_EVENTLOG_SUCCESS "Succès"
IDS_EVENTLOG_UNKNOWN_TYPE "Événement Inconnu"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "אבטחה", ID_LOG_SECURITY
MENUITEM "מערכת", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "יציאה", IDM_EXIT
END
POPUP "תצוגה"
IDS_EVENTLOG_AUDIT_FAILURE "Audit Failure"
IDS_EVENTLOG_SUCCESS "הצלחה"
IDS_EVENTLOG_UNKNOWN_TYPE "אירוע לא ידוע"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Sicurezza", ID_LOG_SECURITY
MENUITEM "&Sistema", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "E&sci", IDM_EXIT
END
POPUP "&Vista"
IDS_EVENTLOG_AUDIT_FAILURE "Audit fallita"
IDS_EVENTLOG_SUCCESS "Successo"
IDS_EVENTLOG_UNKNOWN_TYPE "Evento sconosciuto"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "セキュリティ(&S)", ID_LOG_SECURITY
MENUITEM "システム(&S)", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "終了(&X)", IDM_EXIT
END
POPUP "表示(&V)"
IDS_EVENTLOG_AUDIT_FAILURE "失敗の監査"
IDS_EVENTLOG_SUCCESS "成功"
IDS_EVENTLOG_UNKNOWN_TYPE "不明なイベント"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "보안(&S)", ID_LOG_SECURITY
MENUITEM "시스템(&S)", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "종료(&X)", IDM_EXIT
END
POPUP "보기(&V)"
IDS_EVENTLOG_AUDIT_FAILURE "감사 실패"
IDS_EVENTLOG_SUCCESS "성공"
IDS_EVENTLOG_UNKNOWN_TYPE "알려지지 않은 이벤트"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Sikkerhet", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "A&vslutt", IDM_EXIT
END
POPUP "&Vis"
IDS_EVENTLOG_AUDIT_FAILURE "Revisjon misslykkes"
IDS_EVENTLOG_SUCCESS "Suksess"
IDS_EVENTLOG_UNKNOWN_TYPE "Ukjent hendelse"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
-/* Polish translation by Caemyr - Olaf Siejka */
+/* Polish translation by Caemyr - Olaf Siejka
+ * PL update by wojo664 (June 2014)
+ */
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
MENUITEM "&Zabezpieczenia", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Zapisz &protokół...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "W&yczyść wszystkie zdarzenia", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "&Wyjście", IDM_EXIT
END
POPUP "&Podgląd"
STRINGTABLE
BEGIN
IDS_APP_TITLE "Podgląd zdarzeń"
- IDS_APP_TITLE_EX "%s - %s Log on \\\\"
- IDS_STATUS_MSG "%s has %lu event(s)"
+ IDS_APP_TITLE_EX "%s - %s Log na \\\\"
+ IDS_STATUS_MSG "%s posiada %lu zdarzeń"
IDS_EVENTSTRINGIDNOTFOUND "Opis zdarzenia dla danego numeru ID: ( %lu ) nie został odnaleziony w źródle: ( %s ). Ten komputer może nie miec wystarczających informacji w rejestrze, albo bibliotek DLL, aby wyświetlić wiadomości z komputera zdalnego."
IDS_EVENTLOG_ERROR_TYPE "Błąd"
IDS_EVENTLOG_WARNING_TYPE "Ostrzeżenie"
IDS_EVENTLOG_AUDIT_FAILURE "Nieudany Audyt"
IDS_EVENTLOG_SUCCESS "Sukces"
IDS_EVENTLOG_UNKNOWN_TYPE "Zdarzenie nieznane"
+ IDS_CLEAREVENTS_MSG "Czy chcesz zapisać dziennik zdarzeń przed czyszczeniem?"
+ IDS_SAVE_FILTER "Dziennik zdarzeń (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "S&egurança", ID_LOG_SECURITY
MENUITEM "&Sistema", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "&Sair", IDM_EXIT
END
POPUP "&Visualizar"
IDS_EVENTLOG_AUDIT_FAILURE "Falha na Auditoria"
IDS_EVENTLOG_SUCCESS "Sucesso"
IDS_EVENTLOG_UNKNOWN_TYPE "Evento Desconhecido"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "Se&curitate", ID_LOG_SECURITY
MENUITEM "&Sistem", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "I&eșire", IDM_EXIT
END
POPUP "&Afișare"
IDS_EVENTLOG_AUDIT_FAILURE "Eșec audit"
IDS_EVENTLOG_SUCCESS "Succes"
IDS_EVENTLOG_UNKNOWN_TYPE "Eveniment necunoscut"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Безопасности", ID_LOG_SECURITY
MENUITEM "&Системы", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "В&ыход", IDM_EXIT
END
POPUP "&Вид"
IDS_EVENTLOG_AUDIT_FAILURE "Аудит отказов"
IDS_EVENTLOG_SUCCESS "Успех"
IDS_EVENTLOG_UNKNOWN_TYPE "Неизвестное событие"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Security", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "&Skončiť", IDM_EXIT
END
POPUP "&Zobraziť"
IDS_EVENTLOG_AUDIT_FAILURE "Kontrola zlyhala"
IDS_EVENTLOG_SUCCESS "Úspech" //Success
IDS_EVENTLOG_UNKNOWN_TYPE "Neznáma udalosť"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Siguri", ID_LOG_SECURITY
MENUITEM "&Sistemi", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "Dil", IDM_EXIT
END
POPUP "&Vëzhgo"
IDS_EVENTLOG_AUDIT_FAILURE "Audit dështoj"
IDS_EVENTLOG_SUCCESS "Sukses"
IDS_EVENTLOG_UNKNOWN_TYPE "Ngjraje e panjohur"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Säkerhet", ID_LOG_SECURITY
MENUITEM "&System", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "A&vsluta", IDM_EXIT
END
POPUP "&Visa"
IDS_EVENTLOG_AUDIT_FAILURE "Revision misslyckades"
IDS_EVENTLOG_SUCCESS "Uppgift lyckades"
IDS_EVENTLOG_UNKNOWN_TYPE "Okänd händelse"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Güvenlik", ID_LOG_SECURITY
MENUITEM "&Dizge", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "&Çıkış", IDM_EXIT
END
POPUP "&Görünüm"
IDS_EVENTLOG_AUDIT_FAILURE "Başarısızlık Denetimi"
IDS_EVENTLOG_SUCCESS "Başarı"
IDS_EVENTLOG_UNKNOWN_TYPE "Bilinmeyen Olay"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "&Захист", ID_LOG_SECURITY
MENUITEM "&Система", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "В&ихід", IDM_EXIT
END
POPUP "&Вигляд"
IDS_EVENTLOG_AUDIT_FAILURE "Аудит відмов"
IDS_EVENTLOG_SUCCESS "Успіх"
IDS_EVENTLOG_UNKNOWN_TYPE "Невідома подія"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
MENUITEM "安全日志(&S)", ID_LOG_SECURITY
MENUITEM "系统日志(&Y)", ID_LOG_SYSTEM
MENUITEM SEPARATOR
+ MENUITEM "Save &Protocol...", ID_SAVE_PROTOCOL, GRAYED
+ MENUITEM SEPARATOR
+ MENUITEM "C&lear all Events", ID_CLEAR_EVENTS, GRAYED
+ MENUITEM SEPARATOR
MENUITEM "退出(&X)", IDM_EXIT
END
POPUP "查看(&V)"
IDS_EVENTLOG_AUDIT_FAILURE "审核失败"
IDS_EVENTLOG_SUCCESS "成功"
IDS_EVENTLOG_UNKNOWN_TYPE "未知事件"
+ IDS_CLEAREVENTS_MSG "Do you want to save this event log before clearing it?"
+ IDS_SAVE_FILTER "Event Log (*.evt)\0*.evt\0"
END
STRINGTABLE
#define ID_VIEW_REFRESH 32780
#define ID_REFRESH 32781
#define IDM_REFRESH 32782
+#define ID_CLEAR_EVENTS 32783
+#define ID_SAVE_PROTOCOL 32784
/* String IDs */
#define IDS_APP_TITLE 103
#define IDS_EVENTLOG_AUDIT_FAILURE 255
#define IDS_EVENTLOG_SUCCESS 256
#define IDS_EVENTLOG_UNKNOWN_TYPE 257
+#define IDS_CLEAREVENTS_MSG 258
+#define IDS_SAVE_FILTER 259
#define IDS_COLUMNTYPE 300
#define IDS_COLUMNDATE 301
/* FUNCTIONS ********************************************************/
-LRESULT CALLBACK
+INT_PTR CALLBACK
MRDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
int
mirrorRotateDlg()
{
- return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_MIRRORROTATE), hMainWnd, (DLGPROC) MRDlgWinProc);
+ return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_MIRRORROTATE), hMainWnd, MRDlgWinProc);
}
-LRESULT CALLBACK
+INT_PTR CALLBACK
ATTDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
int
attributesDlg()
{
- return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_ATTRIBUTES), hMainWnd, (DLGPROC) ATTDlgWinProc);
+ return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_ATTRIBUTES), hMainWnd, ATTDlgWinProc);
}
-LRESULT CALLBACK
+INT_PTR CALLBACK
CHSIZEDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
int
changeSizeDlg()
{
- return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_STRETCHSKEW), hMainWnd, (DLGPROC) CHSIZEDlgWinProc);
+ return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_STRETCHSKEW), hMainWnd, CHSIZEDlgWinProc);
}
help.c
net.h)
-add_executable(net ${SOURCE})
+add_executable(net ${SOURCE} net.rc)
set_module_type(net win32cui UNICODE)
-add_importlibs(net advapi32 netapi32 msvcrt kernel32 ntdll)
+add_importlibs(net advapi32 netapi32 msvcrt kernel32 user32 ntdll)
add_pch(net net.h SOURCE)
add_cd_file(TARGET net DESTINATION reactos/system32 FOR all)
PUSER_MODALS_INFO_1 Info1 = NULL;
PUSER_MODALS_INFO_3 Info3 = NULL;
NT_PRODUCT_TYPE ProductType;
- LPWSTR p, perr;
+ LPWSTR p;
+ LPWSTR endptr;
DWORD ParamErr;
ULONG value;
INT i;
BOOL Modified = FALSE;
// BOOL Domain = FALSE;
NET_API_STATUS Status;
+ INT result = 0;
- for (i = 3; i < argc; i++)
+ for (i = 2; i < argc; i++)
{
- if (wcsicmp(argv[i], L"help") == 0)
+ if (_wcsicmp(argv[i], L"help") == 0)
{
/* Print short syntax help */
- puts("NET ACCOUNTS [/FORCELOGOFF:{Minutes|NO}] [/MINPWLEN:Length]");
- puts(" [/MAXPWAGE:{Days|UNLIMITED}] [/MINPWAGE:Days]");
- puts(" [/UNIQUEPW:Count] [/DOMAIN]");
+ PrintResourceString(IDS_ACCOUNTS_SYNTAX);
return 0;
}
- if (wcsicmp(argv[i], L"/help") == 0)
+ if (_wcsicmp(argv[i], L"/help") == 0)
{
- /* FIXME: Print long help text*/
+ /* Print full help text*/
+ PrintResourceString(IDS_ACCOUNTS_HELP);
return 0;
}
/*
- if (wcsicmp(argv[i], L"/domain") == 0)
+ if (_wcsicmp(argv[i], L"/domain") == 0)
{
Domain = TRUE;
}
if (Status != NERR_Success)
goto done;
- for (i = 3; i < argc; i++)
+ for (i = 2; i < argc; i++)
{
if (_wcsnicmp(argv[i], L"/forcelogoff:", 13) == 0)
{
}
else
{
- value = wcstoul(p, &perr, 10);
+ value = wcstoul(p, &endptr, 10);
+ if (*endptr != 0)
+ {
+ printf("You entered an invalid value for the /FORCELOGOFF option.\n");
+ result = 1;
+ goto done;
+ }
Info0->usrmod0_force_logoff = value * 60;
Modified = TRUE;
else if (_wcsnicmp(argv[i], L"/minpwlen:", 10) == 0)
{
p = &argv[i][10];
- value = wcstoul(p, &perr, 10);
+ value = wcstoul(p, &endptr, 10);
+ if (*endptr != 0)
+ {
+ printf("You entered an invalid value for the /MINPWLEN option.\n");
+ result = 1;
+ goto done;
+ }
+
Info0->usrmod0_min_passwd_len = value;
Modified = TRUE;
}
}
else
{
- value = wcstoul(p, &perr, 10);
+ value = wcstoul(p, &endptr, 10);
+ if (*endptr != 0)
+ {
+ printf("You entered an invalid value for the /MAXPWAGE option.\n");
+ result = 1;
+ goto done;
+ }
Info0->usrmod0_max_passwd_age = value * 86400;
Modified = TRUE;
else if (_wcsnicmp(argv[i], L"/minpwage:", 10) == 0)
{
p = &argv[i][10];
- value = wcstoul(p, &perr, 10);
+ value = wcstoul(p, &endptr, 10);
+ if (*endptr != 0)
+ {
+ printf("You entered an invalid value for the /MINPWAGE option.\n");
+ result = 1;
+ goto done;
+ }
Info0->usrmod0_min_passwd_age = value * 86400;
Modified = TRUE;
else if (_wcsnicmp(argv[i], L"/uniquepw:", 10) == 0)
{
p = &argv[i][10];
- value = wcstoul(p, &perr, 10);
+ value = wcstoul(p, &endptr, 10);
+ if (*endptr != 0)
+ {
+ printf("You entered an invalid value for the /UNIQUEPW option.\n");
+ result = 1;
+ goto done;
+ }
Info0->usrmod0_password_hist_len = value;
Modified = TRUE;
else
printf("%lu\n", Info0->usrmod0_password_hist_len);
- printf("Lockout threshold: %lu\n", Info3->usrmod3_lockout_threshold);
+ printf("Lockout threshold: ");
+ if (Info3->usrmod3_lockout_threshold == 0)
+ printf("Never\n");
+ else
+ printf("%lu\n", Info3->usrmod3_lockout_threshold);
+
printf("Lockout duration (in minutes): %lu\n", Info3->usrmod3_lockout_duration / 60);
printf("Lockout observation window (in minutes): %lu\n", Info3->usrmod3_lockout_observation_window / 60);
if (Info0 != NULL)
NetApiBufferFree(Info0);
- return 0;
+ return result;
}
/* EOF */
SC_HANDLE hService = NULL;
SERVICE_STATUS status;
INT nError = 0;
+ INT i;
if (argc != 3)
{
- puts("Usage: NET CONTINUE <Service Name>");
+ PrintResourceString(IDS_CONTINUE_SYNTAX);
return 1;
}
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_CONTINUE_HELP);
+ return 1;
+ }
+ }
+
hManager = OpenSCManager(NULL, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ENUMERATE_SERVICE);
if (hManager == NULL)
{
LPWSTR endptr;
LPWSTR lpBuffer;
LONG errNum;
+ INT i;
if (argc < 3)
{
- puts("Usage: NET HELPMSG <Error Code>");
+ PrintResourceString(IDS_HELPMSG_SYNTAX);
return 1;
}
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_HELPMSG_HELP);
+ return 1;
+ }
+ }
+
errNum = wcstol(argv[2], &endptr, 10);
if (*endptr != 0)
{
- puts("Usage: NET HELPMSG <Error Code>");
+ PrintResourceString(IDS_HELPMSG_SYNTAX);
return 1;
}
SC_HANDLE hService = NULL;
SERVICE_STATUS status;
INT nError = 0;
+ INT i;
if (argc != 3)
{
- puts("Usage: NET PAUSE <Service Name>");
+ PrintResourceString(IDS_PAUSE_SYNTAX);
return 1;
}
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_PAUSE_HELP);
+ return 1;
+ }
+ }
+
hManager = OpenSCManager(NULL, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ENUMERATE_SERVICE);
if (hManager == NULL)
{
INT
cmdStart(INT argc, WCHAR **argv)
{
- INT nError = 0;
+ INT i;
if (argc == 2)
{
- nError = EnumerateRunningServices();
+ return EnumerateRunningServices();
}
- else
+
+ for (i = 2; i < argc; i++)
{
- nError = StartOneService(argc, argv);
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_START_HELP);
+ return 1;
+ }
}
- return nError;
+ return StartOneService(argc, argv);
}
SERVICE_STATUS ServiceStatus;
DWORD dwError = ERROR_SUCCESS;
INT nError = 0;
+ INT i;
if (argc != 3)
{
- /* FIXME: Print usage message! */
- printf("Usage: NET STOP <Service name>\n");
+ PrintResourceString(IDS_STOP_SYNTAX);
return 1;
}
+ for (i = 2; i < argc; i++)
+ {
+ if (_wcsicmp(argv[i], L"/help") == 0)
+ {
+ PrintResourceString(IDS_STOP_HELP);
+ return 1;
+ }
+ }
+
hManager = OpenSCManagerW(NULL,
SERVICES_ACTIVE_DATABASE,
SC_MANAGER_ENUMERATE_SERVICE);
{
if (argc != 3)
{
- return 0;
+ PrintResourceString(IDS_HELP_SYNTAX);
+ return 0;
+ }
+
+ if (_wcsicmp(argv[2],L"ACCOUNTS") == 0)
+ {
+ PrintResourceString(IDS_ACCOUNTS_HELP);
+ return 0;
+ }
+
+ if (_wcsicmp(argv[2],L"COMPUTER") == 0)
+ {
+ PrintResourceString(IDS_COMPUTER_HELP);
+ return 0;
}
- if (_wcsicmp(argv[2],L"ACCOUNTS")==0)
+ if (_wcsicmp(argv[2],L"CONFIG") == 0)
{
- puts("ACCOUNTS");
- puts("help text");
+ PrintResourceString(IDS_CONFIG_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"COMPUTER")==0)
+ if (_wcsicmp(argv[2],L"CONTINUE") == 0)
{
- puts("COMPUTER");
- puts("help text");
+ PrintResourceString(IDS_CONTINUE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"CONFIG")==0)
+ if (_wcsicmp(argv[2],L"FILE") == 0)
{
- puts("CONFIG");
- puts("help text");
+ PrintResourceString(IDS_FILE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"CONTINUE")==0)
+ if (_wcsicmp(argv[2],L"GROUP") == 0)
{
- puts("CONTINUE");
- puts("help text");
+ PrintResourceString(IDS_GROUP_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"FILE")==0)
+ if (_wcsicmp(argv[2],L"HELPMSG") == 0)
{
- puts("FILE");
- puts("help text");
+ PrintResourceString(IDS_HELPMSG_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"GROUP")==0)
+ if (_wcsicmp(argv[2],L"LOCALGROUP") == 0)
{
- puts("GROUP");
- puts("help text");
+ PrintResourceString(IDS_LOCALGROUP_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"HELP")==0)
+ if (_wcsicmp(argv[2],L"NAME") == 0)
{
- puts("HELP");
- puts("help text");
+ PrintResourceString(IDS_NAME_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"HELPMSG")==0)
+ if (_wcsicmp(argv[2],L"PAUSE") == 0)
{
- puts("HELPMSG");
- puts("help text");
+ PrintResourceString(IDS_PAUSE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"LOCALGROUP")==0)
+ if (_wcsicmp(argv[2],L"PRINT") == 0)
{
- puts("LOCALGROUP");
- puts("help text");
+ PrintResourceString(IDS_PRINT_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"NAME")==0)
+ if (_wcsicmp(argv[2],L"SEND") == 0)
{
- puts("NAME");
- puts("help text");
+ PrintResourceString(IDS_SEND_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"PRINT")==0)
+ if (_wcsicmp(argv[2],L"SESSION") == 0)
{
- puts("PRINT");
- puts("help text");
+ PrintResourceString(IDS_SESSION_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"SEND")==0)
+ if (_wcsicmp(argv[2],L"SHARE") == 0)
{
- puts("SEND");
- puts("help text");
+ PrintResourceString(IDS_SHARE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"SESSION")==0)
+ if (_wcsicmp(argv[2],L"START") == 0)
{
- puts("SESSION");
- puts("help text");
+ PrintResourceString(IDS_START_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"SHARE")==0)
+ if (_wcsicmp(argv[2],L"STATISTICS") == 0)
{
- puts("SHARE");
- puts("help text");
+ PrintResourceString(IDS_STATISTICS_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"START")==0)
+ if (_wcsicmp(argv[2],L"STOP") == 0)
{
- puts("START");
- puts("help text");
+ PrintResourceString(IDS_STOP_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"STATISTICS")==0)
+ if (_wcsicmp(argv[2],L"TIME") == 0)
{
- puts("STATISTICS");
- puts("help text");
+ PrintResourceString(IDS_TIME_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"STOP")==0)
+ if (_wcsicmp(argv[2],L"USE") == 0)
{
- puts("STOP");
- puts("help text");
+ PrintResourceString(IDS_USE_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"TIME")==0)
+ if (_wcsicmp(argv[2],L"USER") == 0)
{
- puts("TIME");
- puts("help text");
+ PrintResourceString(IDS_USER_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"USE")==0)
+ if (_wcsicmp(argv[2],L"VIEW") == 0)
{
- puts("USE");
- puts("help text");
+ PrintResourceString(IDS_VIEW_HELP);
return 0;
}
- if (_wcsicmp(argv[2],L"USER")==0)
+#if 0
+ if (_wcsicmp(argv[2],L"SERVICES") == 0)
{
- puts("USER");
- puts("help text");
return 0;
}
- if (_wcsicmp(argv[2],L"VIEW")==0)
+ if (_wcsicmp(argv[2],L"SYNTAX") == 0)
{
- puts("VIEW");
- puts("help text");
return 0;
}
+#endif
+
+ PrintResourceString(IDS_HELP_SYNTAX);
- help();
return 0;
}
-VOID help(VOID)
-{
- puts("NET ACCOUNTS");
- puts("NET COMPUTER");
- puts("NET CONFIG");
- puts("NET CONFIG SERVER");
- puts("NET CONFIG WORKSTATION");
- puts("NET CONTINUE");
- puts("NET FILE");
- puts("NET GROUP");
-
- puts("NET HELP");
- puts("NET HELPMSG");
- puts("NET LOCALGROUP");
- puts("NET NAME");
- puts("NET PAUSE");
- puts("NET PRINT");
- puts("NET SEND");
- puts("NET SESSION");
-
- puts("NET SHARE");
- puts("NET START");
- puts("NET STATISTICS");
- puts("NET STOP");
- puts("NET TIME");
- puts("NET USE");
- puts("NET USER");
- puts("NET VIEW");
-}
--- /dev/null
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE
+BEGIN
+ IDS_ACCOUNTS_SYNTAX "Usage:\nNET ACCOUNTS [/FORCELOGOFF:{Minutes|NO}] [/MINPWLEN:Length]\n\
+ [/MAXPWAGE:{Days|UNLIMITED}] [/MINPWAGE:Days]\n\
+ [/UNIQUEPW:Count] [/DOMAIN]\n"
+ IDS_ACCOUNTS_HELP "ACCOUNTS\n..."
+ IDS_COMPUTER_SYNTAX "Usage:\nNET COMPUTER ..."
+ IDS_COMPUTER_HELP "COMPUTER\n..."
+ IDS_CONFIG_SYNTAX "Usage:\nNET CONFIG ..."
+ IDS_CONFIG_HELP "CONFIG\n..."
+ IDS_CONTINUE_SYNTAX "Usage:\nNET CONTINUE <Service Name>"
+ IDS_CONTINUE_HELP "CONTINUE\n..."
+ IDS_FILE_SYNTAX "Usage:\nNET FILE ..."
+ IDS_FILE_HELP "FILE\n..."
+ IDS_GROUP_SYNTAX "Usage:\nNET GROUP ..."
+ IDS_GROUP_HELP "GROUP\n..."
+ IDS_HELPMSG_SYNTAX "Usage:\nNET HELPMSG <Error Code>"
+ IDS_HELPMSG_HELP "HELPMSG\n..."
+ IDS_LOCALGROUP_SYNTAX "Usage:\nNET LOCALGROUP ..."
+ IDS_LOCALGROUP_HELP "LOCALGROUP\n..."
+ IDS_NAME_SYNTAX "Usage:\nNET NAME ..."
+ IDS_NAME_HELP "NAME\n..."
+ IDS_PRINT_SYNTAX "Usage:\nNET PRINT ..."
+ IDS_PRINT_HELP "PRINT\n..."
+ IDS_PAUSE_SYNTAX "Usage:\nNET PAUSE <Service Name>"
+ IDS_PAUSE_HELP "PAUSE\n..."
+ IDS_SEND_SYNTAX "Usage:\nNET SEND ..."
+ IDS_SEND_HELP "SEND\n..."
+ IDS_SESSION_SYNTAX "Usage:\nNET SESSION ..."
+ IDS_SESSION_HELP "SESSION\n..."
+ IDS_SHARE_SYNTAX "Usage:\nNET SHARE ..."
+ IDS_SHARE_HELP "SHARE\n..."
+ IDS_START_SYNTAX "Usage:\nNET START ..."
+ IDS_START_HELP "START\n..."
+ IDS_STATISTICS_SYNTAX "Usage:\nNET STATISTICS ..."
+ IDS_STATISTICS_HELP "STATISTICS\n..."
+ IDS_STOP_SYNTAX "Usage:\nNET STOP <Service name>"
+ IDS_STOP_HELP "STOP\n..."
+ IDS_TIME_SYNTAX "Usage:\nNET TIME ..."
+ IDS_TIME_HELP "TIME\n..."
+ IDS_USE_SYNTAX "Usage:\nNET USE ..."
+ IDS_USE_HELP "USE\n..."
+ IDS_USER_SYNTAX "Usage:\nNET USER ..."
+ IDS_USER_HELP "USER\n..."
+ IDS_VIEW_SYNTAX "Usage:\nNET VIEW ..."
+ IDS_VIEW_HELP "VIEW\n..."
+ IDS_HELP_SYNTAX "Usage:\nNET HELP <Command>\n - or -\nNET <Command> /HELP\n\n\
+ The following commands are available:\n\n\
+ NET ACCOUNTS NET HELP NET SHARE\n\
+ NET COMPUTER NET HELPMSG NET START\n\
+ NET CONFIG NET LOCALGROUP NET STATISTICS\n\
+ NET CONFIG SERVER NET NAME NET STOP\n\
+ NET CONFIG WORKSTATION NET PAUSE NET TIME\n\
+ NET CONTINUE NET PRINT NET USE\n\
+ NET FILE NET SEND NET USER\n\
+ NET GROUP NET SESSION NET VIEW\n\n\
+ ..."
+ IDS_NET_SYNTAX "Usage:\nNET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |\n\
+ HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\
+ SHARE | START | STATISTICS | STOP | TIME | USE | NET USER | VIEW ]\n"
+END
#include "net.h"
+#define MAX_BUFFER_SIZE 4096
+
typedef struct _COMMAND
{
WCHAR *name;
{L"helpmsg", cmdHelpMsg},
{L"localgroup", unimplemented},
{L"name", unimplemented},
- {L"print", unimplemented},
{L"pause", cmdPause},
+ {L"print", unimplemented},
{L"send", unimplemented},
{L"session", unimplemented},
{L"share", unimplemented},
{NULL, NULL}
};
+
+VOID
+PrintResourceString(
+ INT resID,
+ ...)
+{
+ WCHAR szMsgBuf[MAX_BUFFER_SIZE];
+ va_list arg_ptr;
+
+ va_start(arg_ptr, resID);
+ LoadStringW(GetModuleHandle(NULL), resID, szMsgBuf, MAX_BUFFER_SIZE);
+ vwprintf(szMsgBuf, arg_ptr);
+ va_end(arg_ptr);
+}
+
+
int wmain(int argc, WCHAR **argv)
{
PCOMMAND cmdptr;
if (argc < 2)
{
- help();
+ PrintResourceString(IDS_NET_SYNTAX);
return 1;
}
}
}
- help();
+ PrintResourceString(IDS_NET_SYNTAX);
return 1;
}
#include <windef.h>
#include <winbase.h>
+#include <winuser.h>
#include <winsvc.h>
#include <stdio.h>
#include <stdlib.h>
#include <lm.h>
#include <ndk/rtlfuncs.h>
+#include "resource.h"
+
+VOID
+PrintResourceString(
+ INT resID,
+ ...);
+
VOID help(VOID);
INT unimplemented(INT argc, WCHAR **argv);
--- /dev/null
+#include <windef.h>
+
+#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Net Command"
+#define REACTOS_STR_INTERNAL_NAME "net"
+#define REACTOS_STR_ORIGINAL_FILENAME "net.exe"
+#include <reactos/version.rc>
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+#ifdef LANGUAGE_EN_US
+ #include "lang/en-US.rc"
+#endif
--- /dev/null
+#pragma once
+
+#define IDS_ACCOUNTS_SYNTAX 100
+#define IDS_ACCOUNTS_HELP 101
+#define IDS_COMPUTER_SYNTAX 102
+#define IDS_COMPUTER_HELP 103
+#define IDS_CONFIG_SYNTAX 104
+#define IDS_CONFIG_HELP 105
+#define IDS_CONTINUE_SYNTAX 106
+#define IDS_CONTINUE_HELP 107
+#define IDS_FILE_SYNTAX 108
+#define IDS_FILE_HELP 109
+#define IDS_GROUP_SYNTAX 110
+#define IDS_GROUP_HELP 111
+#define IDS_HELPMSG_SYNTAX 112
+#define IDS_HELPMSG_HELP 113
+#define IDS_LOCALGROUP_SYNTAX 114
+#define IDS_LOCALGROUP_HELP 115
+#define IDS_NAME_SYNTAX 116
+#define IDS_NAME_HELP 117
+#define IDS_PAUSE_SYNTAX 118
+#define IDS_PAUSE_HELP 119
+#define IDS_PRINT_SYNTAX 120
+#define IDS_PRINT_HELP 121
+#define IDS_SEND_SYNTAX 122
+#define IDS_SEND_HELP 123
+#define IDS_SESSION_SYNTAX 124
+#define IDS_SESSION_HELP 125
+#define IDS_SHARE_SYNTAX 126
+#define IDS_SHARE_HELP 127
+#define IDS_START_SYNTAX 128
+#define IDS_START_HELP 129
+#define IDS_STATISTICS_SYNTAX 130
+#define IDS_STATISTICS_HELP 131
+#define IDS_STOP_SYNTAX 132
+#define IDS_STOP_HELP 133
+#define IDS_TIME_SYNTAX 134
+#define IDS_TIME_HELP 135
+#define IDS_USE_SYNTAX 136
+#define IDS_USE_HELP 137
+#define IDS_USER_SYNTAX 138
+#define IDS_USER_HELP 139
+#define IDS_VIEW_SYNTAX 140
+#define IDS_VIEW_HELP 141
+#define IDS_HELP_SYNTAX 142
+#define IDS_NET_SYNTAX 143
IDS_AINFO_DESCRIPTION "\nDescription: "
IDS_AINFO_SIZE "\nSize: "
IDS_AINFO_URLSITE "\nHome Page: "
- IDS_AINFO_LICENCE "\nLicence: "
+ IDS_AINFO_LICENCE "\nLicense: "
END
STRINGTABLE
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = Abyss Web server X1\r
-Version = 2.9.0.1\r
+Version = 2.9.3.2\r
Licence = Freeware\r
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.\r
Size = 2.1 MB\r
-; UTF-8
+; UTF-8
; Polish translation by wojo664
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Bochs
-Version = 2.6.2
+Version = 2.6.5
Licence = LGPL v2
Description = Bochs is a highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms.
Size = 4.7 MB
Category = 15
URLSite = http://bochs.sourceforge.net/
-URLDownload = http://download.sourceforge.net/project/bochs/bochs/2.6.2/Bochs-2.6.2.exe
+URLDownload = http://download.sourceforge.net/project/bochs/bochs/2.6.5/Bochs-2.6.5.exe
CDPath = none
[Section.0407]
Size = 62,3 Mo
[Section.041f]
-Description = Bos Wars, gelecekçi ve gerçek zamanlı bir izlem oyunudur. Oyunu başlatmak için Microsoft Visual C++ 2008 Yürütücüsü'nü kurunuz.
+Description = Bos Wars, gelecekçi ve gerçek zamanlı bir izlem oyunudur. Oyunu başlatmak için Microsoft Visual C++ 2008 Yürütücü'yü kurunuz.
Size = 62,3 MB
Size = 29.2 MB
Category = 7
URLSite = http://www.codeblocks.org/
-URLDownload = http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12-setup.exe
+URLDownload = http://download.sourceforge.net/project/codeblocks/Binaries/13.12/Windows/codeblocks-13.12-setup.exe
CDPath = none
[Section.0407]
Size = 97.8 MB
Category = 7
URLSite = http://www.codeblocks.org/
-URLDownload = http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12mingw-setup.exe
+URLDownload = http://download.sourceforge.net/project/codeblocks/Binaries/13.12/Windows/codeblocks-13.12mingw-setup.exe
CDPath = none
[Section.0407]
Size = 100 MB
Category = 7
URLSite = http://www.codeblocks.org/
-URLDownload = http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12mingw-setup-TDM-GCC-481.exe
+URLDownload = http://download.sourceforge.net/project/codeblocks/Binaries/13.12/Windows/codeblocks-13.12mingw-setup-TDM-GCC-481.exe
CDPath = none
[Section.0407]
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Orwell Dev-C++ MinGW32
-Version = 5.6.2
+Version = 5.6.3
Licence = GPLv2
Description = A maintained version of Dev-C++. It contains MinGW32 compiler.
Size = 60.2 MB
Category = 7
URLSite = http://orwelldevcpp.blogspot.com/
-URLDownload = http://sourceforge.net/projects/orwelldevcpp/files/Setup%20Releases/Dev-Cpp%205.6.2%20MinGW%204.8.1%20Setup.exe
+URLDownload = http://download.sourceforge.net/project/orwelldevcpp/Setup%20Releases/Dev-Cpp%205.6.3%20MinGW%204.8.1%20Setup.exe
CDPath = none
[Section.0407]
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Orwell Dev-C++ TDM GCC x64
-Version = 5.6.2
+Version = 5.6.3
Licence = GPLv2
Description = A maintained version of Dev-C++. It contains 64 bit TDM-GCC compiler.
Size = 44.8 MB
Category = 7
URLSite = http://orwelldevcpp.blogspot.com/
-URLDownload = http://sourceforge.net/projects/orwelldevcpp/files/Setup%20Releases/Dev-Cpp%205.6.2%20TDM-GCC%20x64%204.8.1%20Setup.exe
+URLDownload = http://download.sourceforge.net/project/orwelldevcpp/Setup%20Releases/Dev-Cpp%205.6.3%20TDM-GCC%20x64%204.8.1%20Setup.exe
CDPath = none
[Section.0407]
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Double Commander
-Version = 0.5.9 Beta
+Version = 0.5.10 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.6 MB
Category = 12
URLSite = http://doublecmd.sourceforge.net/
-URLDownload = http://download.sourceforge.net/project/doublecmd/DC%20for%20Windows%2032%20bit/Double%20Commander%200.5.9%20beta/doublecmd-0.5.9.i386-win32.exe
+URLDownload = http://download.sourceforge.net/project/doublecmd/DC%20for%20Windows%2032%20bit/Double%20Commander%200.5.10%20beta/doublecmd-0.5.10.i386-win32.exe
CDPath = none
[Section.0407]
Size = 1.36 MB
Category = 5
URLSite = http://dplus-browser.sourceforge.net/
-URLDownload = http://heanet.dl.sourceforge.net/project/dplus-browser/Releases/dplus-0.5b/dplus-0.5b-setup.exe
+URLDownload = http://download.sourceforge.net/project/dplus-browser/Releases/dplus-0.5b/dplus-0.5b-setup.exe
CDPath = none
[Section.0410]
[Section.041f]
Licence = Ücretsiz
-Description = Ücretsiz bir doğrudan CD/DVD kaydedici yazılımı. Kurulduktan sonra CD/DVD RW'lerinizi USB Flash veyâ çıkarılabilir sâbit disk sürücüleri olarak kullanabilirsiniz. Bununla birlikte UDF kütük dizgesiyle kaydedilmiş CD/DVD RW'lere yazabilirsiniz. Ayrıca Microsoft DVD−ROM'ları, Ahead InCD ile kaydedilmiş RW diskleri gibi başka yazılımlarla oluşturulmuş UDF diskleri okuyabilirsiniz. Kurmak için bir ZIP çıkarma izlencesi gerekir.
+Description = Ücretsiz bir doğrudan CD/DVD kaydedici yazılımı. Kurulduktan sonra CD/DVD RW'lerinizi, USB Flash veyâ çıkarılabilir sâbit disk sürücüleri olarak kullanabilirsiniz. Bununla birlikte UDF kütük dizgesiyle kaydedilmiş CD/DVD RW'lere yazabilirsiniz. Ayrıca Microsoft DVD−ROM'ları, Ahead InCD ile kaydedilmiş RW diskleri gibi başka yazılımlarla oluşturulmuş UDF diskleri okuyabilirsiniz. Kurmak için bir ZIP çıkarma izlencesi gerekir.
Size = 1,2 MB
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = Fox Audio Player\r
-Version = 0.10.0\r
+Version = 0.10.2\r
Licence = GPL\r
Description = Simple and lightweight audio player.\r
-Size = 1.89 MB\r
+Size = 1.9 MB\r
Category = 1\r
URLSite = http://foxaudioplayer.sourceforge.net/\r
-URLDownload = http://svn.reactos.org/packages/fap-0.10.0-win32-bin.exe\r
+URLDownload = http://svn.reactos.org/packages/fap-0.10.2-win32.exe\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section.040c]\r
Description = Lecteur audio simple et léger.\r
-Size = 1,89 Mo\r
+Size = 1,9 Mo\r
\r
[Section.0410]\r
Description = Un semplice e leggero lettore audio.\r
\r
[Section.0418]\r
Description = Un lector audio simplu și ușor.\r
-Size = 1,89 Mo\r
+Size = 1,9 Mo\r
\r
[Section.041f]\r
Name = Fox Ses Oynatıcısı\r
Description = Bayağı ve yeğni ses oynatıcısı.\r
-Size = 1,89 MB\r
+Size = 1,9 MB\r
\r
[Section.0422]\r
Description = Простий та маленький програвач аудіо файлів.\r
-; UTF-8
+; UTF-8
; Polish translation by wojo664
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Mozilla Fira Font
-Version = 1.0
+Version = 3.1
Licence = Unknown
Description = Mozilla Fira Font Pack, Includes Mono and Sans fonts. Unzip in the ReactOS's folder.
-Size = 543 kB
+Size = 1.1 MB
Category = 14
URLSite = https://github.com/mozilla/Fira
URLDownload = http://svn.reactos.org/packages/Fira.exe
[Section.0418]
Licence = Nespecificată
Description = Pachetul Mozilla Fira Font, include fonturile Mono și Sans. Dezarhivați în dosarul „ReactOS”. (FIXME)
-Size = 543 ko
+Size = 1,1 Mo
[Section.041f]
Name = Mozilla Fira Yazı Tipi
Licence = Bilinmiyor
Description = Mozilla Fira Yazı Tipi Paketi, Mono ve Sans yazı tiplerini kapsar. ReactOS'un dizinine çıkartınız.
-Size = 543 KB
+Size = 1,1 MB
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
-Name = Mozilla Firefox 28
-Version = 28.0
+Name = Mozilla Firefox 29
+Version = 29.0.1
Licence = MPL/GPL/LGPL
Description = The most popular and one of the best free Web Browsers out there.
-Size = 22.9 MB
+Size = 27.7 MB
Category = 5
URLSite = http://www.mozilla.org/en-US/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/en-US/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/en-US/Firefox%20Setup%2029.0.1.exe
CDPath = none
[Section.0407]
Description = Der populärste und einer der besten freien Webbrowser.
-Size = 22.8 MB
+Size = 27.5 MB
URLSite = http://www.mozilla.org/de/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/de/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/de/Firefox%20Setup%2029.0.1.exe
[Section.040a]
Description = El más popular y uno de los mejores navegadores web gratuitos que hay.
-Size = 22.7 MB
+Size = 27.5 MB
URLSite = http://www.mozilla.org/es-ES/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/es-ES/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/es-ES/Firefox%20Setup%2029.0.1.exe
[Section.040c]
Description = Le navigateur web gratuit le plus populaire et l'un des meilleurs.
-Size = 23,0 Mo
+Size = 27,8 Mo
URLSite = http://www.mozilla.org/fr/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/fr/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/fr/Firefox%20Setup%2029.0.1.exe
[Section.0410]
Description = Il più popolare e uno dei migliori web browser gratuiti.
-Size = 22.7 MB
+Size = 27.5 MB
URLSite = http://www.mozilla.org/it/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/it/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/it/Firefox%20Setup%2029.0.1.exe
[Section.0413]
Description = De meest populaire en een van de beste gratis Web browsers.
-Size = 23.4 MB
+Size = 28.2 MB
URLSite = http://www.mozilla.org/nl/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/nl/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/nl/Firefox%20Setup%2029.0.1.exe
[Section.0414]
Description = Mest populære og best også gratis nettleserene der ute.
-Size = 22.8 MB
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/nb-NO/Firefox%20Setup%2028.0.exe
+Size = 27.5 MB
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/nb-NO/Firefox%20Setup%2029.0.1.exe
[Section.0415]
Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych.
-Size = 23.7 MB
+Size = 28.4 MB
URLSite = http://www.mozilla.org/pl/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/pl/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/pl/Firefox%20Setup%2029.0.1.exe
[Section.0418]
Description = Cel mai popular și unul dintre cele mai bune navigatoare web gratuite existente.
-Size = 23,3 Mo
+Size = 28,0 Mo
URLSite = http://www.mozilla.org/ro/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/ro/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/ro/Firefox%20Setup%2029.0.1.exe
[Section.0419]
Description = Один из самых популярных и лучших бесплатных браузеров.
-Size = 23,2 MB
+Size = 27.9 MB
URLSite = http://www.mozilla.org/ru/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/ru/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/ru/Firefox%20Setup%2029.0.1.exe
[Section.041b]
Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov.
-Size = 23,4 MB
+Size = 28.2 MB
URLSite = http://www.mozilla.org/sk/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/sk/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/sk/Firefox%20Setup%2029.0.1.exe
[Section.041f]
Description = Özgür Umûmî Ağ tarayıcıları arasında en tutulanı ve en iyilerinden biri.
-Size = 22,8 MB
+Size = 27,5 MB
URLSite = http://www.mozilla.org/tr/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/tr/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/tr/Firefox%20Setup%2029.0.1.exe
[Section.0422]
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.
-Size = 23,2 MB
+Size = 27.9 MB
URLSite = http://www.mozilla.org/uk/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/uk/Firefox%20Setup%2028.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/29.0.1/win32/uk/Firefox%20Setup%2029.0.1.exe
-; UTF-8
+; UTF-8
; Polish translation by wojo664
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Lazarus
-Version = 1.2
+Version = 1.2.2
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 = 112 MB
+Size = 114 MB
Category = 7
URLSite = http://www.lazarus.freepascal.org/
-URLDownload = http://download.sourceforge.net/project/lazarus/Lazarus%20Windows%2032%20bits/Lazarus%201.2/lazarus-1.2.0-fpc-2.6.2-win32.exe
+URLDownload = http://download.sourceforge.net/project/lazarus/Lazarus%20Windows%2032%20bits/Lazarus%201.2.2/lazarus-1.2.2-fpc-2.6.4-win32.exe
CDPath = none
[Section.0407]
[Section.0418]
Licence = GPL, LGPL modificată
Description = Un mediu integrat de dezvoltare (IDE) multi-platformă care vă permite crearea de programe Object Pascal, atât vizuale (GUI) cât și ne-vizuale, și utilizează compilatorul Free Pascal pentru a genera executabile.
-Size = 112 Mo
+Size = 114 Mo
[Section.041f]
Licence = Değiştirilmiş LGPL, GPL
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = LibreOffice\r
-Version = 4.2.3\r
+Version = 4.2.4\r
Licence = LGPL\r
Description = A powerful and open source office suite. It has been forked from OpenOffice.\r
-Size = 211.0 MB\r
+Size = 209.3 MB\r
Category = 6\r
URLSite = http://www.documentfoundation.org/\r
-URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.2.3/win/x86/LibreOffice_4.2.3_Win_x86.msi\r
+URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.2.4/win/x86/LibreOffice_4.2.4_Win_x86.msi\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section.040c]\r
Description = Précédemment appelé OpenOffice. Suite bureautique open source. (FIXME)\r
-Size = 211,0 Mo\r
+Size = 209,3 Mo\r
\r
[Section.0410]\r
Description = Precedentemente chiamato OpenOffice. Open Source Office Suite. (FIXME)\r
\r
[Section.0418]\r
Description = Fostul OpenOffice. Suita de aplicații de birotică open-source. (FIXME)\r
-Size = 211,0 Mo\r
+Size = 209,3 Mo\r
\r
[Section.041f]\r
Description = Güçlü ve açık kaynak bir büro takımı. OpenOffice'ten çatallanılmıştır.\r
-Size = 211,0 MB\r
+Size = 209,3 MB\r
\r
[Section.0422]\r
Description = Відкритий офісний пакет. (FIXME)\r
Size = 2.35 MB
Category = 12
URLSite = http://sourceforge.net/projects/mcwin32/
-URLDownload = http://optimate.dl.sourceforge.net/project/mcwin32/mcwin32-build183-setup.exe
+URLDownload = http://download.sourceforge.net/project/mcwin32/mcwin32-build183-setup.exe
CDPath = none
[Section.0410]
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = Miranda IM\r
-Version = 0.10.22\r
+Version = 0.10.23\r
Licence = GPL\r
Description = Open source multiprotocol instant messaging application - May not work completely.\r
-Size = 2.8 MB\r
+Size = 3.8 MB\r
Category = 5\r
URLSite = http://www.miranda-im.org/\r
-URLDownload = http://files.miranda-im.org/stable/0.10.22.0/miranda-im-v0.10.22-unicode.exe\r
+URLDownload = http://files.miranda-im.org/stable/0.10.23.0/miranda-im-v0.10.23-unicode.exe\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section.040c]\r
Description = Application de messagerie instantannée multi-protocoles open source - pourrait ne pas fonctionner complètement.\r
-Size = 2,8 Mo\r
+Size = 3,8 Mo\r
\r
[Section.0410]\r
Description = Multi-protocollo open source per applicazioni di messaggistica istantanea - potrebbe non funzionare del tutto.\r
\r
[Section.0418]\r
Description = Aplicație de mesagerie instant multiprotocol (open-source) - posibil cu limitări în funcționalitate.\r
-Size = 2,8 Mo\r
+Size = 3,8 Mo\r
\r
[Section.041f]\r
Description = Açık kaynak, çoklu iletişim kâideli, evgin iletileşme uygulaması. Eksiksiz olarak çalışmayabilir.\r
-Size = 2,8 MB\r
+Size = 3,8 MB\r
\r
[Section.0422]\r
Description = Відкрита мультипротокольна програма миттєвих повідомлень - може не працювати повністю.\r
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = Media Player Classic Home Cinema\r
-Version = 1.7.4\r
+Version = 1.7.5\r
Licence = GPL\r
Description = A media player.\r
Size = 10.1 MB\r
Category = 2\r
URLSite = http://mpc-hc.org/\r
-URLDownload = http://download.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.7.4_x86/MPC-HC.1.7.4.x86.exe\r
+URLDownload = http://download.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.7.5_x86/MPC-HC.1.7.5.x86.exe\r
CDPath = none\r
\r
[Section.0407]\r
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Notepad++
-Version = 6.5.5
+Version = 6.6.3
Licence = GPL
Description = A text editor.
Size = 7.3 MB
Category = 6
URLSite = http://notepad-plus-plus.org/
-URLDownload = http://download.tuxfamily.org/notepadplus/6.5.5/npp.6.5.5.Installer.exe
+URLDownload = http://download.tuxfamily.org/notepadplus/6.6.3/npp.6.6.3.Installer.exe
CDPath = none
[Section.0407]
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
-Name = OpenOffice 4.0\r
-Version = 4.0.1\r
+Name = OpenOffice 4.1\r
+Version = 4.1.0\r
Licence = LGPL\r
Description = The open source office suite.\r
Size = 136.79 MB\r
Category = 6\r
URLSite = http://www.openoffice.org/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/en-US/Apache_OpenOffice_4.0.1_Win_x86_install_en-US.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/en-US/Apache_OpenOffice_4.1.0_Win_x86_install_en-US.exe\r
CDPath = none\r
\r
[Section.0407]\r
Description = DIE Open Source Office Suite. (FIXME)\r
Size = 154.88 MB\r
URLSite = http://www.openoffice.org/de/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/de/Apache_OpenOffice_4.0.1_Win_x86_install_de.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/de/Apache_OpenOffice_4.1.0_Win_x86_install_de.exe\r
\r
[Section.040a]\r
Description = La suite de ofimática de código abierto.\r
Size = 126.29 MB\r
URLSite = http://www.openoffice.org/es/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/es/Apache_OpenOffice_4.0.1_Win_x86_install_es.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/es/Apache_OpenOffice_4.1.0_Win_x86_install_es.exe\r
\r
[Section.040c]\r
Description = LA suite bureautique open source.\r
Size = 127,22 Mo\r
URLSite = http://www.openoffice.org/fr/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/fr/Apache_OpenOffice_4.0.1_Win_x86_install_fr.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/fr/Apache_OpenOffice_4.1.0_Win_x86_install_fr.exe\r
\r
[Section.0410]\r
Description = La suite di office Open Source.\r
Size = 132.39 MB\r
URLSite = http://www.openoffice.org/it/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/it/Apache_OpenOffice_4.0.1_Win_x86_install_it.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/it/Apache_OpenOffice_4.1.0_Win_x86_install_it.exe\r
\r
[Section.0413]\r
Description = Open-bron Office Pakket. (FIXME)\r
Size = 132.11 MB\r
URLSite = http://www.openoffice.org/nl/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/nl/Apache_OpenOffice_4.0.1_Win_x86_install_nl.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/nl/Apache_OpenOffice_4.1.0_Win_x86_install_nl.exe\r
\r
[Section.0415]\r
Description = Otwarty pakiet biurowy.\r
Size = 127.47 MB\r
URLSite = http://www.openoffice.org/pl/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/pl/Apache_OpenOffice_4.0.1_Win_x86_install_pl.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/pl/Apache_OpenOffice_4.1.0_Win_x86_install_pl.exe\r
\r
[Section.0418]\r
Description = Suita de aplicații de birotică open-source.\r
Description = Bir açık kaynak büro takımı.\r
Size = 124,36 MB\r
URLSite = http://www.openoffice.org/tr/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/tr/Apache_OpenOffice_4.0.1_Win_x86_install_tr.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/tr/Apache_OpenOffice_4.1.0_Win_x86_install_tr.exe\r
\r
[Section.0422]\r
Description = Відкритий офісний пакет.\r
Description = Open-bron Office Pakket. (FIXME)\r
Size = 132.11 MB\r
URLSite = http://www.openoffice.org/nl/\r
-URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.0.1/binaries/nl/Apache_OpenOffice_4.0.1_Win_x86_install_nl.exe\r
+URLDownload = http://download.sourceforge.net/project/openofficeorg.mirror/4.1.0/binaries/nl/Apache_OpenOffice_4.1.0_Win_x86_install_nl.exe\r
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = Opera\r
-Version = 12.16\r
+Version = 12.17\r
Licence = Freeware\r
Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.\r
-Size = 12.56 MB\r
+Size = 12.57 MB\r
Category = 5\r
URLSite = http://www.opera.com/\r
-URLDownload = http://ftp.opera.com/pub/opera/win/1216/int/Opera_1216_int_Setup.exe\r
+URLDownload = http://ftp.opera.com/pub/opera/win/1217/int/Opera_1217_int_Setup.exe\r
CDPath = none\r
\r
[Section.0405]\r
\r
[Section.040c]\r
Description = Le populaire navigateur Opera avec beaucoup de fonctionnalités avancées, incluant un client mail et BitTorrent.\r
-Size = 12,56 Mo\r
+Size = 12,57 Mo\r
\r
[Section.0410]\r
Description = Il famoso browser Opera con funzionalità avanzate come un client BitTorrent integrato e la gestione delle Mail.\r
[Section.0418]\r
Licence = Gratuită\r
Description = Navigatorul popular Opera cu multe funcționalități avansate incluzând poștă electronică și un client de BitTorrent.\r
-Size = 12,56 Mo\r
+Size = 12,57 Mo\r
\r
[Section.0419]\r
Description = Популярный браузер со многими дополнительными возможностями, включающий клиентов почты и BitTorrent.\r
[Section.041f]\r
Licence = Ücretsiz\r
Description = Bir posta ve BitTorrent istemcisini kapsayan birçok gelişmiş husûsiyetle, tutulan Opera Tarayıcı.\r
-Size = 12,56 MB\r
+Size = 12,57 MB\r
\r
[Section.0422]\r
Description = Популярний браузер з багатьма додатковими можливостями, який включає в себе поштовий та BitTorrent клієнти.\r
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = PeaZip
-Version = 5.3.0
+Version = 5.3.1
Licence = LGPL v3, OpenCandy EULA
Description = PeaZip is a free, cross-platform, open source file and archive manager. It supports over 150 archive formats.
Size = 5.8 MB
Category = 12
URLSite = http://peazip.sourceforge.net/
-URLDownload = http://sourceforge.net/projects/peazip/files/5.3.0/peazip-5.3.0.WINDOWS.exe
+URLDownload = http://download.sourceforge.net/project/peazip/5.3.1/peazip-5.3.1.WINDOWS.exe
CDPath = none
[Section.0407]
Size = 1,78 Mo\r
\r
[Section.041f]\r
-Description = Ã\96zgür bir SSH, Telnet, rlogin ve işlenmemiş TCP istemcisi.\r
+Description = Ã\9ccretsiz bir SSH, Telnet, rlogin ve işlenmemiş TCP istemcisi.\r
Size = 1,78 MB\r
\r
[Section.0422]\r
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Python 3
-Version = 3.4.0
+Version = 3.4.1
Licence = GPL/LGPL
Description = A remarkably powerful dynamic programming language.
-Size = 23.4 MB
+Size = 23.3 MB
Category = 7
URLSite = http://www.python.org/
-URLDownload = http://www.python.org/ftp/python/3.4.0/python-3.4.0.msi
+URLDownload = http://www.python.org/ftp/python/3.4.1/python-3.4.1.msi
CDPath = none
[Section.0407]
[Section.040c]
Description = Un langage de programmation dynamique remarquablement puissant.
-Size = 23,4 Mo
+Size = 23,3 Mo
[Section.0410]
Description = Un Linguaggio di programmazione dinamico e potente.
[Section.0418]
Description = Un limbaj de programare dinamic și puternic.
-Size = 23,4 Mo
+Size = 23,3 Mo
[Section.041f]
Description = Dikkat çekici, güçlü ve devingen bir izlenceleme dili.
-Size = 23,4 MB
+Size = 23,3 MB
[Section.0422]
Description = Дуже потужна динамічна мова програмування.
-; UTF-8
+; UTF-8
; Polish translation by wojo664
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Qmmp (Qt-based Multimedia Player)
-Version = 0.7.3
+Version = 0.7.7
Licence = GPL
Description = Qmmp is an audio-player, written with the help of the Qt library. The user interface is similar to WinAMP or XMMS. Alternative user interfaces also are available.
-Size = 16.0 MB
+Size = 10.5 MB
Category = 1
URLSite = http://qmmp.ylsoftware.com/index.php
-URLDownload = http://qmmp.ylsoftware.com/files/windows/qmmp-0.7.3-win32.exe
+URLDownload = http://qmmp.ylsoftware.com/files/windows/qmmp-0.7.7-win32.exe
CDPath = none
[Section.0407]
[Section.0418]
Description = Qmmp este un lector audio, ce utilizează biblioteca QT. Interfața de utilizare e asemănătoare cu cea din WinAMP sau XMMS. De asemenea sunt disponibile interfețe de utilizare alternative.
-Size = 16,0 Mo
+Size = 10,5 Mo
[Section.0419]
Description = Аудиоплеер Qmmp (Qt-based Multimedia Player).
[Section.041f]
Name = Qmmp (Qt Tabanlı Çoklu Ortam Oynatıcısı)
Description = Qmmp, Qt kitaplığının yardımıyla yazılmış bir ses oynatıcısıdır. Kullanıcı arayüzü WinAMP'a ve XMMS'ye benzer. Başka kullanıcı arayüzleri de vardır.
-Size = 16,0 MB
+Size = 10,5 MB
Size = 28.3 MB\r
Category = 7\r
URLSite = http://reactos.org/wiki/Build_Environment\r
-URLDownload = http://downloads.sourceforge.net/reactos/RosBE-2.1.1.exe\r
+URLDownload = http://download.sourceforge.net/reactos/RosBE-2.1.1.exe\r
CDPath = none\r
\r
[Section.0405]\r
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = SciTE\r
-Version = 3.4.1\r
+Version = 3.4.3\r
Licence = Freeware\r
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.\r
-Size = 730 kB\r
+Size = 737 kB\r
Category = 7\r
URLSite = http://www.scintilla.org/\r
-URLDownload = http://download.sourceforge.net/project/scintilla/SciTE/3.4.1/Sc341.exe\r
+URLDownload = http://download.sourceforge.net/project/scintilla/SciTE/3.4.3/Sc343.exe\r
CDPath = none\r
\r
[Section.0407]\r
\r
[Section.040c]\r
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.\r
-Size = 730 ko\r
+Size = 737 ko\r
\r
[Section.0410]\r
Description = SciTE è un editor di testo basato su scintilla. Originariamente costruito per dimostrare Scintilla, è cresciuto fino a essere un editor generalmente utile con strutture per la creazione e l'esecuzione di programmi.\r
[Section.0418]\r
Licence = Gratuită\r
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.\r
-Size = 730 ko\r
+Size = 737 ko\r
\r
[Section.041f]\r
Licence = Ücretsiz\r
Description = SciTE, bir Scintilla tabanlı metin düzenleyicisidir. İlk başta Scintilla'yı göstermek için yapıldı, izlenceleri yapmak ve çalıştırmak yetenekleriyle bir umûmiyetle kullanışlı düzenleyici olmak için gelişti.\r
-Size = 730 KB\r
+Size = 737 KB\r
\r
[Section.0422]\r
Description = Текстовий редактор на основі SCIntilla. Був зібраний як презентація Scintilla, але виріс до редактора загального користування з засобами збирання та запуску програм.\r
Size = 136,67 ko\r
\r
[Section.041f]\r
-Name = SDL (Bayağı Doğrudan Ortam Katmanı) Yürütücüsü\r
+Name = SDL (Bayağı Doğrudan Ortam Katmanı) Yürütücü\r
Description = Birçok açık kaynak oyunu çalıştırmak için gereklidir. Çıkartmak için 7-Zip ya da benzeri bir yazılım kullanmanız gerekir.\r
Size = 136,67 KB\r
\r
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = Mozilla SeaMonkey\r
-Version = 2.25\r
+Version = 2.26\r
Licence = MPL/GPL/LGPL\r
Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need.\r
Size = 23.90 MB\r
Category = 5\r
URLSite = http://www.seamonkey-project.org/\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/en-US/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/en-US/SeaMonkey%20Setup%202.26.exe\r
CDPath = none\r
\r
[Section.0407]\r
Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen.\r
Size = 23.80 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/de/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/de/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.040a]\r
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.\r
Size = 23.79 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/es-ES/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/es-ES/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.040c]\r
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.\r
Size = 24,06 Mo\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/fr/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/fr/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.0410]\r
Description = Mozilla Suite è vivo. Questo è l'unico pachetto che include Browser, Mail, Chat, e Composer di cui avrete mai bisogno...\r
Size = 23.71 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/it/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/it/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.0413]\r
Description = Mozilla Suite bundelt alle applicaties voor het Web: Browser, Mail, Chat, Composer.\r
Size = 24.40 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/nl/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/nl/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.0415]\r
Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz.\r
Size = 24.72 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/pl/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/pl/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.0418]\r
Description = Suita Mozilla. Acest pachet ce încorporează navigator, poștă electronică, client IRC și editor HTML, acoperind astfel o arie largă de necesități.\r
[Section.0419]\r
Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор.\r
Size = 24.27 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/ru/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/ru/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.041f]\r
Description = Mozilla Bohçası sağ. Bu, hiç gereksinim duymayacağınız, yalnızca Tarayıcı, Posta, Söyleşi ve Yazar bohçasıdır.\r
Size = 23,83 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/tr/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/tr/SeaMonkey%20Setup%202.26.exe\r
\r
[Section.0422]\r
Description = Продовження Mozilla Suite. Включає в себе браузер, поштовий клієнт, IRC-клієнт та HTML-редактор.\r
Size = 24.27 MB\r
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.25/win32/ru/SeaMonkey%20Setup%202.25.exe\r
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.26/win32/ru/SeaMonkey%20Setup%202.26.exe\r
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = SumatraPDF\r
-Version = 2.4\r
+Version = 2.5.2\r
Licence = GPLv3\r
Description = Sumatra PDF is a slim, free, open-source PDF reader. Portable out of the box.\r
Size = 4.0 MB\r
Category = 6\r
URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html\r
-URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.4-install.exe\r
+URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.5.2-install.exe\r
CDPath = none\r
\r
[Section.0407]\r
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Mozilla Thunderbird 24
-Version = 24.4.0
+Version = 24.5.0
Licence = MPL/GPL/LGPL
Description = The most popular and one of the best free Mail Clients out there.
Size = 21.12 MB
Category = 5
URLSite = https://www.mozilla.org/en-US/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/en-US/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/en-US/Thunderbird%20Setup%2024.5.0.exe
CDPath = none
[Section.0407]
Description = Der populärste und einer der besten freien Mail-Clients.
Size = 20.96 MB
URLSite = https://www.mozilla.org/de/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/de/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/de/Thunderbird%20Setup%2024.5.0.exe
[Section.040a]
Description = El más popular y uno de los mejores clientes mail que hay.
Size = 20.92 MB
URLSite = https://www.mozilla.org/es-ES/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/es-ES/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/es-ES/Thunderbird%20Setup%2024.5.0.exe
[Section.040c]
Description = Le plus populaire et l'un des meilleurs clients mail gratuits disponible.
Size = 21,27 Mo
URLSite = https://www.mozilla.org/fr/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/fr/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/fr/Thunderbird%20Setup%2024.5.0.exe
[Section.0410]
Description = Il più popolare e il migliore Client mail gratuito.
Size = 20.91 MB
URLSite = https://www.mozilla.org/it/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/it/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/it/Thunderbird%20Setup%2024.5.0.exe
[Section.0413]
Description = De meest populaire en een van de beste gratis e-mail-programma's.
Size = 21.61 MB
URLSite = https://www.mozilla.org/nl/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/nl/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/nl/Thunderbird%20Setup%2024.5.0.exe
[Section.0415]
Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty.
Size = 21.80 MB
URLSite = https://www.mozilla.org/pl/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/pl/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/pl/Thunderbird%20Setup%2024.5.0.exe
[Section.0418]
Description = Cel mai popular și unul dintre cele mai bune clientele gratuite de poștă electronică.
Size = 21,48 Mo
URLSite = https://www.mozilla.org/ro/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/ro/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/ro/Thunderbird%20Setup%2024.5.0.exe
[Section.0419]
Description = Один из самых популярных и лучших бесплатных почтовых клиентов.
Size = 21.38 MB
URLSite = https://www.mozilla.org/ru/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/ru/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/ru/Thunderbird%20Setup%2024.5.0.exe
[Section.041f]
Description = Özgür posta istemcileri arasında en tutulanı ve en iyilerinden biri.
Size = 20,99 MB
URLSite = https://www.mozilla.org/tr/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/tr/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/tr/Thunderbird%20Setup%2024.5.0.exe
[Section.0422]
Description = Найпопулярніший та один з кращих поштових клієнтів.
Size = 21.41 MB
URLSite = https://www.mozilla.org/uk/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/uk/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/uk/Thunderbird%20Setup%2024.5.0.exe
[Section.0813]
Description = De meest populaire en een van de beste gratis e-mail-programma's.
Size = 9.71 MB
URLSite = https://www.mozilla.org/nl/thunderbird/
-URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.4.0/win32/nl/Thunderbird%20Setup%2024.4.0.exe
+URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.5.0/win32/nl/Thunderbird%20Setup%2024.5.0.exe
-; UTF-8
+; UTF-8
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)
[Section]
Name = Total Commander
-Version = 8.50
+Version = 8.51a
Licence = Shareware
Description = Total Commander is a file manager with two panels side by side.
-Size = 3.5 MB
+Size = 3.55 MB
Category = 12
URLSite = http://www.ghisler.com/
-URLDownload = http://www.slo.ru/download/total_commander/tcm850x32.exe
+URLDownload = http://www.slo.ru/download/total_commander/tcm851ax32.exe
CDPath = none
[Section.0407]
[Section.0418]
Licence = Versiune de evaluare
Description = Total Commander este un gestionar de fișiere după modelul «două paneluri alăturate».
-Size = 3,5 Mo
+Size = 3,55 Mo
[Section.041f]
Licence = Paylaşımlı
Description = Total Commander, yan yana iki bölmeli bir kütük yöneticisidir.
-Size = 3,5 MB
+Size = 3,55 MB
[Section.0813]
Description = Total Commander is een bestandsbeheerder met twee panelen zij aan zij.
-; UTF-8\r
+; UTF-8\r
; Turkish translation by Erdem Ersoy (eersoy93) (erdemersoy@live.com)\r
\r
[Section]\r
Name = µTorrent\r
-Version = 3.4.1\r
+Version = 3.4.2\r
Licence = Freeware for non-commercial uses\r
Description = Small and fast BitTorrent Client.\r
Size = 1.6 MB\r
Size = 969,59 ko\r
\r
[Section.041f]\r
-Name = Microsoft Visual Basic 5 Yürütücüsü\r
+Name = Microsoft Visual Basic 5 Yürütücü\r
Licence = Bilinmiyor\r
-Description = Microsoft Visual Basic 5 Yürütücüsü. Şunları içerir: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll.\r
+Description = Microsoft Visual Basic 5 Yürütücü. Şunları içerir: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll.\r
Size = 969,59 KB\r
\r
[Section.0422]\r
Size = 1,02 Mo\r
\r
[Section.041f]\r
-Name = Microsoft Visual Basic 6 Yürütücüsü\r
+Name = Microsoft Visual Basic 6 Yürütücü\r
Licence = Bilinmiyor\r
-Description = Microsoft Visual Basic 6 Yürütücüsü. Şunları içerir: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll.\r
+Description = Microsoft Visual Basic 6 Yürütücü. Şunları içerir: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll.\r
Size = 1,02 MB\r
\r
[Section.0422]\r
[Section.041f]\r
Name = Microsoft Visual C++ 2005 SP1 Yeniden Dağıtılabilir Paket\r
Licence = Bilinmiyor\r
-Description = Microsoft Visual Studio 2005 Yürütücüsü SP1. Şunları içerir: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll.\r
+Description = Microsoft Visual Studio 2005 Yürütücü SP1. Şunları içerir: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll.\r
Size = 2,6 MB\r
\r
[Section.0422]\r
[Section.041f]\r
Name = Microsoft Visual C++ 2008 SP1 Yeniden Dağıtılabilir Paket\r
Licence = Bilinmiyor\r
-Description = Microsoft Visual Studio 2008 SP1 Yürütücüsü. Şunları içerir: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll.\r
+Description = Microsoft Visual Studio 2008 SP1 Yürütücü. Şunları içerir: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll.\r
Size = 4,02 MB\r
\r
[Section.0422]\r
[Section.041f]
Name = Microsoft Visual C++ 2010 Yeniden Dağıtılabilir Paket
Licence = Bilinmiyor
-Description = Microsoft Visual Studio 2010 Yürütücüsü. Şunları içerir: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll.
+Description = Microsoft Visual Studio 2010 Yürütücü. Şunları içerir: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll.
Size = 4,8 MB
[Section.0422]
[Section.041f]\r
Name = Microsoft Visual C++ 6 Yeniden Dağıtılabilir Paket\r
Licence = Bilinmiyor\r
-Description = Microsoft Visual Studio 6 Yürütücüsü. Şunları içerir: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll.\r
+Description = Microsoft Visual Studio 6 Yürütücü. Şunları içerir: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll.\r
Size = 1,75 MB\r
\r
[Section.0422]\r
[Section]\r
Name = WinBoard\r
Version = 4.2.7b\r
-Licence = GPL 3\r
-Description = WinBoard is a graphical chessboard for the Windows/ReactOS that can serve as a user interface for GNU Chess, Crafty, and other chess engines, for the Internet Chess Servers, and for electronic mail correspondence chess.\r
+Licence = GPLv3\r
+Description = WinBoard is a graphical chessboard for the Windows/ReactOS that can serve as a user interface for GNU Chess, Crafty, and other chess engines, for the Internet chess servers, and for electronic mail correspondence chess.\r
Size = 5.93 MB\r
Category = 4\r
URLSite = http://www.gnu.org/software/xboard/\r
Size = 5,93 Mo\r
\r
[Section.041f]\r
-Description = WinBoard; GNU Chess, Crafty ve diğer satranç motorlarını Umûmî Ağ satranç sunucuları ve postayla yazışmalı satranç için bir arayüz olarak sunan, Windows/ReactOS için bir çizgelik satranç tahtasıdır.\r
+Licence = GPL 3. sürüm\r
+Description = WinBoard, Umûmî Ağ satranç sunucularına ve postayla yazışmalı satranca GNU Chess, Crafty ve başka satranç motorlarını bir kullanıcı arayüzü olarak sunabilen, Windows/ReactOS için bir çizgelik satranç tahtasıdır.\r
Size = 5,93 MB\r
\r
[Section.0422]\r
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.
+Description = Zaz is a free arcade action puzzle computer game, a little bit like Frozen Bubble.
Size = 21.0 MB
Category = 4
URLSite = http://zaz.sourceforge.net
Size = 21,0 Mo
[Section.041f]
-Description = Zaz, atari salonu oyunu türünde, gelişimli bir bulmaca oyunudur. Bir nebze Donmuş Kabarcıklar'a benzemektedir.
+Description = Zaz; ücretsiz, atari salonu oyunu türünde, devingen bir bulmaca oyunudur, birazcık Frozen Bubble'a benzer.
Size = 21,0 MB
FILE_IN_CABINET_INFO_W *pInfo;
FILEPATHS_W *pFilePaths;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(pFilePaths);
+
switch(Notification)
{
case SPFILENOTIFY_FILEINCABINET:
{
SHFILEOPSTRUCT fileop;
DWORD len = wcslen(lpszDir);
- WCHAR *pszFrom = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR));
+ WCHAR *pszFrom = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR));
int ret;
wcscpy(pszFrom, lpszDir);
STARTUPINFO startupInfo;
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(nCmdShow);
-
+
GetCurrentDirectory(MAX_PATH, szSetupPath);
wcscat(szSetupPath, L"\\");
wcscpy(szFileName, szSetupPath);
wcscat(szFileName, L"setup.lst");
-
+
if (GetFileAttributes(szFileName) == INVALID_FILE_ATTRIBUTES)
{
MessageBoxW(0, L"Cannot find Setup.lst file", L"Error", MB_OK | MB_ICONERROR);
return 1;
}
-
+
/* read information from setup.lst */
GetPrivateProfileStringW(NT_PARAMS, L"CabinetFile", NULL, szCabFileName, MAX_PATH, szFileName);
GetPrivateProfileStringW(NT_PARAMS, L"TmpDirName", NULL, szTempDirName, 50, szFileName);
GetPrivateProfileStringW(NT_PARAMS, L"CmdLine", NULL, szCmdLine, MAX_PATH, szFileName);
-
+
wcscpy(szCabFilePath, szSetupPath);
wcscat(szCabFilePath, szCabFileName);
-
+
/* ceate temp directory */
GetSystemDrive(szDrive);
wcscpy(szTempPath, szDrive);
wcscpy(szFullTempPath, szTempPath);
wcscat(szFullTempPath, szTempDirName);
wcscat(szFullTempPath, L"\\");
-
+
if (SHCreateDirectoryEx(0, szFullTempPath, NULL) != ERROR_SUCCESS)
{
MessageBoxW(0, L"Could not create Temp Directory.", L"Error", MB_OK | MB_ICONERROR);
return 1;
- }
+ }
dwAttrib = GetFileAttributes(szTempPath);
SetFileAttributes(szTempPath, dwAttrib | FILE_ATTRIBUTE_HIDDEN);
-
+
/* extract files */
if (!SetupIterateCabinetW(szCabFilePath, 0, ExtCabCallback, szFullTempPath))
{
DeleteDirectory(szTempPath);
return 1;
}
-
+
/* prepare command line */
wsprintf(szTempCmdLine, szCmdLine, szFullTempPath, lpCmdLine);
wcscpy(szCmdLine, szFullTempPath);
wcscat(szCmdLine, szTempCmdLine);
-
+
/* execute the 32-Bit installer */
ZeroMemory(&processInfo, sizeof(processInfo));
ZeroMemory(&startupInfo, sizeof(startupInfo));
DeleteDirectory(szTempPath);
return 1;
}
-
+
/* cleanup */
DeleteDirectory(szTempPath);
-
+
return 0;
}
+/*
+ * Translated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (May, 2014)
+ */
+
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
/* Dialog */
IDD_GUI DIALOGEX 0, 0, 240, 255
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Remote Shutdown"
+CAPTION "Zdalne zamknięcie systemu"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&OK", IDC_OK, 125, 232, 50, 14
- PUSHBUTTON "&Cancel", IDC_CANCEL, 178, 232, 50, 14
- LTEXT "Co&mputers:", IDC_STATIC, 9, 9, 35, 36
+ PUSHBUTTON "&Anuluj", IDC_CANCEL, 178, 232, 50, 14
+ LTEXT "Ko&mputery:", IDC_STATIC, 9, 9, 35, 36
LISTBOX IDC_COMPUTER_LIST, 8, 19, 162, 55
- PUSHBUTTON "&Add...", IDC_ADD_SYSTEM, 179, 19, 50, 14
- PUSHBUTTON "&Remove", IDC_REMOVE_SYSTEM, 179, 36, 50, 14, WS_DISABLED
- PUSHBUTTON "&Browse...", IDC_BROWSE_SYSTEM, 179, 53, 50, 14
- LTEXT "Action", IDC_ACTION, 11, 81, 20, 14
+ PUSHBUTTON "&Dodaj...", IDC_ADD_SYSTEM, 179, 19, 50, 14
+ PUSHBUTTON "&Usuń", IDC_REMOVE_SYSTEM, 179, 36, 50, 14, WS_DISABLED
+ PUSHBUTTON "&Przeglądaj...", IDC_BROWSE_SYSTEM, 179, 53, 50, 14
+ LTEXT "Akcja", IDC_ACTION, 11, 81, 20, 14
COMBOBOX IDC_ACTION_TYPE, 37, 79, 129, 14, WS_TABSTOP | CBS_DROPDOWN
- CHECKBOX "Warn users", IDC_WARN_USERS, 175, 79, 55, 14, BS_AUTOCHECKBOX | WS_TABSTOP
- LTEXT "Display warning for", IDC_SHOW_WARN_ONE, 11, 99, 65, 14
+ CHECKBOX "Ostrzeż użytkowników", IDC_WARN_USERS, 175, 79, 55, 14, BS_AUTOCHECKBOX | WS_TABSTOP
+ LTEXT "Wyświetlaj ostrzeżenie przez", IDC_SHOW_WARN_ONE, 11, 99, 65, 14
EDITTEXT IDC_SHOW_WARN, 78, 97, 41, 14
- LTEXT "second(s)", IDC_SHOW_WARN_TWO, 124, 99, 32, 10
- GROUPBOX "Shutdown Event Tracker", IDC_STATIC, 5, 114, 224, 114
- LTEXT "Reason:", IDC_STATIC, 16, 130, 27, 8
- CHECKBOX "Planned", IDC_PLANNED, 175, 130, 40, 12, BS_AUTOCHECKBOX | WS_TABSTOP
+ LTEXT "sekund(y)", IDC_SHOW_WARN_TWO, 124, 99, 32, 10
+ GROUPBOX "Śledzenie zdarzeń zamknięcia systemu", IDC_STATIC, 5, 114, 224, 114
+ LTEXT "Powód:", IDC_STATIC, 16, 130, 27, 8
+ CHECKBOX "Planowane", IDC_PLANNED, 175, 130, 40, 12, BS_AUTOCHECKBOX | WS_TABSTOP
COMBOBOX IDC_REASON_CODE, 17, 142, 198, 13, WS_TABSTOP | CBS_DROPDOWN
- LTEXT "Comm&ent:", IDC_COMMENT_CAPTION, 16, 159, 38, 8
+ LTEXT "Ko&mentarz:", IDC_COMMENT_CAPTION, 16, 159, 38, 8
EDITTEXT IDC_COMMENT_TEXT, 17, 171, 198, 50, WS_VSCROLL
END
/* Information and error messages */
STRINGTABLE
BEGIN
- IDS_USAGE "ReactOS Shutdown Utility\n\
+ IDS_USAGE "Narzędzie Zamykania ReactOS\n\
\n\
-Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\
- [/m \\\\computer][/t xxx][/d [p|u:]xx:yy [/c ""comment""]]\n\
+Sposób użycia: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\
+ [/m \\\\komputer][/t xxx][/d [p|u:]xx:yy [/c ""komentarz""]]\n\
\n\
- No arguments or /? Display this help.\n\
- /i Show the graphical user interface (GUI). This option must be the\n\
- first one.\n\
- /l Log off on the local system only. Cannot be used with /m or /d.\n\
- /s Shutdown the computer.\n\
- /r Restart the computer.\n\
- /g Restart the computer and restart all the registered applications.\n\
- /a Cancel a delayed shutdown. Can only be used during the delay\n\
- period.\n\
- /p Shutdown the local computer without any timeout or warning. Can be\n\
- used with /d or /f.\n\
- /h Hibernate the local computer. Usable with /f.\n\
- /e Document the reason for the unexpected computer shutdown.\n\
- /m \\\\computer Specify the target computer (UNC/IP address).\n\
- /t xxx Set the timeout period to xxx seconds before shutting down.\n\
- The valid range starts from 0 to 315360000 (10 years),\n\
- 30 being the default value.\n\
- /c ""comment"" Comment on the reason for shutdown or restart.\n\
- 512 characters maximum allowed.\n\
- /f Force running applications to close without warning users. If you\n\
- do not specify any other parameter, this option will also log off.\n\
- /d [p|u:]xx:yy Give the reason code for the shutdown or the restart.\n\
- p indicates that the shutdown or the restart is planned.\n\
- u indicates that the reason is defined by the user.\n\
- If neither p nor u are specified, the shutdown or the restart are\n\
- not planned.\n\
- xx is the major reason code (positive integer smaller than 256).\n\
- yy is the minor reason code (positive integer smaller than 65536).\n"
+ Bez argumentów lub /? Wyświetla Pomoc.\n\
+ /i Wyświetla graficzny interfejs użytkownika (GUI).\n\
+ To musi być pierwsza opcja.\n\
+ /l Wylogowuje. Ten parametr nie może być używany z opcjami /m\n\
+ oraz /d.\n\
+ /s Zamyka komputer.\n\
+ /r Zamyka i ponownie uruchamia komputer.\n\
+ /g Zamyka i ponownie uruchamia komputer. Po ponownym rozruchu\n\
+ systemu, uruchamia ponownie wszystkie zarejestrowane\n\
+ aplikacje.\n\
+ /a Przerywa zamykanie systemu.\n\
+ Do użytku tylko podczas limitu czasu.\n\
+ /p Wyłącza lokalny komputer bez limitu czasu i ostrzeżenia.\n\
+ Do użytku tylko z opcją /d i /f.\n\
+ /h Przełącza komputer lokalny w stan hibernacji.\n\
+ Do użytku tylko z opcją /f.\n\
+ /e Dokumentuje przyczynę nieoczekiwanego zamknięcia systemu.\n\
+ /m \\\\komputer Określa komputer docelowy (adres UNC/IP).\n\
+ /t xxx Ustawia limit czasu zamknięcia systemu na xxx sekund.\n\
+ Prawidłowy zakres to 0-315360000 (10 lat), domyślna wartość to 30.\n\
+ /c ""komentarz"" Wstawia komentarz dotyczący przyczyny ponownego\n\
+ uruchomienia lub zamknięcia.\n\
+ Maksymalna dozwolona liczba znaków wynosi 512.\n\
+ /f Wymusza zamknięcie uruchomionych aplikacji bez uprzedniego\n\
+ powiadamiania użytkowników. If you do not specify any other parameter, this option will also log off.\n\
+ /d [p|u:]xx:yy Podaje przyczynę ponownego uruchomienia lub\n\
+ zamknięcia systemu\n\
+ Opcja p określa, że zaplanowano zamknięcie lub\n\
+ ponowne uruchomienie.\n\
+ Opcja u określa, że przyczyna jest zdefiniowana przez\n\
+ użytkownika.\n\
+ Jeśli nie określono opcji p i u, ponowne uruchomienie\n\
+ lub zamknięcie nie jest zaplanowane.\n\
+ xx to numer przyczyny głównej (dodatnia liczba całkowita\n\
+ mniejsza niż 256).\n\
+ yy to numer przyczyny dodatkowej (dodatnia liczba całkowita\n\
+ mniejsza niż 65 536).\n"
- IDS_ERROR_SHUTDOWN_REBOOT "ERROR: Unable to shutdown and restart at the same time.\n"
- IDS_ERROR_TIMEOUT "ERROR: Timeout value of %u is out of bounds (0-315360000).\n"
- IDS_ERROR_ABORT "ERROR: Unable to abort the shutdown of the system.\n"
- IDS_ERROR_LOGOFF "ERROR: Unable to logoff the system.\n"
- IDS_ERROR_SHUTDOWN "ERROR: Unable to shutdown the system.\n"
- IDS_ERROR_RESTART "ERROR: Unable to restart the system.\n"
- IDS_ERROR_MAX_COMMENT_LENGTH "ERROR: Comment length exceeds maximum character limit set by the system.\n"
- IDS_ERROR_HIBERNATE "ERROR: Unable to send system into hibernation mode.\n"
- IDS_ERROR_HIBERNATE_LOCAL "ERROR: Hibernation mode cannot be started remotely.\n"
- IDS_ERROR_HIBERNATE_ENABLED "ERROR: Hibernation mode is not enabled.\n"
- IDS_ERROR_DIALOG_CAPTION "Remote Shutdown"
- IDS_ERROR_DIALOG_INIT "Unable to display the graphical user interface."
+ IDS_ERROR_SHUTDOWN_REBOOT "BŁĄD: Nie można zamknąć i ponownie uruchomić w tym samym czasie.\n"
+ IDS_ERROR_TIMEOUT "BŁĄD: Limit czasu %u jest poza zakresem (0-315360000).\n"
+ IDS_ERROR_ABORT "BŁĄD: Nie można przerważ zamykania systemu.\n"
+ IDS_ERROR_LOGOFF "BŁĄD: Nie można wylogować z systemu.\n"
+ IDS_ERROR_SHUTDOWN "BŁĄD: Nie można zamknąć systemu.\n"
+ IDS_ERROR_RESTART "BŁĄD: Nie można ponownie uruchomić systemu.\n"
+ IDS_ERROR_MAX_COMMENT_LENGTH "BŁĄD: Długość komentarza przekrasza maksymalny limit znaków ustawiony przez system.\n"
+ IDS_ERROR_HIBERNATE "BŁĄD: Nie można ustawić systemu w trybie hibernacji.\n"
+ IDS_ERROR_HIBERNATE_LOCAL "BŁĄD: Tryb hibernacji nie może być uruchomiony zdalnie.\n"
+ IDS_ERROR_HIBERNATE_ENABLED "BŁĄD: Tryb hibernacji jest wyłączony.\n"
+ IDS_ERROR_DIALOG_CAPTION "Zdalne Zamykanie"
+ IDS_ERROR_DIALOG_INIT "Nie można wyświetlić graficznego interfejsu użytkownika."
END
/* Remote shutdown action strings */
STRINGTABLE
BEGIN
- IDS_ACTION_SHUTDOWN "Shutdown the system"
- IDS_ACTION_RESTART "Restart the system"
- IDS_ACTION_UNEXPECTED_SHUTDOWN "Annotate the unexpected shutdown"
+ IDS_ACTION_SHUTDOWN "Zamknięcie"
+ IDS_ACTION_RESTART "Uruchom ponownie"
+ IDS_ACTION_UNEXPECTED_SHUTDOWN "Adnotuj nieoczekiwane zamknięcie"
END
/* Remote shutdown reason strings */
STRINGTABLE
BEGIN
- IDS_REASON_OTHER "Other"
- IDS_REASON_HARDWARE_MAINTENANCE "Hardware: Maintenance"
- IDS_REASON_HARDWARE_INSTALL "Hardware: Installation"
- IDS_REASON_OS_RECOVER "Operating System: Recovery"
- IDS_REASON_OS_RECONFIGURE "Operating System: Reconfigure"
- IDS_REASON_APP_MAINTENANCE "Application: Maintenance"
- IDS_REASON_APP_INSTALL "Application: Installation"
- IDS_REASON_APP_UNRESPONSIVE "Application: Unresponsive"
- IDS_REASON_APP_UNSTABLE "Application: Unstable"
- IDS_REASON_SECURITY "Security Issue"
- IDS_REASON_NETWORK "Loss of network connectivity"
+ IDS_REASON_OTHER "Inne zadania"
+ IDS_REASON_HARDWARE_MAINTENANCE "Sprzęt: konserwacja"
+ IDS_REASON_HARDWARE_INSTALL "Sprzęt: instalacja"
+ IDS_REASON_OS_RECOVER "System Operacyjny: odzyskiwanie"
+ IDS_REASON_OS_RECONFIGURE "System Operacyjny: ponowna konfiguracja"
+ IDS_REASON_APP_MAINTENANCE "Aplikacja: konserwacja"
+ IDS_REASON_APP_INSTALL "Aplikacja: instalacja"
+ IDS_REASON_APP_UNRESPONSIVE "Aplikacja: nie odpowiada"
+ IDS_REASON_APP_UNSTABLE "Aplikacja: niestabilna"
+ IDS_REASON_SECURITY "Problem zabezpieczeń"
+ IDS_REASON_NETWORK "Utrata połączenia sieciowego"
END
* Use ReactOS forum PM, IRC or saibamenppl at gmail.com to contact me
* http://www.reactos.org
* IRC: irc.freenode.net #reactos-pl;
- * UTF-8 conversion by Caemyr (May, 2011)
+ * UTF-8 conversion by Caemyr (May, 2011)
+ * Update by wojo664 and Saibamen (May 2014)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
BEGIN
ICON IDI_SNDREC32, -1, 19, 14, 21, 20
LTEXT "Rejestrator dźwięku ReactOS, wersja 1.0", IDC_STATIC, 56, 16, 114, 8, SS_NOPREFIX
- LTEXT "Copyright (C) 2009", IDC_STATIC, 56, 25, 114, 8
+ LTEXT "Prawa autorskie (C) 2009", IDC_STATIC, 56, 25, 114, 8
DEFPUSHBUTTON "OK", IDOK, 139, 54, 50, 14, WS_GROUP
END
MENUITEM "Otwórz...", ID_FILE_OPEN
MENUITEM "Zapisz", ID_FILE_SAVE, GRAYED
MENUITEM "Zapisz jako...", ID_FILE_SAVEAS, GRAYED
- MENUITEM "Restore...", ID_FILE_RESTORE, GRAYED
- MENUITEM "Properties", ID_FILE_PROPERTIES
+ MENUITEM "Przywróć...", ID_FILE_RESTORE, GRAYED
+ MENUITEM "Właściwości", ID_FILE_PROPERTIES
MENUITEM SEPARATOR
MENUITEM "Wyjście", ID_FILE_EXIT
END
- POPUP "&Edit"
+ POPUP "&Edycja"
BEGIN
- MENUITEM "&Copy", ID_EDIT_COPY
- MENUITEM "&Paste Insert", ID_EDIT_PASTE, GRAYED
- MENUITEM "Paste Mi&x", ID_EDIT_PASTEMIX, GRAYED
+ MENUITEM "&Kopiuj", ID_EDIT_COPY
+ MENUITEM "&Wklej wstawkę", ID_EDIT_PASTE, GRAYED
+ MENUITEM "Wklej Mi&ks", ID_EDIT_PASTEMIX, GRAYED
MENUITEM SEPARATOR
- MENUITEM "&Insert File...", ID_EDIT_INSERTFILE
- MENUITEM "&Mix with File...", ID_EDIT_MIXFILE
+ MENUITEM "&Wstaw plik...", ID_EDIT_INSERTFILE
+ MENUITEM "&Miksuj z plikiem...", ID_EDIT_MIXFILE
MENUITEM SEPARATOR
- MENUITEM "Delete &Before Current Position",ID_EDIT_DELETEBEFORE, GRAYED
- MENUITEM "Delete &After Current Position",ID_EDIT_DELETEAFTER, GRAYED
+ MENUITEM "Kasuj &przed obecną pozycją",ID_EDIT_DELETEBEFORE, GRAYED
+ MENUITEM "Kasuj &za obecną pozycją",ID_EDIT_DELETEAFTER, GRAYED
MENUITEM SEPARATOR
- MENUITEM "A&udio Properties", ID_EDIT_AUDIOPROPS
+ MENUITEM "Właściwości a&udio", ID_EDIT_AUDIOPROPS
END
- POPUP "Effect&s"
+ POPUP "Efekt&y"
BEGIN
- MENUITEM "&Increase Volume (by 25%)", ID_EFFECTS_INCVOL
- MENUITEM "&Decrease Volume", ID_EFFECTS_DECVOL
+ MENUITEM "&Zgłośnij (o 25%)", ID_EFFECTS_INCVOL
+ MENUITEM "&Ścisz", ID_EFFECTS_DECVOL
MENUITEM SEPARATOR
- MENUITEM "&Increase Speed (by 100%)", ID_EFFECTS_INCSPD
- MENUITEM "&Decrease Speed", ID_EFFECTS_DECSPD
+ MENUITEM "&Przyśpiesz (o 100%)", ID_EFFECTS_INCSPD
+ MENUITEM "&Zwolnij", ID_EFFECTS_DECSPD
MENUITEM SEPARATOR
- MENUITEM "&Add Echo", ID_EFFECTS_ECHO
- MENUITEM "&Reverse", ID_EFFECTS_REVERSE
+ MENUITEM "&Dodaj echo", ID_EFFECTS_ECHO
+ MENUITEM "&Odwróć", ID_EFFECTS_REVERSE
END
POPUP "?"
BEGIN
LV_ITEM item;
int i;
+ /* Trick: on Windows, pressing the CTRL key forces the task to be ended */
+ BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL) & 0x8000);
+
for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++) {
memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_STATE|LVIF_PARAM;
if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) {
- PostMessageW(pAPLI->hWnd, WM_CLOSE, 0, 0);
+ EndTask(pAPLI->hWnd, 0, ForceEndTask);
}
}
}
return -1;
}
+ /*
+ * Set our shutdown parameters: we want to shutdown the very last,
+ * without displaying any end task dialog if needed.
+ */
+ SetProcessShutdownParameters(1, SHUTDOWN_NORETRY);
+
DialogBoxW(hInst, (LPCWSTR)IDD_TASKMGR_DIALOG, NULL, TaskManagerWndProc);
/* Save our settings to the registry */
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/idl)
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
add_rpc_files(server ${REACTOS_SOURCE_DIR}/include/reactos/idl/pnp.idl)
${PSEH_LIB})
set_module_type(umpnpmgr win32cui UNICODE)
-add_importlibs(umpnpmgr advapi32 rpcrt4 userenv msvcrt kernel32 ntdll)
+add_importlibs(umpnpmgr advapi32 rpcrt4 userenv shlwapi msvcrt kernel32 ntdll)
add_cd_file(TARGET umpnpmgr DESTINATION reactos/system32 FOR all)
#include <cfgmgr32.h>
#include <regstr.h>
#include <userenv.h>
+#include <shlwapi.h>
#include <pnp_s.h>
#define NDEBUG
if (ulFlags & CM_DELETE_CLASS_SUBKEYS)
{
- if (RegDeleteTreeW(hClassKey, pszClassGuid) != ERROR_SUCCESS)
+ if (SHDeleteKeyW(hClassKey, pszClassGuid) != ERROR_SUCCESS)
ret = CR_REGISTRY_ERROR;
}
else
while (TRUE)
{
/* Update status text */
- if (PartitionList->CurrentPartition == NULL ||
- PartitionList->CurrentPartition->IsPartitioned == FALSE)
+ if (PartitionList->CurrentPartition == NULL)
{
CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLCREATEPARTITION));
}
- else if (IsContainerPartition(PartitionList->CurrentPartition->PartitionType))
+ else if (PartitionList->CurrentPartition->LogicalPartition)
{
- CONSOLE_SetStatusText(MUIGetString(STRING_DELETEPARTITION));
+ if (PartitionList->CurrentPartition->IsPartitioned)
+ {
+ CONSOLE_SetStatusText(MUIGetString(STRING_DELETEPARTITION));
+ }
+ else
+ {
+ CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLCREATELOGICAL));
+ }
}
else
{
- CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLDELETEPARTITION));
+ if (PartitionList->CurrentPartition->IsPartitioned)
+ {
+ if (IsContainerPartition(PartitionList->CurrentPartition->PartitionType))
+ {
+ CONSOLE_SetStatusText(MUIGetString(STRING_DELETEPARTITION));
+ }
+ else
+ {
+ CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLDELETEPARTITION));
+ }
+ }
+ else
+ {
+ CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLCREATEPARTITION));
+ }
}
CONSOLE_ConInKey(Ir);
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
{
- ScrollDownPartitionList(PartitionList);
+ if (ScrollDownPartitionList(PartitionList))
+ DrawPartitionList(PartitionList);
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP)) /* UP */
{
- ScrollUpPartitionList(PartitionList);
+ if (ScrollUpPartitionList(PartitionList))
+ DrawPartitionList(PartitionList);
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN) /* ENTER */
{
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'P') /* P */
{
- Error = PrimaryPartitionCreationChecks(PartitionList);
- if (Error != NOT_AN_ERROR)
+ if (PartitionList->CurrentPartition->LogicalPartition == FALSE)
{
- MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY);
- return SELECT_PARTITION_PAGE;
- }
+ Error = PrimaryPartitionCreationChecks(PartitionList);
+ if (Error != NOT_AN_ERROR)
+ {
+ MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY);
+ return SELECT_PARTITION_PAGE;
+ }
- return CREATE_PRIMARY_PARTITION_PAGE;
+ return CREATE_PRIMARY_PARTITION_PAGE;
+ }
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'E') /* E */
{
- Error = ExtendedPartitionCreationChecks(PartitionList);
- if (Error != NOT_AN_ERROR)
+ if (PartitionList->CurrentPartition->LogicalPartition == FALSE)
{
- MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY);
- return SELECT_PARTITION_PAGE;
+ Error = ExtendedPartitionCreationChecks(PartitionList);
+ if (Error != NOT_AN_ERROR)
+ {
+ MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY);
+ return SELECT_PARTITION_PAGE;
+ }
+
+ return CREATE_EXTENDED_PARTITION_PAGE;
}
+ }
+ else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'L') /* L */
+ {
+ if (PartitionList->CurrentPartition->LogicalPartition == TRUE)
+ {
+ Error = LogicalPartitionCreationChecks(PartitionList);
+ if (Error != NOT_AN_ERROR)
+ {
+ MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY);
+ return SELECT_PARTITION_PAGE;
+ }
- return CREATE_EXTENDED_PARTITION_PAGE;
+ return CREATE_LOGICAL_PARTITION_PAGE;
+ }
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'D') /* D */
{
}
+static PAGE_NUMBER
+CreateLogicalPartitionPage(PINPUT_RECORD Ir)
+{
+ PDISKENTRY DiskEntry;
+ PPARTENTRY PartEntry;
+ BOOLEAN Quit;
+ BOOLEAN Cancel;
+ CHAR InputBuffer[50];
+ ULONG MaxSize;
+ ULONGLONG PartSize;
+ ULONGLONG DiskSize;
+ ULONGLONG SectorCount;
+ PCHAR Unit;
+
+ if (PartitionList == NULL ||
+ PartitionList->CurrentDisk == NULL ||
+ PartitionList->CurrentPartition == NULL)
+ {
+ /* FIXME: show an error dialog */
+ return QUIT_PAGE;
+ }
+
+ DiskEntry = PartitionList->CurrentDisk;
+ PartEntry = PartitionList->CurrentPartition;
+
+ CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
+
+ CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_LOGICAL_PARTITION));
+
+ DiskSize = DiskEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector;
+#if 0
+ if (DiskSize >= 10737418240) /* 10 GB */
+ {
+ DiskSize = DiskSize / 1073741824;
+ Unit = MUIGetString(STRING_GB);
+ }
+ else
+#endif
+ {
+ DiskSize = DiskSize / 1048576;
+ if (DiskSize == 0)
+ DiskSize = 1;
+
+ Unit = MUIGetString(STRING_MB);
+ }
+
+ if (DiskEntry->DriverName.Length > 0)
+ {
+ CONSOLE_PrintTextXY(6, 10,
+ MUIGetString(STRING_HDINFOPARTCREATE),
+ DiskSize,
+ Unit,
+ DiskEntry->DiskNumber,
+ DiskEntry->Port,
+ DiskEntry->Bus,
+ DiskEntry->Id,
+ &DiskEntry->DriverName);
+ }
+ else
+ {
+ CONSOLE_PrintTextXY(6, 10,
+ MUIGetString(STRING_HDDINFOUNK1),
+ DiskSize,
+ Unit,
+ DiskEntry->DiskNumber,
+ DiskEntry->Port,
+ DiskEntry->Bus,
+ DiskEntry->Id);
+ }
+
+ CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE));
+
+#if 0
+ CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB",
+ PartitionList->CurrentPartition->SectorCount * DiskEntry->BytesPerSector / 1048576);
+#endif
+
+ CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION));
+
+ PartEntry = PartitionList->CurrentPartition;
+ while (TRUE)
+ {
+ MaxSize = (PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector) / 1048576; /* in MBytes (rounded) */
+
+ if (MaxSize > PARTITION_MAXSIZE)
+ MaxSize = PARTITION_MAXSIZE;
+
+ ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left, top, right, bottom */
+ MaxSize, InputBuffer, &Quit, &Cancel);
+
+ if (Quit == TRUE)
+ {
+ if (ConfirmQuit (Ir) == TRUE)
+ {
+ return QUIT_PAGE;
+ }
+ }
+ else if (Cancel == TRUE)
+ {
+ return SELECT_PARTITION_PAGE;
+ }
+ else
+ {
+ PartSize = atoi(InputBuffer);
+
+ if (PartSize < 1)
+ {
+ /* Too small */
+ continue;
+ }
+
+ if (PartSize > MaxSize)
+ {
+ /* Too large */
+ continue;
+ }
+
+ /* Convert to bytes */
+ if (PartSize == MaxSize)
+ {
+ /* Use all of the unpartitioned disk space */
+ SectorCount = PartEntry->SectorCount.QuadPart;
+ }
+ else
+ {
+ /* Calculate the sector count from the size in MB */
+ SectorCount = PartSize * 1048576 / DiskEntry->BytesPerSector;
+
+ /* But never get larger than the unpartitioned disk space */
+ if (SectorCount > PartEntry->SectorCount.QuadPart)
+ SectorCount = PartEntry->SectorCount.QuadPart;
+ }
+
+ DPRINT("Partition size: %I64u bytes\n", PartSize);
+
+ CreateLogicalPartition(PartitionList,
+ SectorCount);
+
+ return SELECT_PARTITION_PAGE;
+ }
+ }
+
+ return CREATE_LOGICAL_PARTITION_PAGE;
+}
+
+
static PAGE_NUMBER
DeletePartitionPage(PINPUT_RECORD Ir)
{
Page = CreateExtendedPartitionPage(&Ir);
break;
+ case CREATE_LOGICAL_PARTITION_PAGE:
+ Page = CreateLogicalPartitionPage(&Ir);
+ break;
+
case DELETE_PARTITION_PAGE:
Page = DeletePartitionPage(&Ir);
break;
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = \91« £ ¥ C = \91ꧤ ¢ ¥ ¤ï« F3 = \88§å®¤"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = \91« £ ¥ D = \88§âਢ ¥ ¤ï« F3 = \88§å®¤"},
{STRING_DELETEPARTITION,
// "\88§¡à «¨ á⥠¤ áꧤ ¤¥â¥ ®¢ ¤ï« "},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"\82ꢥ¤¥â¥ à §¬¥à ®¢¨ï ¤ï« (¢ ¬¥£ ¡ ©â¨)."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Instalovat C = Vytvoýit odd¡l F3 = Ukon\9fit"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Instalovat D = Odstranit odd¡l F3 = Ukon\9fit"},
{STRING_DELETEPARTITION,
// "Zvolili jste vytvoýen¡ nov\82ho odd¡lu na"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Zadejte velikost nov\82ho odd¡lu v megabajtech."},
{STRING_CREATEPARTITION,
"nutzbaren Setups.",
TEXT_STYLE_NORMAL
},
- {
+ {
6,
14,
"Die Reparaturfunktionen sind noch nicht implementiert.",
"Benutzen Sie die Entf-TASTE, um Zeichen zu l\94schen.",
TEXT_STYLE_NORMAL
},
- {
+ {
6,
17,
"Best\84tigen Sie die Eingabe mit der EINGABETASTE.",
{
//ERROR_UPDATE_DISPLAY_SETTINGS,
"Die Registrierungseintr\84ge der Anzeigeeinstellungen\n"
- "konnten nicht aktualisiert werden.",
+ "konnten nicht aktualisiert werden.",
"EINGABETASTER = Computer neu starten"
},
{
{
//ERROR_COPY_QUEUE,
"Die Liste mit den zu kopierenden Dateien\n"
- "konnte nicht gefunden werden.\n",
+ "konnte nicht gefunden werden.\n",
"EINGABETASTE = Computer neu starten"
},
{
" Bitte warten..."},
{STRING_INSTALLCREATEPARTITION,
" EINGABETASTE = Installieren P = Prim\84re E = Erweiterte F3 = Installation abbr."},
+ {STRING_INSTALLCREATELOGICAL,
+ " EINGABETASTE = Installieren L = Logisches Laufwerk F3 = Installation abbr."},
{STRING_INSTALLDELETEPARTITION,
" EINGABETASTE = Installieren D = Partition l\94schen F3 = Installation abbr."},
{STRING_DELETEPARTITION,
"Eine prim\84re Partition soll hier erstellt werden:"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"Eine erweiterte Partition soll hier erstellt werden:"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "Ein logisches Laufwerk soll hier erstellt werden:"},
{STRING_HDDSIZE,
"Bitte geben Sie die Gr\94áe der neuen Partition in Megabyte ein."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = \84\9a¡\98«á©«\98©\9e C = \83\9e£ ¦¬¨\9aå\98 Partition F3 = \80§¦®é¨\9e©\9e"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = \84\9a¡\98«á©«\98©\9e D = \83 \98\9a¨\98ã Partition F3 = \80§¦®é¨\9e©\9e"},
{STRING_DELETEPARTITION,
// "\84§ ¢â¥\98«\9c ¤\98 \9b\9e£ ¦¬¨\9aã©\9c«\9c â¤\98 ¤â¦ partition on"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"\8f\98¨\98¡\98¢é \9bé©«\9c «¦ £â\9a\9c\9f¦ª «¦¬ partition ©\9c megabytes."},
{STRING_CREATEPARTITION,
{
0,
0,
- "ENTER = Continue R = Repair L = Licence F3 = Quit",
+ "ENTER = Continue R = Repair L = License F3 = Quit",
TEXT_TYPE_STATUS | TEXT_PADDING_BIG
},
{
" Please wait..."},
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Install D = Delete Partition F3 = Quit"},
{STRING_DELETEPARTITION,
"You have chosen to create a primary partition on"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Please enter the size of the new partition in megabytes."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Instalar C = Crear Partici¢n F3 = Salir"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_DELETEPARTITION,
" D = Borrar Partici¢n F3 = Salir"},
{STRING_INSTALLDELETEPARTITION,
// "Ha elegido crear una nueva partici¢n en"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Por favor, introduzca el tama¤o de la nueva partici¢n en megabytes."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Paigalda C = Loo partitsioon F3 = V\84lju"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Paigalda D = Kustuta partitsioon F3 = V\84lju"},
{STRING_DELETEPARTITION,
// "Oled valinud kettale uue partitsiooni loomise"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Sisesta uue partitsiooni suurus megabaitides."},
{STRING_CREATEPARTITION,
" Veuillez patienter..."},
{STRING_INSTALLCREATEPARTITION,
" ENTR\90E = Installer P/E = Cr\82er Partition Primaire/\90tendue F3 = Quitter"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTR\90E = Installer D = Supprimer Partition F3 = Quitter"},
{STRING_DELETEPARTITION,
"Vous avez choisi de cr\82er une partition primaire sur"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"Vous avez choisi de cr\82er une partition \82tendue sur"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Veuillez entrer la taille de la nouvelle partition en m\82gaoctets."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = \84\9a\97\8f C = \96\85\98 \8e\87\89\96\84 F3 = \81\88\8c \84\9a\97\90\84"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = \84\9a\97\8f D = \8e\87\97 \8e\87\89\96\84 F3 = \81\88\8c \84\9a\97\90\84"},
{STRING_DELETEPARTITION,
"You have chosen to create a primary partition on"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Please enter the size of the new partition in megabytes."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " INVIO = Installa C = Crea Partizione F3 = Esci"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" INVIO = Installa D = Rimuovi Partizione F3 = Esci"},
{STRING_DELETEPARTITION,
// "Avete scelto di creare una nuova partizione su"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Indicare la dimensione della nuova partizione in megabyte."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = ²Ý½Ä°Ù C = Ê߰è¼®Ý »¸¾² F3 = Á³¼"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = ²Ý½Ä°Ù D = Ê߰è¼®Ý »¸¼Þ® F3 = Á³¼"},
{STRING_DELETEPARTITION,
// "±À×¼² Ê߰輮ݦ ·ÞÆ »¸¾²½Ù ºÄ¶Þ ¾ÝÀ¸ »ÚϼÀ:"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"±À×¼² Ê߰è¼®ÝÉ »²½Þ¦ Ò¶ÞÊÞ²Ä ÀݲÃÞ Æ³Ø®¸ ¼Ã¸ÀÞ»²¡"},
{STRING_CREATEPARTITION,
" Please wait..."},
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Install D = Delete Partition F3 = Quit"},
{STRING_DELETEPARTITION,
"You have chosen to create a primary partition on"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Please enter the size of the new partition in megabytes."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Installeren C = Partitie aanmaken F3 = Afsluiten"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Installeren D = Partitie verwijderen F3 = Afsluiten"},
{STRING_DELETEPARTITION,
// "U wilt een nieuwe partitie aanmaken op"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Voert u de grootte van de nieuwe partitie in in megabytes."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Instalacja C = Utworzenie Partycji F3 = Wyj\98cie"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Instalacja D = Skasowanie Partycji F3 = Wyj\98cie"},
{STRING_DELETEPARTITION,
// "Wybrane: utworzenie nowej partycji na"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Prosz© wprowadzi\86 rozmiar nowej partycji w megabajtach."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER=Instalar C=Criar parti\87Æo F3=Sair"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER=Instalar D=Apagar parti\87Æo F3=Sair"},
{STRING_DELETEPARTITION,
// "Voc\88 solicitou a cria\87Æo de uma nova parti\87Æo em"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Por favor, insira o tamanho da nova parti\87Æo em megabytes (MB)."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Instalare C = Creare partiîie F3 = Ieire"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Instalare D = ¸tergere partiîie F3 = Ieire"},
{STRING_DELETEPARTITION,
// "Aîi ales crearea unei noi partiîii pe"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Introduceîi mÇrimea noii partiîii \8cn megaocteîi."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = \93áâ ®¢¨âì C = \91®§¤ âì à §¤¥« F3 = \82ë室"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = \93áâ ®¢¨âì D = \93¤ «¨âì à §¤¥« F3 = \82ë室"},
{STRING_DELETEPARTITION,
// "\82ë å®â¨â¥ ᮧ¤ âì ®¢ë© à §¤¥« "},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"\8f®¦ «ã©áâ , ¢¢¥¤¨â¥ à §¬¥à ®¢®£® à §¤¥« ¢ ¬¥£ ¡ ©â å."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Inçtalova\9c C = Vytvori\9c oblas\9c F3 = Skon\9fi\9c"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Inçtalova\9c D = Odstr ni\9c oblas\9c F3 = Skon\9fi\9c"},
{STRING_DELETEPARTITION,
// "Zvolili ste vytvorenie novej oblasti na"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Zadajte, pros¡m, ve\96kos\9c novej oblasti v megabajtoch."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Instalo C = Krijo Particion F3 = Dil"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Instalo D = Fshi Particion F3 = Dil"},
{STRING_DELETEPARTITION,
"Ju keni zgjedhur p\89r t\89 krijuar nj\89 ndarje t\89 re n\89"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Ju lutem, jepini madh\89sin\89 e particionit t\89 ri n\89 megabajt."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = Installera C = Skapa Partition F3 = Avsluta"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = Installera D = Ta bort Partition F3 = Avsluta"},
{STRING_DELETEPARTITION,
// "Du har valt att skapa en ny partiton p\86"},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"V\84nligen skriv in storleken av den nya partitionen i megabytes."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " Giri\9f = Kur C = B\94l\81m Olu\9ftur F3 = \80\8dk\8d\9f"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" Giri\9f = Kur D = B\94l\81m\81 Sil F3 = \80\8dk\8d\9f"},
{STRING_DELETEPARTITION,
// "Yeni bir b\94l\81m olu\9fturmay\8d se\87tiniz."},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"Olu\9fturulacak b\94l\81m\81n b\81y\81kl\81§\81n\81 mega\87oklu olarak giriniz."},
{STRING_CREATEPARTITION,
{STRING_INSTALLCREATEPARTITION,
" ENTER = Install P = Create Primary E = Create Extended F3 = Quit"},
// " ENTER = \82áâ ®¢¨â¨ C = \91⢮à¨â¨ \90®§¤i« F3 = \82¨©â¨"},
+ {STRING_INSTALLCREATELOGICAL,
+ " ENTER = Install L = Create Logical Partition F3 = Quit"},
{STRING_INSTALLDELETEPARTITION,
" ENTER = \82áâ ®¢¨â¨ D = \82¨¤ «¨â¨ \90®§¤i« F3 = \82¨©â¨"},
{STRING_DELETEPARTITION,
// "\82¨ å®ç¥â¥ á⢮à¨â¨ ®¢¨© ஧¤i« "},
{STRING_CHOOSE_NEW_EXTENDED_PARTITION,
"You have chosen to create an extended partition on"},
+ {STRING_CHOOSE_NEW_LOGICAL_PARTITION,
+ "You have chosen to create a logical partition on"},
{STRING_HDDSIZE,
"\81ã¤ì-« ᪠, ¢¢¥¤iâì ஧¬ià ®¢®£® ஧¤i«ã ¢ ¬¥£ ¡ ©â å."},
{STRING_CREATEPARTITION,
#define STRING_PLEASEWAIT 1
#define STRING_INSTALLCREATEPARTITION 2
+#define STRING_INSTALLCREATELOGICAL 60
#define STRING_INSTALLDELETEPARTITION 3
#define STRING_DELETEPARTITION 59
#define STRING_PARTITIONSIZE 4
#define STRING_CHOOSENEWPARTITION 5
#define STRING_CHOOSE_NEW_EXTENDED_PARTITION 57
+#define STRING_CHOOSE_NEW_LOGICAL_PARTITION 61
#define STRING_HDDSIZE 6
#define STRING_CREATEPARTITION 7
#define STRING_PARTFORMAT 8
DumpPartitionTable(DiskEntry);
#endif
+ if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart != 0 &&
+ DiskEntry->LayoutBuffer->PartitionEntry[0].PartitionLength.QuadPart != 0 &&
+ DiskEntry->LayoutBuffer->PartitionEntry[0].PartitionType != 0)
+ {
+ if ((DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector) % DiskEntry->SectorsPerTrack == 0)
+ {
+ DPRINT1("Use %lu Sector alignment!\n", DiskEntry->SectorsPerTrack);
+ }
+ else if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart % 1048756 == 0)
+ {
+ DPRINT1("Use megabyte (%lu Sectors) alignment!\n", 1048756 / DiskEntry->BytesPerSector);
+ }
+ else
+ {
+ DPRINT1("No matching aligment found! Partiton 1 starts at %I64u\n", DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart);
+ }
+ }
+ else
+ {
+ DPRINT1("No valid partiton table found! Use megabyte (%lu Sectors) alignment!\n", 1048756 / DiskEntry->BytesPerSector);
+ }
+
+
if (DiskEntry->LayoutBuffer->PartitionCount == 0)
{
DiskEntry->NewDisk = TRUE;
}
-VOID
+BOOL
ScrollDownPartitionList(
PPARTLIST List)
{
-// PDISKENTRY DiskEntry;
+ PLIST_ENTRY DiskListEntry;
+ PLIST_ENTRY PartListEntry;
+ PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
-// PLIST_ENTRY Entry1;
- PLIST_ENTRY Entry2;
- /* Check for empty disks */
+ /* Fail, if no disks are available */
if (IsListEmpty(&List->DiskListHead))
- return;
+ return FALSE;
/* Check for next usable entry on current disk */
if (List->CurrentPartition != NULL)
{
- Entry2 = List->CurrentPartition->ListEntry.Flink;
- if (Entry2 != &List->CurrentDisk->PrimaryPartListHead)
+ if (List->CurrentPartition->LogicalPartition)
{
- PartEntry = CONTAINING_RECORD(Entry2, PARTENTRY, ListEntry);
+ /* Logical partition */
- List->CurrentPartition = PartEntry;
- DrawPartitionList(List);
- return;
- }
- }
+ PartListEntry = List->CurrentPartition->ListEntry.Flink;
+ if (PartListEntry != &List->CurrentDisk->LogicalPartListHead)
+ {
+ /* Next logical partition */
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
-#if 0
- /* Check for first usable entry on next disk */
- if (List->CurrentDisk != NULL)
- {
- Entry1 = List->CurrentDisk->ListEntry.Flink;
- while (Entry1 != &List->DiskListHead)
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
+ else
+ {
+ PartListEntry = List->CurrentDisk->ExtendedPartition->ListEntry.Flink;
+ if (PartListEntry != &List->CurrentDisk->PrimaryPartListHead)
+ {
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
+
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
+ }
+ }
+ else
{
- DiskEntry = CONTAINING_RECORD(Entry1, DISKENTRY, ListEntry);
+ /* Primary or extended partition */
- Entry2 = DiskEntry->PartListHead.Flink;
- if (Entry2 != &DiskEntry->PartListHead)
+ if (IsContainerPartition(List->CurrentPartition->PartitionType))
{
- PartEntry = CONTAINING_RECORD(Entry2, PARTENTRY, ListEntry);
+ /* First logical partition */
+ PartListEntry = List->CurrentDisk->LogicalPartListHead.Flink;
+ if (PartListEntry != &List->CurrentDisk->LogicalPartListHead)
+ {
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
- List->CurrentDisk = DiskEntry;
- List->CurrentPartition = PartEntry;
- DrawPartitionList(List);
- return;
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
}
+ else
+ {
+ /* Next primary partition */
+ PartListEntry = List->CurrentPartition->ListEntry.Flink;
+ if (PartListEntry != &List->CurrentDisk->PrimaryPartListHead)
+ {
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
- Entry1 = Entry1->Flink;
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
+ }
}
}
-#endif
+
+ /* Search for the first partition entry on the next disk */
+ DiskListEntry = List->CurrentDisk->ListEntry.Flink;
+ while (DiskListEntry != &List->DiskListHead)
+ {
+ DiskEntry = CONTAINING_RECORD(DiskListEntry, DISKENTRY, ListEntry);
+
+ PartListEntry = DiskEntry->PrimaryPartListHead.Flink;
+ if (PartListEntry != &DiskEntry->PrimaryPartListHead)
+ {
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
+
+ List->CurrentDisk = DiskEntry;
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
+
+ DiskListEntry = DiskListEntry->Flink;
+ }
+
+ return FALSE;
}
-VOID
+BOOL
ScrollUpPartitionList(
PPARTLIST List)
{
-// PDISKENTRY DiskEntry;
+ PLIST_ENTRY DiskListEntry;
+ PLIST_ENTRY PartListEntry;
+ PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
-// PLIST_ENTRY Entry1;
- PLIST_ENTRY Entry2;
- /* Check for empty disks */
+ /* Fail, if no disks are available */
if (IsListEmpty(&List->DiskListHead))
- return;
+ return FALSE;
- /* check for previous usable entry on current disk */
+ /* Check for previous usable entry on current disk */
if (List->CurrentPartition != NULL)
{
- Entry2 = List->CurrentPartition->ListEntry.Blink;
- if (Entry2 != &List->CurrentDisk->PrimaryPartListHead)
+ if (List->CurrentPartition->LogicalPartition)
{
- PartEntry = CONTAINING_RECORD(Entry2, PARTENTRY, ListEntry);
+ /* Logical partition */
+ PartListEntry = List->CurrentPartition->ListEntry.Blink;
+ if (PartListEntry != &List->CurrentDisk->LogicalPartListHead)
+ {
+ /* Previous logical partition */
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
+ }
+ else
+ {
+ /* Extended partition*/
+ PartEntry = List->CurrentDisk->ExtendedPartition;
+ }
List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
+ else
+ {
+ /* Primary or extended partition */
+
+ PartListEntry = List->CurrentPartition->ListEntry.Blink;
+ if (PartListEntry != &List->CurrentDisk->PrimaryPartListHead)
+ {
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
+
+ if (IsContainerPartition(PartEntry->PartitionType))
+ {
+ PartListEntry = List->CurrentDisk->LogicalPartListHead.Blink;
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
+ }
+
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
- /* Draw partition list and return */
- DrawPartitionList(List);
- return;
}
}
-#if 0
- /* check for last usable entry on previous disk */
- if (List->CurrentDisk != NULL)
+ /* Search for the last partition entry on the previous disk */
+ DiskListEntry = List->CurrentDisk->ListEntry.Blink;
+ while (DiskListEntry != &List->DiskListHead)
{
- Entry1 = List->CurrentDisk->ListEntry.Blink;
- while (Entry1 != &List->DiskListHead)
+ DiskEntry = CONTAINING_RECORD(DiskListEntry, DISKENTRY, ListEntry);
+
+ PartListEntry = DiskEntry->PrimaryPartListHead.Blink;
+ if (PartListEntry != &DiskEntry->PrimaryPartListHead)
{
- DiskEntry = CONTAINING_RECORD(Entry1, DISKENTRY, ListEntry);
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
- Entry2 = DiskEntry->PrimaryPartListHead.Blink;
- if (Entry2 != &DiskEntry->PrimaryPartListHead)
+ if (IsContainerPartition(PartEntry->PartitionType))
{
- PartEntry = CONTAINING_RECORD(Entry2, PARTENTRY, ListEntry);
+ PartListEntry = DiskEntry->LogicalPartListHead.Blink;
+ if (PartListEntry != &DiskEntry->LogicalPartListHead)
+ {
+ PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry);
+ List->CurrentDisk = DiskEntry;
+ List->CurrentPartition = PartEntry;
+ return TRUE;
+ }
+ }
+ else
+ {
List->CurrentDisk = DiskEntry;
List->CurrentPartition = PartEntry;
-
- /* Draw partition list and return */
- DrawPartitionList(List);
- return;
+ return TRUE;
}
-
- Entry1 = Entry1->Blink;
}
+
+ DiskListEntry = DiskListEntry->Blink;
}
-#endif
+
+ return FALSE;
}
}
+VOID
+CreateLogicalPartition(
+ PPARTLIST List,
+ ULONGLONG SectorCount)
+{
+// PDISKENTRY DiskEntry;
+ PPARTENTRY PartEntry;
+// PPARTENTRY NewPartEntry;
+
+ DPRINT1("CreateLogicalPartition(%I64u)\n", SectorCount);
+
+ if (List == NULL ||
+ List->CurrentDisk == NULL ||
+ List->CurrentPartition == NULL ||
+ List->CurrentPartition->IsPartitioned == TRUE)
+ {
+ return;
+ }
+
+// DiskEntry = List->CurrentDisk;
+ PartEntry = List->CurrentPartition;
+
+ DPRINT1("Current partition sector count: %I64u\n", PartEntry->SectorCount.QuadPart);
+}
+
+
VOID
DeleteCurrentPartition(
PPARTLIST List)
return ERROR_SUCCESS;
}
+
+ULONG
+LogicalPartitionCreationChecks(
+ IN PPARTLIST List)
+{
+// PDISKENTRY DiskEntry;
+ PPARTENTRY PartEntry;
+
+// DiskEntry = List->CurrentDisk;
+ PartEntry = List->CurrentPartition;
+
+ /* Fail if partition is already in use */
+ if (PartEntry->IsPartitioned == TRUE)
+ return ERROR_NEW_PARTITION;
+
+ return ERROR_SUCCESS;
+}
+
/* EOF */
SetMountedDeviceValues(
PPARTLIST List);
-VOID
+BOOL
ScrollDownPartitionList(
PPARTLIST List);
-VOID
+BOOL
ScrollUpPartitionList(
PPARTLIST List);
PPARTLIST List,
ULONGLONG PartitionSize);
+VOID
+CreateLogicalPartition(
+ PPARTLIST List,
+ ULONGLONG PartitionSize);
+
VOID
DeleteCurrentPartition(
PPARTLIST List);
ExtendedPartitionCreationChecks(
IN PPARTLIST List);
+ULONG
+LogicalPartitionCreationChecks(
+ IN PPARTLIST List);
+
/* EOF */
SELECT_PARTITION_PAGE,
CREATE_PRIMARY_PARTITION_PAGE,
CREATE_EXTENDED_PARTITION_PAGE,
+ CREATE_LOGICAL_PARTITION_PAGE,
DELETE_PARTITION_PAGE,
SELECT_FILE_SYSTEM_PAGE,
"ROS Explorer - command line options", MB_OK);
}
+ /*
+ * Set our shutdown parameters: we want to shutdown the very last,
+ * but before any TaskMgr instance (which has a shutdown level of 1).
+ */
+ SetProcessShutdownParameters(2, 0);
+
Thread* pSSOThread = NULL;
if (startup_desktop) {
break;
case WM_SIZE: {
-#ifdef __REACTOS__ ///@todo Work around to display rebar in ROS (with flickering) as long as the control isn't fixed
- int height = SendMessage(_hwndrebar, RB_GETBARHEIGHT, 0, 0);
- MoveWindow(_hwndrebar, 0, 0, LOWORD(lparam), height, TRUE);
-#else
- resize_frame(LOWORD(lparam), HIWORD(lparam));
- SendMessage(_hwndrebar, WM_SIZE, 0, 0);
-#endif
-
-
+ resize_frame(LOWORD(lparam), HIWORD(lparam));
+ SendMessage(_hwndrebar, WM_SIZE, 0, 0);
break;} // do not pass message to DefFrameProc
case WM_GETMINMAXINFO: {
extraBtns.iBitmap = 8;
SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);
}
-#ifndef __REACTOS__ // don't insert reg button for ROS. Regedit should be used.
+
// insert Registry button
extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Reg.\0"));
extraBtns.idCommand = ID_DRIVE_REGISTRY;
extraBtns.iBitmap = 9;
SendMessage(_hextrabar, TB_INSERTBUTTON, INT_MAX, (LPARAM)&extraBtns);
-#endif
#ifdef _DEBUG
// insert FAT direct file system access button
IDataObject* pDataObj;
STGMEDIUM medium = {0, {0}, 0};
- FORMATETC fmt = {g_Globals._cfStrFName, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
+ FORMATETC fmt = {(USHORT)g_Globals._cfStrFName, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
HRESULT hr = _folder->GetUIObjectOf(0, 1, &pidl, IID_IDataObject, 0, (LPVOID*)&pDataObj);
_entries[id] = qle;
- TBBUTTON btn = {0, 0, flags, BTNS_BUTTON|BTNS_NOPREFIX, {0, 0}, 0, 0};
+ TBBUTTON btn = {0, 0, (BYTE)flags, BTNS_BUTTON|BTNS_NOPREFIX, {0, 0}, 0, 0};
btn.idCommand = id;
btn.iBitmap = bmp_idx;
void QuickLaunchBar::UpdateDesktopButtons(int desktop_idx)
{
for(int i=0; i<DESKTOP_COUNT; ++i) {
- TBBUTTONINFO tbi = {sizeof(TBBUTTONINFO), TBIF_STATE, 0, 0, desktop_idx==i? TBSTATE_ENABLED|TBSTATE_PRESSED: TBSTATE_ENABLED};
+ TBBUTTONINFO tbi = {sizeof(TBBUTTONINFO), TBIF_STATE, 0, 0, (BYTE)(desktop_idx==i? TBSTATE_ENABLED|TBSTATE_PRESSED: TBSTATE_ENABLED)};
SendMessage(_hwnd, TB_SETBUTTONINFO, ID_SWITCH_DESKTOP_1+i, (LPARAM)&tbi);
}
/* Register event handler (used for system shutdown) */
SetConsoleCtrlHandler(ShutdownHandlerRoutine, TRUE);
+ /*
+ * Set our shutdown parameters: we want to shutdown after the maintained
+ * services (that inherit the default shutdown level of 640).
+ */
+ SetProcessShutdownParameters(480, SHUTDOWN_NORETRY);
+
/* Start auto-start services */
ScmAutoStartServices();
swenum.sys=,,,,,,,,,,,,4
ntdll.dll=,,,,,,,,,,,,2
wmilib.sys=,,,,,,,,,,,,4
+ksecdd.sys=,,,,,,,,,,,,4
[HardwareIdsDatabase]
;*PNP0A00 = isapnp
#=============================================================================
# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * 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.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+# nor the names of their contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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 THE COPYRIGHT
+# HOLDER 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.
#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
add_compile_flags("-Wno-error=unused-but-set-variable")
endif()
-add_compile_flags("-Wtype-limits -Wno-error=type-limits")
+add_compile_flags("-Wno-error=type-limits")
if(ARCH STREQUAL "amd64")
add_compile_flags("-Wno-format")
if(NOT MSVC)
allow_warnings(libtiff)
+ add_target_compile_flags(libtiff "-Wno-unused-but-set-variable")
endif()
#ifdef __i386__
#define ARCH_STRING "x86"
-#define GECKO_SHA "b4923c0565e6cbd20075a0d4119ce3b48424f962"
+#define GECKO_SHA "f6984567b24fef7b0be79837e04d3a913af1a88c"
#else
#define ARCH_STRING ""
#define GECKO_SHA "???"
* http://www.reactos.org
* IRC: irc.freenode.net #reactos-pl;
* UTF-8 conversion by Caemyr (May, 2011)
+ * Updated by Saibamen - Adam Stachowicz (saibamenppl@gmail.com) (April, 2014)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
- IDS_DOWNLOADING "Downloading..."
- IDS_INSTALLING "Installing..."
- IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation of corrupted file."
+ IDS_DOWNLOADING "Ściąganie..."
+ IDS_INSTALLING "Instalowanie..."
+ IDS_INVALID_SHA "Nieoczekiwana suma kontrolna ściągniętego pliku. Przerwanie instalacji uszkodzonego pliku."
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 "Instalator Wine Gecko"
FONT 8, "MS Shell Dlg"
BEGIN
- 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.",
+ CONTROL "ReactOS nie mógł znaleźć pakietu Wine Gecko, który jest potrzebny dla aplikacji osadzających kod HTML, aby mogły pracować w pełni. ReactOS może go automatycznie pobrać i zainstalować dla Ciebie.",
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 "&Instaluj", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "Anuluj", IDCANCEL, 144, 76, 50, 14, WS_GROUP | WS_TABSTOP
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 "Ustawienia zaawnsowane"
+CAPTION "Ustawienia zaawansowane"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", WS_VISIBLE | WS_BORDER, 7, 7, 232, 120
HKEY regKey;
BOOL DeleteMode = FALSE;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(DeleteMode);
+
if (RegOpenKeyEx(HKEY_CURRENT_USER,
_T("Control Panel\\Desktop"),
0,
LONG
CALLBACK
CPlApplet(HWND hwndCpl,
- UINT uMsg,
- LPARAM lParam1,
- LPARAM lParam2)
+ UINT uMsg,
+ LPARAM lParam1,
+ LPARAM lParam2)
{
- if (ODBCProc == NULL)
- {
- TCHAR szBuffer[MAX_PATH];
+ switch (uMsg)
+ {
+ case CPL_INIT:
+ return TRUE;
- if (ExpandEnvironmentStrings(_T("%systemroot%\\system32\\odbccp32.dll"),
- szBuffer,
- sizeof(szBuffer) / sizeof(TCHAR)) > 0)
- {
- hLibrary = LoadLibrary(szBuffer);
- if (hLibrary)
- {
- ODBCProc = (APPLET_PROC)GetProcAddress(hLibrary, "ODBCCPlApplet");
- }
- }
- }
+ case CPL_DBLCLK:
+ {
+ if (ODBCProc == NULL)
+ {
+ TCHAR szBuffer[MAX_PATH];
- if (ODBCProc)
- {
- return ODBCProc(hwndCpl, uMsg, lParam1, lParam2);
- }
- else
- {
- if(hLibrary)
- {
- FreeLibrary(hLibrary);
- }
+ if (ExpandEnvironmentStrings(_T("%systemroot%\\system32\\odbccp32.dll"),
+ szBuffer,
+ sizeof(szBuffer) / sizeof(TCHAR)) > 0)
+ {
+ hLibrary = LoadLibrary(szBuffer);
+ if (hLibrary)
+ {
+ ODBCProc = (APPLET_PROC)GetProcAddress(hLibrary, "ODBCCPlApplet");
+ }
+ }
+ }
- TerminateProcess(GetCurrentProcess(), -1);
- return (LONG)-1;
- }
+ if (ODBCProc)
+ {
+ return ODBCProc(hwndCpl, uMsg, lParam1, lParam2);
+ }
+ else
+ {
+ if (hLibrary)
+ {
+ FreeLibrary(hLibrary);
+ }
+
+ TerminateProcess(GetCurrentProcess(), -1);
+ return (LONG)-1;
+ }
+ }
+ }
+
+ return FALSE;
}
BOOL
WINAPI
DllMain(HINSTANCE hinstDLL,
- DWORD dwReason,
- LPVOID lpReserved)
+ DWORD dwReason,
+ LPVOID lpReserved)
{
- INITCOMMONCONTROLSEX InitControls;
- UNREFERENCED_PARAMETER(lpReserved);
-
- switch(dwReason)
- {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
+ INITCOMMONCONTROLSEX InitControls;
+ UNREFERENCED_PARAMETER(lpReserved);
- InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX);
- InitControls.dwICC = ICC_LISTVIEW_CLASSES | ICC_UPDOWN_CLASS | ICC_BAR_CLASSES;
- InitCommonControlsEx(&InitControls);
+ switch(dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ {
+ InitControls.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ InitControls.dwICC = ICC_LISTVIEW_CLASSES | ICC_UPDOWN_CLASS | ICC_BAR_CLASSES;
+ InitCommonControlsEx(&InitControls);
- hApplet = hinstDLL;
- break;
- }
+ hApplet = hinstDLL;
+ break;
+ }
+ }
- return TRUE;
+ return TRUE;
}
LTEXT "", IDC_MACHINELINE4, 130, 171, 118, 9
LTEXT "", IDC_MACHINELINE5, 130, 180, 118, 9
CONTROL "Visit the <A HREF=""http://www.reactos.org/"">ReactOS Homepage</A>", IDC_ROSHOMEPAGE_LINK, "SysLink", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 200, 140, 10
- PUSHBUTTON "View &licence...", IDC_LICENCE, 170, 199, 78, 13
+ PUSHBUTTON "View &license...", IDC_LICENCE, 170, 199, 78, 13
END
IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, 256, 218
END
IDD_LICENCE DIALOGEX 6, 5, 267, 159
-CAPTION "Licence"
+CAPTION "License"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
STYLE DS_SHELLFONT | WS_BORDER | WS_THICKFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
BEGIN
* Translated by Caemyr - Olaf Siejka (Mar 2012)
* http://www.reactos.org
* IRC: irc.freenode.net #reactos-pl;
+ * Updated by Saibamen and wojo664 (May 2014)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_CPLICON, IDI_CPLICON, 8, 0, 21, 20
- GROUPBOX "Shaders", -1, 5, 25, 230, 80
- LTEXT "Enable GLSL:", -1, 15, 42, 80, 10
+ GROUPBOX "Cieniowanie", -1, 5, 25, 230, 80
+ LTEXT "Włącz GLSL:", -1, 15, 42, 80, 10
COMBOBOX IDC_GLSL, 95, 40, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Maximum GS Level:", -1, 15, 57, 80, 10
+ LTEXT "Maksymalny poziom GS:", -1, 15, 57, 80, 10
COMBOBOX IDC_GSLEVEL, 95, 55, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Maximum PS Level:", -1, 15, 72, 80, 10
+ LTEXT "Maksymalny poziom PS:", -1, 15, 72, 80, 10
COMBOBOX IDC_PSLEVEL, 95, 70, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Maximum VS Level:", -1, 15, 87, 80, 10
+ LTEXT "Maksymalny poziom VS:", -1, 15, 87, 80, 10
COMBOBOX IDC_VSLEVEL, 95, 85, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- GROUPBOX "Rendering", -1, 5, 110, 230, 110
- LTEXT "Multisampling:", -1, 15, 127, 80, 10
+ GROUPBOX "Renderowanie", -1, 5, 110, 230, 110
+ LTEXT "Multipróbkowanie:", -1, 15, 127, 80, 10
COMBOBOX IDC_MULTISAMPLING, 95, 125, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Strict draw ordering:", -1, 15, 142, 80, 10
+ LTEXT "Ścisła kolejność rysowania:", -1, 15, 142, 80, 10
COMBOBOX IDC_STRICTDRAWORDERING, 95, 140, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Offscreen rendering:", -1, 15, 157, 80, 10
+ LTEXT "Renderowanie pozaekranowe:", -1, 15, 157, 80, 10
COMBOBOX IDC_OFFSCREEN, 95, 155, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Always offscreen:", -1, 15, 172, 72, 10, SS_LEFT
+ LTEXT "Zawsze pozaekranowo:", -1, 15, 172, 72, 10, SS_LEFT
COMBOBOX IDC_ALWAYSOFFSCREEN, 95, 170, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Video memory size:", -1, 15, 187, 72, 10, SS_LEFT
+ LTEXT "Rozmiar pamięci video:", -1, 15, 187, 72, 10, SS_LEFT
COMBOBOX IDC_VIDMEMSIZE, 95, 185, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "DirectDraw Renderer:", -1, 15, 202, 72, 10, SS_LEFT
+ LTEXT "Urządzenie renderujące DirectDraw:", -1, 15, 202, 72, 10, SS_LEFT
COMBOBOX IDC_DDRENDERER, 95, 200, 90, 10, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
END
-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)
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_importlibs(devenum advapi32 ole32 oleaut32 winmm user32 avicap32 shlwapi msvcrt kernel32 ntdll)
add_delay_importlibs(devenum msvfw32)
add_pch(devenum devenum_private.h SOURCE)
add_cd_file(TARGET devenum DESTINATION reactos/system32 FOR all)
#include <vfw.h>
#include <aviriff.h>
+#include <shlwapi.h>
#include "resource.h"
* or switched from pulseaudio to alsa, delete all old devices first
*/
if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_AudioRendererCategory, &basekey, path, MAX_PATH)))
- RegDeleteTreeW(basekey, path);
+ SHDeleteKeyW(basekey, path);
if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_AudioInputDeviceCategory, &basekey, path, MAX_PATH)))
- RegDeleteTreeW(basekey, path);
+ SHDeleteKeyW(basekey, path);
if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_VideoInputDeviceCategory, &basekey, path, MAX_PATH)))
- RegDeleteTreeW(basekey, path);
+ SHDeleteKeyW(basekey, path);
if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_MidiRendererCategory, &basekey, path, MAX_PATH)))
- RegDeleteTreeW(basekey, path);
+ SHDeleteKeyW(basekey, path);
if (SUCCEEDED(DEVENUM_GetCategoryKey(&CLSID_VideoCompressorCategory, &basekey, path, MAX_PATH)))
- RegDeleteTreeW(basekey, path);
+ SHDeleteKeyW(basekey, path);
rf2.dwVersion = 2;
rf2.dwMerit = MERIT_PREFERRED;
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
add_definitions(
-D__WINESRC__
-DENTRY_PREFIX=QUARTZ_
#include "quartz_private.h"
-#include <shlwapi.h>
-
static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 };
typedef struct AsyncReader
if (lRet != ERROR_SUCCESS)
hr = HRESULT_FROM_WIN32(lRet);
- lRet = RegDeleteTreeW(hKey, wszPins);
+ lRet = SHDeleteKeyW(hKey, wszPins);
if (lRet != ERROR_SUCCESS)
hr = HRESULT_FROM_WIN32(lRet);
strcatW(wszPinNameKey, wszSlash);
strcatW(wszPinNameKey, Name);
- lRet = RegDeleteTreeW(hKey, wszPinNameKey);
+ lRet = SHDeleteKeyW(hKey, wszPinNameKey);
hr = HRESULT_FROM_WIN32(lRet);
CoTaskMemFree(wszPinNameKey);
}
#include <dvdmedia.h>
#include <vfw.h>
#include <aviriff.h>
+#include <shlwapi.h>
#include <wine/strmbase.h>
#include <wine/unicode.h>
WCHAR buf[39];
StringFromGUID2(list->iid, buf, 39);
- res = RegDeleteTreeW(interface_key, buf);
+ res = SHDeleteKeyW(interface_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
}
WCHAR buf[39];
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(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);
+ res = SHDeleteKeyA(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);
+ res = SHDeleteKeyA(HKEY_CLASSES_ROOT, list->viprogid);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
if (res != ERROR_SUCCESS) break;
StringFromGUID2(list->subtype, buf, 39);
- res = RegDeleteTreeW(majortype_key, buf);
+ res = SHDeleteKeyW(majortype_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
/* Removed majortype key if there is no more subtype key */
res = ERROR_SUCCESS;
else if (res == ERROR_SUCCESS)
for (; res == ERROR_SUCCESS && list->majortype; ++list) {
- res = RegDeleteTreeA(extensions_root_key, list->extension);
+ res = SHDeleteKeyA(extensions_root_key, list->extension);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
}
VK_SNAPSHOT,
/* - 55 - */
/* Oddities, and the remaining standard F-Keys */
- VK_EMPTY, VK_OEM_102, VK_F11, VK_F12,
+ VK_EMPTY, VK_OEM_102, VK_F11, VK_F12,
/* - 59 - */
VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */
ROSDATA MODIFIERS modifier_bits = {
modifier_keys,
- 7,
- { 0, 1, 2, 0, 0, 0, 3, 0 }
- /* Modifier bit order: NONE, SHIFT, CTRL, SHIFT-CTRL, ALT (not used), SHIFT-ALT (not used), CTRL-ALT, SHIFT-CTRL-ALT */
+ 7, /* Modifier bit order */
+ {
+ 0, /* NONE */
+ 1, /* SHIFT */
+ 2, /* CTRL */
+ 0, /* SHIFT-CTRL (not used) */
+ 0, /* ALT (not used) */
+ 0, /* SHIFT-ALT (not used) */
+ 3, /* CTRL-ALT */
+ 0, /* SHIFT-CTRL-ALT (not used) */
+ }
+};
+/* ^ This table shows which column in any VK_TO_WCHARS* structure will be used on which modifier */
+
+ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
+ { VK_NUMPAD0, 0, {'0'} },
+ { VK_NUMPAD1, 0, {'1'} },
+ { VK_NUMPAD2, 0, {'2'} },
+ { VK_NUMPAD3, 0, {'3'} },
+ { VK_NUMPAD4, 0, {'4'} },
+ { VK_NUMPAD5, 0, {'5'} },
+ { VK_NUMPAD6, 0, {'6'} },
+ { VK_NUMPAD7, 0, {'7'} },
+ { VK_NUMPAD8, 0, {'8'} },
+ { VK_NUMPAD9, 0, {'9'} },
+ { VK_DECIMAL, 0, {','} },
+ { VK_BACK, 0, {'\010'} },
+ { 0, 0 }
};
ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
/* Keys that do not have shift states */
- { VK_TAB, 0, {'\t', '\t' } },
- { VK_ADD, 0, {'+', '+' } },
- { VK_SUBTRACT, 0, {'-', '-' } },
- { VK_MULTIPLY, 0, {'*', '*' } },
- { VK_DIVIDE, 0, {'/', '/' } },
- { VK_ESCAPE, 0, {0x1b, 0x1b} },
- { VK_SPACE, 0, {' ', ' ' } },
+ { VK_TAB, 0, { '\t', '\t' } },
+ { VK_ADD, 0, { '+', '+' } },
+ { VK_SUBTRACT, 0, { '-', '-' } },
+ { VK_MULTIPLY, 0, { '*', '*' } },
+ { VK_DIVIDE, 0, { '/', '/' } },
+ { VK_ESCAPE, 0, { 0x1b, 0x1b } },
+ { VK_SPACE, 0, { ' ', ' ' } },
{ 0, 0 }
};
{ VK_EMPTY, 0, { WCH_NONE, WCH_NONE, WCH_NONE, 0x00b4 } }, // 9 dead letter
{ '0', 0, { 0x00e9, '0', WCH_NONE, WCH_DEAD } }, // e with acute
{ VK_EMPTY, 0, { WCH_NONE, WCH_NONE, WCH_NONE, 0x02dd } }, // 0 dead letter
-
+
/* The misc */
{ VK_OEM_MINUS, 0, { '=', '%', WCH_NONE, WCH_DEAD } }, // diaeresis
{ VK_EMPTY, 0, { WCH_NONE, WCH_NONE, WCH_NONE, 0x00a8 } }, // VK_OEM_MINUS dead letter
{ VK_OEM_COMMA, 0, { ',', '?', WCH_NONE, '<' } },
{ VK_OEM_PERIOD, 0, { '.', ':', WCH_NONE, '>' } },
{ VK_OEM_2, 0, { '-', '_', WCH_NONE, '*' } },
-
+
/* The alphabet */
{ 'A', CAPLOK, {'a', 'A', 0x01, WCH_NONE } },
- { 'B', CAPLOK, {'b', 'B', 0x02, '{' } },
- { 'C', CAPLOK, {'c', 'C', 0x03, '&' } },
- { 'D', CAPLOK, {'d', 'D', 0x04, 0x0110 } },
- { 'E', CAPLOK, {'e', 'E', 0x05, 0x20AC } },
- { 'F', CAPLOK, {'f', 'F', 0x06, '[' } },
- { 'G', CAPLOK, {'g', 'G', 0x07, ']' } },
+ { 'B', CAPLOK, {'b', 'B', 0x02, '{' } },
+ { 'C', CAPLOK, {'c', 'C', 0x03, '&' } },
+ { 'D', CAPLOK, {'d', 'D', 0x04, 0x0110 } },
+ { 'E', CAPLOK, {'e', 'E', 0x05, 0x20AC } },
+ { 'F', CAPLOK, {'f', 'F', 0x06, '[' } },
+ { 'G', CAPLOK, {'g', 'G', 0x07, ']' } },
{ 'H', CAPLOK, {'h', 'H', 0x08, WCH_NONE } },
{ 'I', CAPLOK, {'i', 'I', 0x09, WCH_NONE } },
{ 'J', CAPLOK, {'j', 'J', 0x0a, WCH_NONE } },
- { 'K', CAPLOK, {'k', 'K', 0x0b, 0x0142 } },
- { 'L', CAPLOK, {'l', 'L', 0x0c, 0x0141 } },
+ { 'K', CAPLOK, {'k', 'K', 0x0b, 0x0142 } },
+ { 'L', CAPLOK, {'l', 'L', 0x0c, 0x0141 } },
{ 'M', CAPLOK, {'m', 'M', 0x0d, WCH_NONE } },
- { 'N', CAPLOK, {'n', 'N', 0x0e, '}' } },
+ { 'N', CAPLOK, {'n', 'N', 0x0e, '}' } },
{ 'O', CAPLOK, {'o', 'O', 0x0f, WCH_NONE } },
{ 'P', CAPLOK, {'p', 'P', 0x10, WCH_NONE } },
- { 'Q', CAPLOK, {'q', 'Q', 0x11, '\\' } },
+ { 'Q', CAPLOK, {'q', 'Q', 0x11, '\\' } },
{ 'R', CAPLOK, {'r', 'R', 0x12, WCH_NONE } },
- { 'S', CAPLOK, {'s', 'S', 0x13, WCH_NONE } },
+ { 'S', CAPLOK, {'s', 'S', 0x13, 0x0111 } },
{ 'T', CAPLOK, {'t', 'T', 0x14, WCH_NONE } },
{ 'U', CAPLOK, {'u', 'U', 0x15, WCH_NONE } },
- { 'V', CAPLOK, {'v', 'V', 0x16, '@' } },
- { 'W', CAPLOK, {'w', 'W', 0x17, '|' } },
- { 'X', CAPLOK, {'x', 'X', 0x18, '#' } },
+ { 'V', CAPLOK, {'v', 'V', 0x16, '@' } },
+ { 'W', CAPLOK, {'w', 'W', 0x17, '|' } },
+ { 'X', CAPLOK, {'x', 'X', 0x18, '#' } },
{ 'Y', CAPLOK, {'y', 'Y', 0x19, WCH_NONE } },
{ 'Z', CAPLOK, {'z', 'Z', 0x1a, WCH_NONE } },
{ 0, 0 }
};
-ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
- { VK_NUMPAD0, 0, {'0'} },
- { VK_NUMPAD1, 0, {'1'} },
- { VK_NUMPAD2, 0, {'2'} },
- { VK_NUMPAD3, 0, {'3'} },
- { VK_NUMPAD4, 0, {'4'} },
- { VK_NUMPAD5, 0, {'5'} },
- { VK_NUMPAD6, 0, {'6'} },
- { VK_NUMPAD7, 0, {'7'} },
- { VK_NUMPAD8, 0, {'8'} },
- { VK_NUMPAD9, 0, {'9'} },
- { VK_DECIMAL, 0, {','} },
- { VK_BACK, 0, {'\010'} },
- { 0, 0 }
-};
-
-#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
+#define vk_master(n, x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = {
- vk_master(1,keypad_numbers),
- vk_master(2,key_to_chars_2mod),
- vk_master(3,key_to_chars_3mod),
- vk_master(4,key_to_chars_4mod),
- { 0,0,0 }
+ vk_master(1, keypad_numbers),
+ vk_master(2, key_to_chars_2mod),
+ vk_master(3, key_to_chars_3mod),
+ vk_master(4, key_to_chars_4mod),
+ { 0, 0, 0 }
};
ROSDATA VSC_LPWSTR key_names[] = {
{ 0x47, L"Home" },
{ 0x48, L"Up" },
{ 0x49, L"Page Up" },
- { 0x4a, L"Left" },
+ /* { 0x4a, L"Left" },*/
+ { 0x4a, L"-" },
+ { 0x4b, L"Left" },
{ 0x4c, L"Center" },
{ 0x4d, L"Right" },
{ 0x4f, L"End" },
};
ROSDATA DEADKEY_LPWSTR dead_key_names[] = {
- L"\x00a1" L"hacek", // caron
- L"\x00b4" L"carka", // acute
- L"\x005e" L"krouzek", // ring
+ L"\x00a1" L"hacek", // caron
+ L"\x00b4" L"carka", // acute
+ L"\x005e" L"krouzek", // ring
NULL
};
VK_SNAPSHOT,
/* - 55 - */
/* Oddities, and the remaining standard F-Keys */
- VK_EMPTY, VK_EMPTY, VK_F11, VK_F12,
+ VK_EMPTY, VK_OEM_102, VK_F11, VK_F12,
/* - 59 - */
VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */
VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */
ROSDATA MODIFIERS modifier_bits = {
modifier_keys,
- 7,
- { 0, 1, 2, 0, 0, 0, 3, 0 }
- /* Modifier bit order: NONE, SHIFT, CTRL, SHIFT-CTRL, ALT (not used), SHIFT-ALT (not used), CTRL-ALT, SHIFT-CTRL-ALT */
+ 7, /* Modifier bit order */
+ {
+ 0, /* NONE */
+ 1, /* SHIFT */
+ 2, /* CTRL */
+ 0, /* SHIFT-CTRL (not used) */
+ 0, /* ALT (not used) */
+ 0, /* SHIFT-ALT (not used) */
+ 3, /* CTRL-ALT */
+ 4, /* SHIFT-CTRL-ALT */
+ }
+};
+/* ^ This table shows which column in any VK_TO_WCHARS* structure will be used on which modifier */
+
+ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
+ { VK_NUMPAD0, 0, {'0'} },
+ { VK_NUMPAD1, 0, {'1'} },
+ { VK_NUMPAD2, 0, {'2'} },
+ { VK_NUMPAD3, 0, {'3'} },
+ { VK_NUMPAD4, 0, {'4'} },
+ { VK_NUMPAD5, 0, {'5'} },
+ { VK_NUMPAD6, 0, {'6'} },
+ { VK_NUMPAD7, 0, {'7'} },
+ { VK_NUMPAD8, 0, {'8'} },
+ { VK_NUMPAD9, 0, {'9'} },
+ { VK_DECIMAL, 0, {','} },
+ { VK_BACK, 0, {'\010'} },
+ { 0, 0 }
};
ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = {
/* Keys that do not have shift states */
- { VK_TAB, 0, {'\t','\t'} },
- { VK_ADD, 0, {'+', '+'} },
- { VK_SUBTRACT, 0, {'-', '-'} },
- { VK_MULTIPLY, 0, {'*', '*'} },
- { VK_DIVIDE, 0, {'/', '/'} },
- { VK_OEM_2 ,0, {'-', '_'} },
- { VK_ESCAPE, 0, {0x1b,0x1b} },
- { VK_SPACE, 0, {' ', ' '} },
+ { VK_TAB, 0, { '\t', '\t' } },
+ { VK_ADD, 0, { '+', '+' } },
+ { VK_SUBTRACT, 0, { '-', '-' } },
+ { VK_MULTIPLY, 0, { '*', '*' } },
+ { VK_DIVIDE, 0, { '/', '/' } },
+ { VK_ESCAPE, 0, { 0x1b, 0x1b } },
+ { VK_SPACE, 0, { ' ', ' ' } },
{ 0, 0 }
};
ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = {
/* normal - shift - ctrl */
- /* The alphabet */
- { 'A', CAPLOK, {'a', 'A', 0x01} },
- { 'B', CAPLOK, {'b', 'B', 0x02} },
- { 'C', CAPLOK, {'c', 'C', 0x03} },
- { 'D', CAPLOK, {'d', 'D', 0x04} },
- { 'F', CAPLOK, {'f', 'F', 0x06} },
- { 'G', CAPLOK, {'g', 'G', 0x07} },
- { 'H', CAPLOK, {'h', 'H', 0x08} },
- { 'I', CAPLOK, {'i', 'I', 0x09} },
- { 'J', CAPLOK, {'j', 'J', 0x0a} },
- { 'K', CAPLOK, {'k', 'K', 0x0b} },
- { 'L', CAPLOK, {'l', 'L', 0x0c} },
- { 'M', CAPLOK, {'m', 'M', 0x0d} },
- { 'N', CAPLOK, {'n', 'N', 0x0e} },
- { 'O', CAPLOK, {'o', 'O', 0x0f} },
- { 'P', CAPLOK, {'p', 'P', 0x10} },
- { 'Q', CAPLOK, {'q', 'Q', 0x11} },
- { 'R', CAPLOK, {'r', 'R', 0x12} },
- { 'S', CAPLOK, {'s', 'S', 0x13} },
- { 'T', CAPLOK, {'t', 'T', 0x14} },
- { 'U', CAPLOK, {'u', 'U', 0x15} },
- { 'V', CAPLOK, {'v', 'V', 0x16} },
- { 'W', CAPLOK, {'w', 'W', 0x17} },
- { 'X', CAPLOK, {'x', 'X', 0x18} },
- { 'Y', CAPLOK, {'y', 'Y', 0x19} },
- { 'Z', CAPLOK, {'z', 'Z', 0x1a} },
/* Legacy (telnet-style) ascii escapes */
- { VK_RETURN, 0, {'\r', '\r', '\n'} },
+ { VK_RETURN, 0, {'\r', '\r', '\n' } },
{ 0,0 }
};
-ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = {
-/* Normal, shifted, control, Alt+Gr */
- { '1', 0, {'+', '1', WCH_NONE, '!' } },
- { '2', 0, {0x011b, '2', 0, '@' } }, // e with caron
- { '3', 0, {0x0161, '3', WCH_NONE, '#' } }, // s with caron
- { '4', 0, {0x010d, '4', WCH_NONE, '$' } }, // c with caron
- { '5', 0, {0x0159, '5', WCH_NONE, '%' } }, // r with caron
- { '6', 0, {0x017e, '6', 0x1e, '^' } }, // z with caron
- { '7', 0, {0x00fd, '7', WCH_NONE, '&' } }, // y with acute
- { '8', 0, {0x00e1, '8', WCH_NONE, '*' } }, // a with acute
- { '9', 0, {0x00ed, '9', WCH_NONE, '(' } }, // i with acute
- { '0', 0, {0x00e9, '0', WCH_NONE, ')' } }, // e with acute
- { VK_OEM_PLUS, 0, {WCH_DEAD, WCH_DEAD, WCH_NONE, '=' } }, // dead letters - acute, caron
- { VK_EMPTY, 0, {0x00b4, 0x02c7, WCH_NONE, WCH_NONE } }, // VK_OEM_PLUS death
- { VK_OEM_MINUS, 0, {'=', '%', 0x1f, '-' } },
- { VK_OEM_1, 0, {0x016f, '\"', WCH_NONE, ';' } }, // u with ring
- { VK_OEM_7, 0, {0x00a7, '!', WCH_NONE, 0x00a4 } }, // section sign
- { VK_OEM_4, 0, {0x00fa, '/', WCH_NONE, '[' } }, // u with acute
- { VK_OEM_5, 0, {WCH_DEAD, 0x2018, WCH_NONE, '\\' } }, // diaeresis, left single quotation mark
- { VK_EMPTY, 0, {0x00a8, WCH_NONE, WCH_NONE, WCH_NONE } }, // VK_OEM_5 death
- { VK_OEM_6, 0, {')', '(', WCH_NONE, ']' } },
- { VK_OEM_3, 0, {';', WCH_DEAD, WCH_NONE, '`' } }, // ring
- { VK_EMPTY, 0, {WCH_NONE, 0x00b0, WCH_NONE, WCH_NONE } }, // VK_OEM_3 death
- { VK_OEM_COMMA, 0, {',', '?', WCH_NONE, '<' } },
- { VK_OEM_PERIOD, 0, {'.', ':', WCH_NONE, '>' } },
- { 'E', CAPLOK, {'e', 'E', 0x05, 0x20AC } }, // symbol for euro (currency)
- { 0, 0 }
-};
+ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = {
+/* Normal, shifted, control, Alt+Gr, Sh+Alt+Gr */
+
+ /* The numbers */
+ { '1', 0, { '+', '1', WCH_NONE, '!', WCH_NONE } },
+ { '2', 0, { 0x011b, '2', 0, '@', WCH_NONE } }, // e with caron
+ { '3', 0, { 0x0161, '3', WCH_NONE, '#', WCH_NONE } }, // s with caron
+ { '4', 0, { 0x010d, '4', WCH_NONE, '$', WCH_NONE } }, // c with caron
+ { '5', 0, { 0x0159, '5', WCH_NONE, '%', WCH_NONE } }, // r with caron
+ { '6', 0, { 0x017e, '6', 0x1e, '^', WCH_NONE } }, // z with caron
+ { '7', 0, { 0x00fd, '7', WCH_NONE, '&', WCH_NONE } }, // y with acute
+ { '8', 0, { 0x00e1, '8', WCH_NONE, '*', WCH_NONE } }, // a with acute
+ { '9', 0, { 0x00ed, '9', WCH_NONE, '(', WCH_NONE } }, // i with acute
+ { '0', 0, { 0x00e9, '0', WCH_NONE, ')', WCH_NONE } }, // e with acute
+
+ /* The misc */
+ { VK_OEM_PLUS, 0, { WCH_DEAD, WCH_DEAD, WCH_NONE, '=', '+' } }, // dead letters - acute, caron
+ { VK_EMPTY, 0, { 0x00b4, 0x02c7, WCH_NONE, WCH_NONE, WCH_NONE } }, // VK_OEM_PLUS dead letter
+ { VK_OEM_MINUS, 0, { '=', '%', 0x1f, '-', '_' } },
+ { VK_OEM_1, 0, { 0x016f, '\"', WCH_NONE, ';', ':' } }, // u with ring
+ { VK_OEM_7, 0, { 0x00a7, '!', WCH_NONE, 0x00a4, WCH_DEAD } }, // section sign, currency sign
+ { VK_EMPTY, 0, { WCH_NONE, WCH_NONE, WCH_NONE, WCH_NONE, '^' } }, // VK_OEM_7 dead letter
+ { VK_OEM_4, 0, { 0x00fa, '/', WCH_NONE, '[', '{' } }, // u with acute
+ { VK_OEM_5, 0, { WCH_DEAD, 0x2018, WCH_NONE, '\\', '|' } }, // diaeresis, left single quotation mark
+ { VK_EMPTY, 0, { 0x00a8, WCH_NONE, WCH_NONE, WCH_NONE, WCH_NONE } }, // VK_OEM_5 dead letter
+ { VK_OEM_6, 0, { ')', '(', WCH_NONE, ']', '}' } },
+ { VK_OEM_3, 0, { ';', WCH_DEAD, WCH_NONE, '`', '~' } }, // ring
+ { VK_EMPTY, 0, { WCH_NONE, 0x00b0, WCH_NONE, WCH_NONE, WCH_NONE } }, // VK_OEM_3 dead letter
+ { VK_OEM_COMMA, 0, { ',', '?', WCH_NONE, '<', 0x00d7 } }, // multiplication sign
+ { VK_OEM_PERIOD, 0, { '.', ':', WCH_NONE, '>', 0x00f7 } }, // division sign
+ { VK_OEM_2, 0, { '-', '_', WCH_NONE, '/', '?' } },
+ { VK_OEM_102, 0, { '\\', '|', 0x1c/*FS*/, 0x00df, WCH_DEAD } }, // sharp s, double acute accent
+ { VK_EMPTY, 0, { WCH_NONE, WCH_NONE, WCH_NONE, WCH_NONE, 0x02dd } }, // VK_OEM_102 dead letter
-ROSDATA VK_TO_WCHARS1 keypad_numbers[] = {
- { VK_DECIMAL, 0, {','} },
- { VK_NUMPAD0, 0, {'0'} },
- { VK_NUMPAD1, 0, {'1'} },
- { VK_NUMPAD2, 0, {'2'} },
- { VK_NUMPAD3, 0, {'3'} },
- { VK_NUMPAD4, 0, {'4'} },
- { VK_NUMPAD5, 0, {'5'} },
- { VK_NUMPAD6, 0, {'6'} },
- { VK_NUMPAD7, 0, {'7'} },
- { VK_NUMPAD8, 0, {'8'} },
- { VK_NUMPAD9, 0, {'9'} },
- { VK_BACK, 0, {'\010'} },
+ /* The alphabet */
+ { 'A', CAPLOK, { 'a', 'A', 0x01, WCH_NONE, WCH_NONE } },
+ { 'B', CAPLOK, { 'b', 'B', 0x02, WCH_NONE, WCH_NONE } },
+ { 'C', CAPLOK, { 'c', 'C', 0x03, WCH_NONE, WCH_NONE } },
+ { 'D', CAPLOK, { 'd', 'D', 0x04, WCH_NONE, WCH_NONE } },
+ { 'E', CAPLOK, { 'e', 'E', 0x05, 0x20AC, WCH_NONE } }, // symbol for euro (currency)
+ { 'F', CAPLOK, { 'f', 'F', 0x06, WCH_NONE, WCH_NONE } },
+ { 'G', CAPLOK, { 'g', 'G', 0x07, WCH_NONE, WCH_NONE } },
+ { 'H', CAPLOK, { 'h', 'H', 0x08, WCH_NONE, WCH_NONE } },
+ { 'I', CAPLOK, { 'i', 'I', 0x09, WCH_NONE, WCH_NONE } },
+ { 'J', CAPLOK, { 'j', 'J', 0x0a, WCH_NONE, WCH_NONE } },
+ { 'K', CAPLOK, { 'k', 'K', 0x0b, WCH_NONE, WCH_NONE } },
+ { 'L', CAPLOK, { 'l', 'L', 0x0c, WCH_NONE, WCH_NONE } },
+ { 'M', CAPLOK, { 'm', 'M', 0x0d, WCH_NONE, WCH_NONE } },
+ { 'N', CAPLOK, { 'n', 'N', 0x0e, WCH_NONE, WCH_NONE } },
+ { 'O', CAPLOK, { 'o', 'O', 0x0f, WCH_NONE, WCH_NONE } },
+ { 'P', CAPLOK, { 'p', 'P', 0x10, WCH_NONE, WCH_NONE } },
+ { 'Q', CAPLOK, { 'q', 'Q', 0x11, WCH_NONE, WCH_NONE } },
+ { 'R', CAPLOK, { 'r', 'R', 0x12, WCH_NONE, WCH_NONE } },
+ { 'S', CAPLOK, { 's', 'S', 0x13, WCH_NONE, WCH_NONE } },
+ { 'T', CAPLOK, { 't', 'T', 0x14, WCH_NONE, WCH_NONE } },
+ { 'U', CAPLOK, { 'u', 'U', 0x15, WCH_NONE, WCH_NONE } },
+ { 'V', CAPLOK, { 'v', 'V', 0x16, WCH_NONE, WCH_NONE } },
+ { 'W', CAPLOK, { 'w', 'W', 0x17, WCH_NONE, WCH_NONE } },
+ { 'X', CAPLOK, { 'x', 'X', 0x18, WCH_NONE, WCH_NONE } },
+ { 'Y', CAPLOK, { 'y', 'Y', 0x19, WCH_NONE, WCH_NONE } },
+ { 'Z', CAPLOK, { 'z', 'Z', 0x1a, WCH_NONE, WCH_NONE } },
{ 0, 0 }
};
-#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
+#define vk_master(n, x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) }
ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = {
- vk_master(1,keypad_numbers),
- vk_master(2,key_to_chars_2mod),
- vk_master(3,key_to_chars_3mod),
- vk_master(4,key_to_chars_4mod),
- { 0,0,0 }
+ vk_master(1, keypad_numbers),
+ vk_master(2, key_to_chars_2mod),
+ vk_master(3, key_to_chars_3mod),
+ vk_master(5, key_to_chars_5mod),
+ { 0, 0, 0 }
};
ROSDATA VSC_LPWSTR key_names[] = {
{ 0x47, L"Home" },
{ 0x48, L"Up" },
{ 0x49, L"Page Up" },
- { 0x4a, L"Left" },
+ /* { 0x4a, L"Left" },*/
+ { 0x4a, L"-" },
+ { 0x4b, L"Left" },
{ 0x4c, L"Center" },
{ 0x4d, L"Right" },
{ 0x4f, L"End" },
{ DEADTRANS(0x0075, 0x00a8, 0x00fc, 0x0000) }, // u with diaeresis
{ DEADTRANS(0x0020, 0x00a8, 0x00a8, 0x0000) }, // space > diaeresis
- { DEADTRANS(0x0055, 0x00b0, 0x016e, 0x0000) }, // U with round
- { DEADTRANS(0x0075, 0x00b0, 0x016f, 0x0000) }, // u with round
- { DEADTRANS(0x0020, 0x00b0, 0x00b0, 0x0000) }, // space > round
+ { DEADTRANS(0x0055, 0x00b0, 0x016e, 0x0000) }, // U with ring
+ { DEADTRANS(0x0075, 0x00b0, 0x016f, 0x0000) }, // u with ring
+ { DEADTRANS(0x0020, 0x00b0, 0x00b0, 0x0000) }, // space > ring
{ 0, 0, 0 },
};
ROSDATA DEADKEY_LPWSTR dead_key_names[] = {
- L"\x00a1" L"hacek", // caron
- L"\x00b4" L"carka", // acute
- L"\x005e" L"krouzek", // round
+ L"\x00a1" L"hacek", // caron
+ L"\x00b4" L"carka", // acute
+ L"\x005e" L"krouzek", // ring
NULL
};
/* character from vk tables */
vk_to_wchar_master_table,
- /* diacritical marks -- */
+ /* diacritical marks */
dead_key,
/* Key names */
PKBDTABLES WINAPI KbdLayerDescriptor(VOID) {
return &keyboard_layout_table;
}
-
#include <winbase.h>
#include <winreg.h>
#include <winuser.h>
+#include <dpfilter.h>
#define NTOS_MODE_USER
#include <ndk/cmfuncs.h>
#include <ndk/exfuncs.h>
#include <ndk/iofuncs.h>
-#include <ndk/kdtypes.h>
#include <ndk/kefuncs.h>
#include <ndk/ldrfuncs.h>
#include <ndk/mmfuncs.h>
PTEB Teb = NtCurrentTeb();
/* Initialize the strings */
+ RtlInitEmptyUnicodeString(&DllString1, StringBuffer, sizeof(StringBuffer));
RtlInitEmptyUnicodeString(&DllString2, NULL, 0);
- DllString1.Buffer = StringBuffer;
- DllString1.Length = 0;
- DllString1.MaximumLength = sizeof(StringBuffer);
/* Check if the SxS Assemblies specify another file */
Status = RtlDosApplyFileIsolationRedirection_Ustr(TRUE,
(Status != STATUS_OBJECT_NAME_NOT_FOUND) &&
(Status != STATUS_DLL_INIT_FAILED))
{
- // 85 == DPFLTR_LDR_ID;
- DbgPrintEx(85,
+ DbgPrintEx(DPFLTR_LDR_ID,
DPFLTR_WARNING_LEVEL,
"LDR: %s - failing because LdrpLoadDll(%wZ) returned status %x\n",
__FUNCTION__,
}
/* Nothing found */
- // 85 == DPFLTR_LDR_ID;
- DbgPrintEx(85, DPFLTR_WARNING_LEVEL, "LDR: %s() exiting 0x%08lx\n", __FUNCTION__, STATUS_NO_MORE_ENTRIES);
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_WARNING_LEVEL,
+ "LDR: %s() exiting 0x%08lx\n",
+ __FUNCTION__,
+ STATUS_NO_MORE_ENTRIES);
return STATUS_NO_MORE_ENTRIES;
}
if (!NT_SUCCESS(Status))
{
/* Exit */
- DbgPrintEx(51, // DPFLTR_SXS_ID
+ DbgPrintEx(DPFLTR_SXS_ID,
DPFLTR_WARNING_LEVEL,
"LDR: RtlGetActiveActivationContext() failed; ntstatus = "
"0x%08lx\n",
if (!NT_SUCCESS(Status) && (Status != STATUS_DLL_NOT_FOUND))
{
/* Failure */
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - call to LdrpCheckForKnownDll(\"%ws\", ...) failed with status %x\n",
__FUNCTION__,
DllName,
/* Display debug output if snaps are on */
if (ShowSnaps)
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Expanding full name of %wZ\n",
__FUNCTION__,
OriginalName);
/* Check which output to use -- failure or success */
if (NT_SUCCESS(Status))
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Expanded to %wZ\n",
__FUNCTION__,
*ExpandedName);
}
else
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Failed to expand %wZ; 0x%08x\n",
__FUNCTION__,
OriginalName,
/* Display debug output if snaps are on */
if (ShowSnaps)
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Looking for %ws in %ws\n",
__FUNCTION__,
DllName,
/* FIXME: Handle relative case semicolon-lookup here */
/* Calculate length */
- Length += (ULONG)wcslen(DllName) + sizeof(UNICODE_NULL);
+ Length += (ULONG)wcslen(DllName) + 1;
if (Length > UNICODE_STRING_MAX_CHARS)
{
/* Too long, fail */
/* Display debug output if snaps are on */
if (ShowSnaps)
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Looking for %ws\n",
__FUNCTION__,
Buffer);
/* Check which output to use -- failure or success */
if (NT_SUCCESS(Status))
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Returning %wZ\n",
__FUNCTION__,
*ExpandedName);
}
else
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Unable to locate %ws in %ws: 0x%08x\n",
__FUNCTION__,
DllName,
sizeof(NameBuffer))
{
/* No space to add the extension */
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Dll name missing extension; with extension "
"added the name is too long\n"
" DllName: (@ %p) \"%wZ\"\n"
root = RtlImageDirectoryEntryToData( BaseAddress, TRUE, IMAGE_DIRECTORY_ENTRY_RESOURCE, &size );
if (!root) return STATUS_RESOURCE_DATA_NOT_FOUND;
+ if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND;
resdirptr = root;
if (!level--) goto done;
#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/texobj.h"
#include "main/texstore.h"
#include "main/bufferobj.h"
-#include "main/texturebarrier.h"
#include "tnl/tnl.h"
#include "swrast/swrast.h"
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;
/* 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->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;
#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"
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;
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()
{
GLuint ArrayObj;
GLuint VBO;
- GLuint ShaderProg;
GLint ColorLocation;
- GLuint IntegerShaderProg;
GLint IntegerColorLocation;
};
/** 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.
{
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
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);
}
}
- 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;
}
}
- 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 ||
}
-/**
- * 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().
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,
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);
-}
#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_CLIP 0x8000
#define MESA_META_SELECT_FEEDBACK 0x10000
GLint x, GLint y,
GLsizei width, GLsizei height);
-extern 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);
-
#endif /* META_H */
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
getstring.c
hash.c
hint.c
- #histogram.c
image.c
imports.c
light.c
texstate.c
texstorage.c
texstore.c
- texturebarrier.c
varray.c
version.c
viewport.c
add_pch(mesa_main precomp.h SOURCE)
if(NOT MSVC)
allow_warnings(mesa_main)
+ add_target_compile_flags(mesa_main "-Wno-type-limits")
endif()
};
/* Note: _gloffset_* for these may not be a compile-time constant. */
-static int SecondaryColorFuncs[NUM_TYPES];
static int FogCoordFuncs[NUM_TYPES];
if (ctx->aelt_context)
return GL_TRUE;
- /* These _gloffset_* values may not be compile-time constants */
- SecondaryColorFuncs[0] = _gloffset_SecondaryColor3bvEXT;
- SecondaryColorFuncs[1] = _gloffset_SecondaryColor3ubvEXT;
- SecondaryColorFuncs[2] = _gloffset_SecondaryColor3svEXT;
- SecondaryColorFuncs[3] = _gloffset_SecondaryColor3usvEXT;
- SecondaryColorFuncs[4] = _gloffset_SecondaryColor3ivEXT;
- SecondaryColorFuncs[5] = _gloffset_SecondaryColor3uivEXT;
- SecondaryColorFuncs[6] = _gloffset_SecondaryColor3fvEXT;
- SecondaryColorFuncs[7] = _gloffset_SecondaryColor3dvEXT;
-
FogCoordFuncs[0] = -1;
FogCoordFuncs[1] = -1;
FogCoordFuncs[2] = -1;
AEcontext *actx = AE_CONTEXT(ctx);
AEarray *aa = actx->arrays;
AEattrib *at = actx->attribs;
- struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
actx->nr_vbos = 0;
/* conventional vertex arrays */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX];
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
+ aa->array = &ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX];
aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG];
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
+ aa->array = &ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG];
aa->offset = _gloffset_EdgeFlagv;
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL];
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
+ aa->array = &ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL];
aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0];
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR].Enabled) {
+ aa->array = &ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR];
aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1];
- aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)];
- check_vbo(actx, aa->array->BufferObj);
- aa++;
- }
- if (arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_FOG];
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
+ aa->array = &ctx->Array.VertexAttrib[VERT_ATTRIB_FOG];
aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
{
- struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX];
+ struct gl_client_array *attribArray = &ctx->Array.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.
}
/* finally, vertex position */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) {
- aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_POS];
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Enabled) {
+ aa->array = &ctx->Array.VertexAttrib[VERT_ATTRIB_POS];
aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
check_vbo(actx, aa->array->BufferObj);
aa++;
}
- check_vbo(actx, arrayObj->ElementArrayBufferObj);
+ check_vbo(actx, ctx->Array.ElementArrayBufferObj);
ASSERT(at - actx->attribs <= VERT_ATTRIB_MAX);
ASSERT(aa - actx->arrays < 32);
#include <precomp.h>
-#include "histogram.h"
-
#if FEATURE_GL
SET_ReadPixels(exec, _mesa_ReadPixels);
SET_Rotated(exec, _mesa_Rotated);
SET_Scaled(exec, _mesa_Scaled);
- SET_SecondaryColorPointerEXT(exec, _mesa_SecondaryColorPointerEXT);
SET_TexEnvf(exec, _mesa_TexEnvf);
SET_TexEnviv(exec, _mesa_TexEnviv);
SET_VertexPointer(exec, _mesa_VertexPointer);
#endif
- /* 1.2 */
-#if _HAVE_FULL_GL
- SET_CopyTexSubImage3D(exec, _mesa_CopyTexSubImage3D);
- SET_TexImage3D(exec, _mesa_TexImage3D);
- SET_TexSubImage3D(exec, _mesa_TexSubImage3D);
-#endif
-
- /* OpenGL 1.2 GL_ARB_imaging */
- SET_BlendColor(exec, _mesa_BlendColor);
- SET_BlendEquation(exec, _mesa_BlendEquation);
- SET_BlendEquationSeparateEXT(exec, _mesa_BlendEquationSeparateEXT);
-
- _mesa_init_colortable_dispatch(exec);
- _mesa_init_convolve_dispatch(exec);
- _mesa_init_histogram_dispatch(exec);
-
- /* 2. GL_EXT_blend_color */
-#if 0
-/* SET_BlendColorEXT(exec, _mesa_BlendColorEXT); */
-#endif
-
/* 3. GL_EXT_polygon_offset */
#if _HAVE_FULL_GL
SET_PolygonOffsetEXT(exec, _mesa_PolygonOffsetEXT);
#endif
- /* 6. GL_EXT_texture3d */
-#if 0
-/* SET_CopyTexSubImage3DEXT(exec, _mesa_CopyTexSubImage3D); */
-/* SET_TexImage3DEXT(exec, _mesa_TexImage3DEXT); */
-/* SET_TexSubImage3DEXT(exec, _mesa_TexSubImage3D); */
-#endif
-
- /* 11. GL_EXT_histogram */
-#if 0
- SET_GetHistogramEXT(exec, _mesa_GetHistogram);
- SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
- SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
- SET_GetMinmaxEXT(exec, _mesa_GetMinmax);
- SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv);
- SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
-#endif
-
- /* 14. SGI_color_table */
-#if 0
- SET_ColorTableSGI(exec, _mesa_ColorTable);
- SET_ColorSubTableSGI(exec, _mesa_ColorSubTable);
- SET_GetColorTableSGI(exec, _mesa_GetColorTable);
- SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
- SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
-#endif
-
/* 30. GL_EXT_vertex_array */
#if _HAVE_FULL_GL
SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT);
SET_VertexPointerEXT(exec, _mesa_VertexPointerEXT);
#endif
- /* 37. GL_EXT_blend_minmax */
-#if 0
- SET_BlendEquationEXT(exec, _mesa_BlendEquationEXT);
-#endif
-
/* 54. GL_EXT_point_parameters */
#if _HAVE_FULL_GL
SET_PointParameterfEXT(exec, _mesa_PointParameterf);
SET_UnlockArraysEXT(exec, _mesa_UnlockArraysEXT);
#endif
- /* 173. GL_INGR_blend_func_separate */
-#if _HAVE_FULL_GL
- SET_BlendFuncSeparateEXT(exec, _mesa_BlendFuncSeparateEXT);
-#endif
-
/* 197. GL_MESA_window_pos */
/* part of _mesa_init_rastpos_dispatch(exec); */
SET_MultiModeDrawElementsIBM(exec, _mesa_MultiModeDrawElementsIBM);
#endif
- /* 233. GL_NV_vertex_program */
-#if FEATURE_NV_vertex_program
- SET_ExecuteProgramNV(exec, _mesa_ExecuteProgramNV);
- SET_GenProgramsNV(exec, _mesa_GenPrograms);
- SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV);
- SET_RequestResidentProgramsNV(exec, _mesa_RequestResidentProgramsNV);
- SET_GetProgramParameterfvNV(exec, _mesa_GetProgramParameterfvNV);
- SET_GetProgramParameterdvNV(exec, _mesa_GetProgramParameterdvNV);
- SET_GetProgramivNV(exec, _mesa_GetProgramivNV);
- SET_GetTrackMatrixivNV(exec, _mesa_GetTrackMatrixivNV);
- SET_LoadProgramNV(exec, _mesa_LoadProgramNV);
- SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB); /* alias to ProgramParameter4dNV */
- SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB); /* alias to ProgramParameter4dvNV */
- SET_ProgramEnvParameter4fARB(exec, _mesa_ProgramEnvParameter4fARB); /* alias to ProgramParameter4fNV */
- SET_ProgramEnvParameter4fvARB(exec, _mesa_ProgramEnvParameter4fvARB); /* alias to ProgramParameter4fvNV */
- SET_ProgramParameters4dvNV(exec, _mesa_ProgramParameters4dvNV);
- SET_ProgramParameters4fvNV(exec, _mesa_ProgramParameters4fvNV);
- SET_TrackMatrixNV(exec, _mesa_TrackMatrixNV);
- /* glVertexAttrib*NV functions handled in api_loopback.c */
-#endif
-
- /* 273. GL_APPLE_vertex_array_object */
- SET_BindVertexArrayAPPLE(exec, _mesa_BindVertexArrayAPPLE);
- SET_DeleteVertexArraysAPPLE(exec, _mesa_DeleteVertexArraysAPPLE);
- SET_GenVertexArraysAPPLE(exec, _mesa_GenVertexArraysAPPLE);
- SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE);
-
- /* 282. GL_NV_fragment_program */
-#if FEATURE_NV_fragment_program
- SET_ProgramNamedParameter4fNV(exec, _mesa_ProgramNamedParameter4fNV);
- SET_ProgramNamedParameter4dNV(exec, _mesa_ProgramNamedParameter4dNV);
- SET_ProgramNamedParameter4fvNV(exec, _mesa_ProgramNamedParameter4fvNV);
- SET_ProgramNamedParameter4dvNV(exec, _mesa_ProgramNamedParameter4dvNV);
- SET_GetProgramNamedParameterfvNV(exec, _mesa_GetProgramNamedParameterfvNV);
- SET_GetProgramNamedParameterdvNV(exec, _mesa_GetProgramNamedParameterdvNV);
-#endif
-
/* 262. GL_NV_point_sprite */
#if _HAVE_FULL_GL
SET_PointParameteriNV(exec, _mesa_PointParameteri);
SET_FlushMappedBufferRange(exec, _mesa_FlushMappedBufferRange);
#endif
- /* GL_ARB_vertex_array_object */
- SET_BindVertexArray(exec, _mesa_BindVertexArray);
- SET_GenVertexArrays(exec, _mesa_GenVertexArrays);
-
-#if FEATURE_APPLE_object_purgeable
- SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE);
- SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE);
- SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE);
-#endif
-
/* GL_EXT_texture_integer */
SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
SET_TexParameterIivEXT(exec, _mesa_TexParameterIiv);
SET_TexParameterIuivEXT(exec, _mesa_TexParameterIuiv);
- /* GL 3.0 (functions not covered by other extensions) */
- SET_GetStringi(exec, _mesa_GetStringi);
-
- /* GL_NV_texture_barrier */
- SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV);
-
/* GL_ARB_texture_storage */
SET_TexStorage1D(exec, _mesa_TexStorage1D);
SET_TexStorage2D(exec, _mesa_TexStorage2D);
#define RECTF(a,b,c,d) CALL_Rectf(GET_DISPATCH(), (a,b,c,d))
#define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
-#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
#define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x))
#define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y))
RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]);
}
-static void GLAPIENTRY
-loopback_SecondaryColor3bEXT_f( GLbyte red, GLbyte green, GLbyte blue )
-{
- SECONDARYCOLORF( BYTE_TO_FLOAT(red),
- BYTE_TO_FLOAT(green),
- BYTE_TO_FLOAT(blue) );
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3dEXT_f( GLdouble red, GLdouble green, GLdouble blue )
-{
- SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue );
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3iEXT_f( GLint red, GLint green, GLint blue )
-{
- SECONDARYCOLORF( INT_TO_FLOAT(red),
- INT_TO_FLOAT(green),
- INT_TO_FLOAT(blue));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3sEXT_f( GLshort red, GLshort green, GLshort blue )
-{
- SECONDARYCOLORF(SHORT_TO_FLOAT(red),
- SHORT_TO_FLOAT(green),
- SHORT_TO_FLOAT(blue));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3uiEXT_f( GLuint red, GLuint green, GLuint blue )
-{
- SECONDARYCOLORF(UINT_TO_FLOAT(red),
- UINT_TO_FLOAT(green),
- UINT_TO_FLOAT(blue));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3usEXT_f( GLushort red, GLushort green, GLushort blue )
-{
- SECONDARYCOLORF(USHORT_TO_FLOAT(red),
- USHORT_TO_FLOAT(green),
- USHORT_TO_FLOAT(blue));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3ubEXT_f( GLubyte red, GLubyte green, GLubyte blue )
-{
- SECONDARYCOLORF(UBYTE_TO_FLOAT(red),
- UBYTE_TO_FLOAT(green),
- UBYTE_TO_FLOAT(blue));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3bvEXT_f( const GLbyte *v )
-{
- SECONDARYCOLORF(BYTE_TO_FLOAT(v[0]),
- BYTE_TO_FLOAT(v[1]),
- BYTE_TO_FLOAT(v[2]));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3dvEXT_f( const GLdouble *v )
-{
- SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
-}
-static void GLAPIENTRY
-loopback_SecondaryColor3ivEXT_f( const GLint *v )
-{
- SECONDARYCOLORF(INT_TO_FLOAT(v[0]),
- INT_TO_FLOAT(v[1]),
- INT_TO_FLOAT(v[2]));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3svEXT_f( const GLshort *v )
-{
- SECONDARYCOLORF(SHORT_TO_FLOAT(v[0]),
- SHORT_TO_FLOAT(v[1]),
- SHORT_TO_FLOAT(v[2]));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3uivEXT_f( const GLuint *v )
-{
- SECONDARYCOLORF(UINT_TO_FLOAT(v[0]),
- UINT_TO_FLOAT(v[1]),
- UINT_TO_FLOAT(v[2]));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3usvEXT_f( const GLushort *v )
-{
- SECONDARYCOLORF(USHORT_TO_FLOAT(v[0]),
- USHORT_TO_FLOAT(v[1]),
- USHORT_TO_FLOAT(v[2]));
-}
-
-static void GLAPIENTRY
-loopback_SecondaryColor3ubvEXT_f( const GLubyte *v )
-{
- SECONDARYCOLORF(UBYTE_TO_FLOAT(v[0]),
- UBYTE_TO_FLOAT(v[1]),
- UBYTE_TO_FLOAT(v[2]));
-}
-
/*
* GL_NV_vertex_program:
}
-static void GLAPIENTRY
-loopback_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib1svNV(index + i, v + i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- ATTRIB1NV(index + i, v[i]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib1dvNV(index + i, v + i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib2svNV(index + i, v + 2 * i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib2dvNV(index + i, v + 2 * i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib3svNV(index + i, v + 3 * i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib3dvNV(index + i, v + 3 * i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib4svNV(index + i, v + 4 * i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- ATTRIB4NV(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib4dvNV(index + i, v + 4 * i);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
-{
- GLint i;
- for (i = n - 1; i >= 0; i--)
- loopback_VertexAttrib4ubvNV(index + i, v + 4 * i);
-}
-
-
-
-
/*
* This code never registers handlers for any of the entry points
* listed in vtxfmt.h.
SET_Color4uiv(dest, loopback_Color4uiv_f);
SET_Color4usv(dest, loopback_Color4usv_f);
SET_Color4ubv(dest, loopback_Color4ubv_f);
-
- SET_SecondaryColor3bEXT(dest, loopback_SecondaryColor3bEXT_f);
- SET_SecondaryColor3dEXT(dest, loopback_SecondaryColor3dEXT_f);
- SET_SecondaryColor3iEXT(dest, loopback_SecondaryColor3iEXT_f);
- SET_SecondaryColor3sEXT(dest, loopback_SecondaryColor3sEXT_f);
- SET_SecondaryColor3uiEXT(dest, loopback_SecondaryColor3uiEXT_f);
- SET_SecondaryColor3usEXT(dest, loopback_SecondaryColor3usEXT_f);
- SET_SecondaryColor3ubEXT(dest, loopback_SecondaryColor3ubEXT_f);
- SET_SecondaryColor3bvEXT(dest, loopback_SecondaryColor3bvEXT_f);
- SET_SecondaryColor3dvEXT(dest, loopback_SecondaryColor3dvEXT_f);
- SET_SecondaryColor3ivEXT(dest, loopback_SecondaryColor3ivEXT_f);
- SET_SecondaryColor3svEXT(dest, loopback_SecondaryColor3svEXT_f);
- SET_SecondaryColor3uivEXT(dest, loopback_SecondaryColor3uivEXT_f);
- SET_SecondaryColor3usvEXT(dest, loopback_SecondaryColor3usvEXT_f);
- SET_SecondaryColor3ubvEXT(dest, loopback_SecondaryColor3ubvEXT_f);
SET_EdgeFlagv(dest, loopback_EdgeFlagv);
SET_VertexAttrib4svNV(dest, loopback_VertexAttrib4svNV);
SET_VertexAttrib4dvNV(dest, loopback_VertexAttrib4dvNV);
SET_VertexAttrib4ubvNV(dest, loopback_VertexAttrib4ubvNV);
- SET_VertexAttribs1svNV(dest, loopback_VertexAttribs1svNV);
- SET_VertexAttribs1fvNV(dest, loopback_VertexAttribs1fvNV);
- SET_VertexAttribs1dvNV(dest, loopback_VertexAttribs1dvNV);
- SET_VertexAttribs2svNV(dest, loopback_VertexAttribs2svNV);
- SET_VertexAttribs2fvNV(dest, loopback_VertexAttribs2fvNV);
- SET_VertexAttribs2dvNV(dest, loopback_VertexAttribs2dvNV);
- SET_VertexAttribs3svNV(dest, loopback_VertexAttribs3svNV);
- SET_VertexAttribs3fvNV(dest, loopback_VertexAttribs3fvNV);
- SET_VertexAttribs3dvNV(dest, loopback_VertexAttribs3dvNV);
- SET_VertexAttribs4svNV(dest, loopback_VertexAttribs4svNV);
- SET_VertexAttribs4fvNV(dest, loopback_VertexAttribs4fvNV);
- SET_VertexAttribs4dvNV(dest, loopback_VertexAttribs4dvNV);
- SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV);
}
/* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic
* array [0]).
*/
- return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled;
+ return ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Enabled;
}
memset(&ib, 0, sizeof(ib));
ib.type = type;
ib.ptr = indices;
- ib.obj = ctx->Array.ArrayObj->ElementArrayBufferObj;
+ ib.obj = ctx->Array.ElementArrayBufferObj;
vbo_get_minmax_index(ctx, &prim, &ib, &min, &max);
- if (max >= ctx->Array.ArrayObj->_MaxElement) {
+ if (max >= ctx->Array._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);
+ max, ctx->Array._MaxElement);
return GL_FALSE;
}
return GL_FALSE;
/* Vertex buffer object tests */
- if (_mesa_is_bufferobj(ctx->Array.ArrayObj->ElementArrayBufferObj)) {
+ if (_mesa_is_bufferobj(ctx->Array.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) {
+ if (index_bytes(type, count) > ctx->Array.ElementArrayBufferObj->Size) {
_mesa_warning(ctx, "glDrawElements index out of buffer bounds");
return GL_FALSE;
}
}
-/**
- * Error checking for glDrawRangeElements(). Includes parameter checking
- * and VBO bounds checking.
- * \return GL_TRUE if OK to render, GL_FALSE if error found
- */
-GLboolean
-_mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid *indices)
-{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
-
- if (count <= 0) {
- if (count < 0)
- _mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(count)" );
- return GL_FALSE;
- }
-
- if (!_mesa_valid_prim_mode(ctx, mode)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glDrawRangeElements(mode)" );
- return GL_FALSE;
- }
-
- if (end < start) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glDrawRangeElements(end<start)");
- return GL_FALSE;
- }
-
- if (type != GL_UNSIGNED_INT &&
- type != GL_UNSIGNED_BYTE &&
- type != GL_UNSIGNED_SHORT) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glDrawRangeElements(type)" );
- return GL_FALSE;
- }
-
- if (!check_valid_to_render(ctx, "glDrawRangeElements"))
- 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, "glDrawRangeElements 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))
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-
/**
* Called from the tnl module to error check the function parameters and
* verify that we really can draw something.
return GL_FALSE;
if (ctx->Const.CheckArrayBounds) {
- if (start + count > (GLint) ctx->Array.ArrayObj->_MaxElement)
+ if (start + count > (GLint) ctx->Array._MaxElement)
return GL_FALSE;
}
GLenum mode, GLsizei count, GLenum type,
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);
-
#endif
+++ /dev/null
-/*
- * Mesa 3-D graphics library
- * Version: 7.6
- *
- * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2006
- * 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 OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION 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 arrayobj.c
- * Functions for the GL_APPLE_vertex_array_object extension.
- *
- * \todo
- * The code in this file borrows a lot from bufferobj.c. There's a certain
- * amount of cruft left over from that origin that may be unnecessary.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- * \author Brian Paul
- */
-
-#include <precomp.h>
-
-/**
- * Look up the array object for the given ID.
- *
- * \returns
- * Either a pointer to the array object with the specified ID or \c NULL for
- * a non-existent ID. The spec defines ID 0 as being technically
- * non-existent.
- */
-
-static inline struct gl_array_object *
-lookup_arrayobj(struct gl_context *ctx, GLuint id)
-{
- if (id == 0)
- return NULL;
- else
- return (struct gl_array_object *)
- _mesa_HashLookup(ctx->Array.Objects, id);
-}
-
-
-/**
- * For all the vertex arrays in the array object, unbind any pointers
- * to any buffer objects (VBOs).
- * This is done just prior to array object destruction.
- */
-static void
-unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj)
-{
- GLuint i;
-
- for (i = 0; i < Elements(obj->VertexAttrib); i++)
- _mesa_reference_buffer_object(ctx, &obj->VertexAttrib[i].BufferObj, NULL);
-}
-
-
-/**
- * Allocate and initialize a new vertex array object.
- *
- * This function is intended to be called via
- * \c dd_function_table::NewArrayObject.
- */
-struct gl_array_object *
-_mesa_new_array_object( struct gl_context *ctx, GLuint name )
-{
- struct gl_array_object *obj = CALLOC_STRUCT(gl_array_object);
- if (obj)
- _mesa_initialize_array_object(ctx, obj, name);
- return obj;
-}
-
-
-/**
- * Delete an array object.
- *
- * This function is intended to be called via
- * \c dd_function_table::DeleteArrayObject.
- */
-void
-_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
-{
- (void) ctx;
- unbind_array_object_vbos(ctx, obj);
- _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj, NULL);
- _glthread_DESTROY_MUTEX(obj->Mutex);
- free(obj);
-}
-
-
-/**
- * Set ptr to arrayObj w/ reference counting.
- */
-void
-_mesa_reference_array_object(struct gl_context *ctx,
- struct gl_array_object **ptr,
- struct gl_array_object *arrayObj)
-{
- if (*ptr == arrayObj)
- return;
-
- if (*ptr) {
- /* Unreference the old array object */
- GLboolean deleteFlag = GL_FALSE;
- struct gl_array_object *oldObj = *ptr;
-
- _glthread_LOCK_MUTEX(oldObj->Mutex);
- ASSERT(oldObj->RefCount > 0);
- oldObj->RefCount--;
-#if 0
- printf("ArrayObj %p %d DECR to %d\n",
- (void *) oldObj, oldObj->Name, oldObj->RefCount);
-#endif
- deleteFlag = (oldObj->RefCount == 0);
- _glthread_UNLOCK_MUTEX(oldObj->Mutex);
-
- if (deleteFlag) {
- ASSERT(ctx->Driver.DeleteArrayObject);
- ctx->Driver.DeleteArrayObject(ctx, oldObj);
- }
-
- *ptr = NULL;
- }
- ASSERT(!*ptr);
-
- if (arrayObj) {
- /* reference new array object */
- _glthread_LOCK_MUTEX(arrayObj->Mutex);
- if (arrayObj->RefCount == 0) {
- /* this array's being deleted (look just above) */
- /* Not sure this can every really happen. Warn if it does. */
- _mesa_problem(NULL, "referencing deleted array object");
- *ptr = NULL;
- }
- else {
- arrayObj->RefCount++;
-#if 0
- printf("ArrayObj %p %d INCR to %d\n",
- (void *) arrayObj, arrayObj->Name, arrayObj->RefCount);
-#endif
- *ptr = arrayObj;
- }
- _glthread_UNLOCK_MUTEX(arrayObj->Mutex);
- }
-}
-
-
-
-static void
-init_array(struct gl_context *ctx,
- struct gl_client_array *array, GLint size, GLint type)
-{
- array->Size = size;
- array->Type = type;
- array->Stride = 0;
- array->StrideB = 0;
- array->Ptr = NULL;
- array->Enabled = GL_FALSE;
- array->Normalized = GL_FALSE;
- array->Integer = GL_FALSE;
- array->_ElementSize = size * _mesa_sizeof_type(type);
- /* Vertex array buffers */
- _mesa_reference_buffer_object(ctx, &array->BufferObj,
- ctx->Shared->NullBufferObj);
-}
-
-
-/**
- * Initialize a gl_array_object's arrays.
- */
-void
-_mesa_initialize_array_object( struct gl_context *ctx,
- struct gl_array_object *obj,
- GLuint name )
-{
- GLuint i;
-
- obj->Name = name;
-
- _glthread_INIT_MUTEX(obj->Mutex);
- obj->RefCount = 1;
-
- /* Init the individual arrays */
- for (i = 0; i < Elements(obj->VertexAttrib); i++) {
- switch (i) {
- case VERT_ATTRIB_WEIGHT:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_WEIGHT], 1, GL_FLOAT);
- break;
- case VERT_ATTRIB_NORMAL:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_NORMAL], 3, GL_FLOAT);
- break;
- case VERT_ATTRIB_COLOR1:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_COLOR1], 3, GL_FLOAT);
- break;
- case VERT_ATTRIB_FOG:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_FOG], 1, GL_FLOAT);
- break;
- case VERT_ATTRIB_COLOR_INDEX:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX], 1, GL_FLOAT);
- break;
- case VERT_ATTRIB_EDGEFLAG:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_EDGEFLAG], 1, GL_BOOL);
- break;
-#if FEATURE_point_size_array
- case VERT_ATTRIB_POINT_SIZE:
- init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_POINT_SIZE], 1, GL_FLOAT);
- break;
-#endif
- default:
- init_array(ctx, &obj->VertexAttrib[i], 4, GL_FLOAT);
- break;
- }
- }
-
- _mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj,
- ctx->Shared->NullBufferObj);
-}
-
-
-/**
- * Add the given array object to the array object pool.
- */
-static void
-save_array_object( struct gl_context *ctx, struct gl_array_object *obj )
-{
- if (obj->Name > 0) {
- /* insert into hash table */
- _mesa_HashInsert(ctx->Array.Objects, obj->Name, obj);
- }
-}
-
-
-/**
- * Remove the given array object from the array object pool.
- * Do not deallocate the array object though.
- */
-static void
-remove_array_object( struct gl_context *ctx, struct gl_array_object *obj )
-{
- if (obj->Name > 0) {
- /* remove from hash table */
- _mesa_HashRemove(ctx->Array.Objects, obj->Name);
- }
-}
-
-
-
-/**
- * Helper for update_arrays().
- * \return min(current min, array->_MaxElement).
- */
-static GLuint
-update_min(GLuint min, struct gl_client_array *array)
-{
- assert(array->Enabled);
- _mesa_update_array_max_element(array);
- return MIN2(min, array->_MaxElement);
-}
-
-
-/**
- * Examine vertex arrays to update the gl_array_object::_MaxElement field.
- */
-void
-_mesa_update_array_object_max_element(struct gl_context *ctx,
- struct gl_array_object *arrayObj)
-{
- GLbitfield64 enabled = arrayObj->_Enabled;
- GLuint min = ~0u;
-
- while (enabled) {
- GLint attrib = _mesa_ffsll(enabled) - 1;
- enabled &= ~BITFIELD64_BIT(attrib);
- min = update_min(min, &arrayObj->VertexAttrib[attrib]);
- }
-
- /* _MaxElement is one past the last legal array element */
- arrayObj->_MaxElement = min;
-}
-
-
-/**********************************************************************/
-/* API Functions */
-/**********************************************************************/
-
-
-/**
- * Helper for _mesa_BindVertexArray() and _mesa_BindVertexArrayAPPLE().
- * \param genRequired specifies behavour when id was not generated with
- * glGenVertexArrays().
- */
-static void
-bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
-{
- struct gl_array_object * const oldObj = ctx->Array.ArrayObj;
- struct gl_array_object *newObj = NULL;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- ASSERT(oldObj != NULL);
-
- if ( oldObj->Name == id )
- return; /* rebinding the same array object- no change */
-
- /*
- * Get pointer to new array object (newObj)
- */
- if (id == 0) {
- /* The spec says there is no array object named 0, but we use
- * one internally because it simplifies things.
- */
- newObj = ctx->Array.DefaultArrayObj;
- }
- else {
- /* non-default array object */
- newObj = lookup_arrayobj(ctx, id);
- if (!newObj) {
- if (genRequired) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glBindVertexArray(id)");
- return;
- }
-
- /* For APPLE version, generate a new array object now */
- newObj = (*ctx->Driver.NewArrayObject)(ctx, id);
- if (!newObj) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE");
- return;
- }
-
- save_array_object(ctx, newObj);
- }
-
- if (!newObj->_Used) {
- /* The "Interactions with APPLE_vertex_array_object" section of the
- * GL_ARB_vertex_array_object spec says:
- *
- * "The first bind call, either BindVertexArray or
- * BindVertexArrayAPPLE, determines the semantic of the object."
- */
- newObj->ARBsemantics = genRequired;
- newObj->_Used = GL_TRUE;
- }
- }
-
- ctx->NewState |= _NEW_ARRAY;
- ctx->Array.NewState |= VERT_BIT_ALL;
- _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, newObj);
-
- /* Pass BindVertexArray call to device driver */
- if (ctx->Driver.BindArrayObject && newObj)
- ctx->Driver.BindArrayObject(ctx, newObj);
-}
-
-
-/**
- * ARB version of glBindVertexArray()
- * This function behaves differently from glBindVertexArrayAPPLE() in
- * that this function requires all ids to have been previously generated
- * by glGenVertexArrays[APPLE]().
- */
-void GLAPIENTRY
-_mesa_BindVertexArray( GLuint id )
-{
- GET_CURRENT_CONTEXT(ctx);
- bind_vertex_array(ctx, id, GL_TRUE);
-}
-
-
-/**
- * Bind a new array.
- *
- * \todo
- * The binding could be done more efficiently by comparing the non-NULL
- * pointers in the old and new objects. The only arrays that are "dirty" are
- * the ones that are non-NULL in either object.
- */
-void GLAPIENTRY
-_mesa_BindVertexArrayAPPLE( GLuint id )
-{
- GET_CURRENT_CONTEXT(ctx);
- bind_vertex_array(ctx, id, GL_FALSE);
-}
-
-
-/**
- * Delete a set of array objects.
- *
- * \param n Number of array objects to delete.
- * \param ids Array of \c n array object IDs.
- */
-void GLAPIENTRY
-_mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLsizei i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (n < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteVertexArrayAPPLE(n)");
- return;
- }
-
- for (i = 0; i < n; i++) {
- struct gl_array_object *obj = lookup_arrayobj(ctx, ids[i]);
-
- if ( obj != NULL ) {
- ASSERT( obj->Name == ids[i] );
-
- /* If the array object is currently bound, the spec says "the binding
- * for that object reverts to zero and the default vertex array
- * becomes current."
- */
- if ( obj == ctx->Array.ArrayObj ) {
- CALL_BindVertexArrayAPPLE( ctx->Exec, (0) );
- }
-
- /* The ID is immediately freed for re-use */
- remove_array_object(ctx, obj);
-
- /* Unreference the array object.
- * If refcount hits zero, the object will be deleted.
- */
- _mesa_reference_array_object(ctx, &obj, NULL);
- }
- }
-}
-
-
-/**
- * Generate a set of unique array object IDs and store them in \c arrays.
- * Helper for _mesa_GenVertexArrays[APPLE]() functions below.
- * \param n Number of IDs to generate.
- * \param arrays Array of \c n locations to store the IDs.
- * \param vboOnly Will arrays have to reside in VBOs?
- */
-static void
-gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays)
-{
- GLuint first;
- GLint i;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (n < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGenVertexArraysAPPLE");
- return;
- }
-
- if (!arrays) {
- return;
- }
-
- first = _mesa_HashFindFreeKeyBlock(ctx->Array.Objects, n);
-
- /* Allocate new, empty array objects and return identifiers */
- for (i = 0; i < n; i++) {
- struct gl_array_object *obj;
- GLuint name = first + i;
-
- obj = (*ctx->Driver.NewArrayObject)( ctx, name );
- if (!obj) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenVertexArraysAPPLE");
- return;
- }
- save_array_object(ctx, obj);
- arrays[i] = first + i;
- }
-}
-
-
-/**
- * ARB version of glGenVertexArrays()
- * All arrays will be required to live in VBOs.
- */
-void GLAPIENTRY
-_mesa_GenVertexArrays(GLsizei n, GLuint *arrays)
-{
- GET_CURRENT_CONTEXT(ctx);
- gen_vertex_arrays(ctx, n, arrays);
-}
-
-
-/**
- * APPLE version of glGenVertexArraysAPPLE()
- * Arrays may live in VBOs or ordinary memory.
- */
-void GLAPIENTRY
-_mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
-{
- GET_CURRENT_CONTEXT(ctx);
- gen_vertex_arrays(ctx, n, arrays);
-}
-
-
-/**
- * Determine if ID is the name of an array object.
- *
- * \param id ID of the potential array object.
- * \return \c GL_TRUE if \c id is the name of a array object,
- * \c GL_FALSE otherwise.
- */
-GLboolean GLAPIENTRY
-_mesa_IsVertexArrayAPPLE( GLuint id )
-{
- struct gl_array_object * obj;
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
-
- if (id == 0)
- return GL_FALSE;
-
- obj = lookup_arrayobj(ctx, id);
-
- return (obj != NULL) ? GL_TRUE : GL_FALSE;
-}
+++ /dev/null
-/*
- * Mesa 3-D graphics library
- * Version: 7.6
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- * (C) Copyright IBM Corporation 2006
- * 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 OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION 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 ARRAYOBJ_H
-#define ARRAYOBJ_H
-
-#include "glheader.h"
-
-struct gl_context;
-
-/**
- * \file arrayobj.h
- * Functions for the GL_APPLE_vertex_array_object extension.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- * \author Brian Paul
- */
-
-/*
- * Internal functions
- */
-
-extern struct gl_array_object *
-_mesa_new_array_object( struct gl_context *ctx, GLuint name );
-
-extern void
-_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj );
-
-extern void
-_mesa_reference_array_object(struct gl_context *ctx,
- struct gl_array_object **ptr,
- struct gl_array_object *arrayObj);
-
-extern void
-_mesa_initialize_array_object( struct gl_context *ctx,
- struct gl_array_object *obj, GLuint name );
-
-
-extern void
-_mesa_update_array_object_max_element(struct gl_context *ctx,
- struct gl_array_object *arrayObj);
-
-
-/*
- * API functions
- */
-
-
-void GLAPIENTRY _mesa_BindVertexArray( GLuint id );
-
-void GLAPIENTRY _mesa_BindVertexArrayAPPLE( GLuint id );
-
-void GLAPIENTRY _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids);
-
-void GLAPIENTRY _mesa_GenVertexArrays(GLsizei n, GLuint *arrays);
-
-void GLAPIENTRY _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer);
-
-GLboolean GLAPIENTRY _mesa_IsVertexArrayAPPLE( GLuint id );
-
-#endif /* ARRAYOBJ_H */
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.ARB_texture_cube_map) {
_mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP,
!!(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_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1));
}
/* 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 {
- _mesa_BlendEquationSeparateEXT(
- color->EquationRGB,
- color->EquationA);
- }
- _mesa_BlendColor(color->BlendColor[0],
- color->BlendColor[1],
- color->BlendColor[2],
- color->BlendColor[3]);
+ _mesa_BlendFunc(color->SrcFactor, color->DstFactor);
_mesa_LogicOp(color->LogicOp);
_mesa_set_enable(ctx, GL_COLOR_LOGIC_OP,
color->ColorLogicOpEnabled);
(GLfloat) light->Model.LocalViewer);
_mesa_LightModelf(GL_LIGHT_MODEL_TWO_SIDE,
(GLfloat) light->Model.TwoSide);
- _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL,
- (GLfloat) light->Model.ColorControl);
/* shade model */
_mesa_ShadeModel(light->ShadeModel);
/* color material */
#define GL_CLIENT_UNPACK_BIT (1<<21)
/**
- * Copy gl_array_object from src to dest.
+ * Copy gl_array_attrib from src to dest.
* 'dest' must be in an initialized state.
*/
static void
-copy_array_object(struct gl_context *ctx,
- struct gl_array_object *dest,
- struct gl_array_object *src)
+copy_array_attrib(struct gl_context *ctx,
+ struct gl_array_attrib *dest,
+ struct gl_array_attrib *src)
{
- GLuint i;
+ GLuint i;
- /* skip Name */
- /* skip RefCount */
+ /* skip ArrayObj */
+ /* skip DefaultArrayObj, Objects */
+ dest->LockFirst = src->LockFirst;
+ dest->LockCount = src->LockCount;
+ /* skip NewState */
+ /* skip RebindArrays */
- /* In theory must be the same anyway, but on recreate make sure it matches */
- dest->ARBsemantics = src->ARBsemantics;
- for (i = 0; i < Elements(src->VertexAttrib); i++)
- _mesa_copy_client_array(ctx, &dest->VertexAttrib[i], &src->VertexAttrib[i]);
+ /* skip Name */
+ /* skip RefCount */
- /* _Enabled must be the same than on push */
- dest->_Enabled = src->_Enabled;
- dest->_MaxElement = src->_MaxElement;
-}
+ for (i = 0; i < Elements(src->VertexAttrib); i++)
+ _mesa_copy_client_array(ctx, &dest->VertexAttrib[i], &src->VertexAttrib[i]);
-/**
- * Copy gl_array_attrib from src to dest.
- * 'dest' must be in an initialized state.
- */
-static void
-copy_array_attrib(struct gl_context *ctx,
- struct gl_array_attrib *dest,
- struct gl_array_attrib *src,
- GLboolean vbo_deleted)
-{
- /* skip ArrayObj */
- /* skip DefaultArrayObj, Objects */
- dest->LockFirst = src->LockFirst;
- dest->LockCount = src->LockCount;
- /* skip NewState */
- /* skip RebindArrays */
-
- if (!vbo_deleted)
- copy_array_object(ctx, dest->ArrayObj, src->ArrayObj);
-
- /* skip ArrayBufferObj */
- /* skip ElementArrayBufferObj */
+ /* _Enabled must be the same than on push */
+ dest->_Enabled = src->_Enabled;
+ dest->_MaxElement = src->_MaxElement;
+
+ /* skip ArrayBufferObj */
+ /* skip ElementArrayBufferObj */
}
/**
struct gl_array_attrib *dest,
struct gl_array_attrib *src)
{
- /* Set the Name, needed for restore, but do never overwrite.
- * 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, GL_FALSE);
+ copy_array_attrib(ctx, dest, src);
/* Just reference them here */
- _mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj,
- src->ArrayBufferObj);
- _mesa_reference_buffer_object(ctx, &dest->ArrayObj->ElementArrayBufferObj,
- src->ArrayObj->ElementArrayBufferObj);
+ _mesa_reference_buffer_object(ctx, &dest->ElementArrayBufferObj,
+ src->ElementArrayBufferObj);
}
/**
struct gl_array_attrib *dest,
struct gl_array_attrib *src)
{
- /* The ARB_vertex_array_object spec says:
- *
- * "BindVertexArray fails and an INVALID_OPERATION error is generated
- * if array is not a name returned from a previous call to
- * GenVertexArrays, or if such a name has since been deleted with
- * DeleteVertexArrays."
- *
- * Therefore popping a deleted VAO cannot magically recreate it.
- *
- * The semantics of objects created using APPLE_vertex_array_objects behave
- * differently. These objects expect to be recreated by pop. Alas.
- */
- const GLboolean arb_vao = (src->ArrayObj->Name != 0
- && src->ArrayObj->ARBsemantics);
+ copy_array_attrib(ctx, dest, src);
- if (arb_vao && !_mesa_IsVertexArrayAPPLE(src->ArrayObj->Name))
- return;
-
- _mesa_BindVertexArrayAPPLE(src->ArrayObj->Name);
-
- /* Restore or recreate the buffer objects by the names ... */
- if (!arb_vao
- || src->ArrayBufferObj->Name == 0
- || _mesa_IsBufferARB(src->ArrayBufferObj->Name)) {
- /* ... and restore its content */
- copy_array_attrib(ctx, dest, src, GL_FALSE);
-
- _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB,
- src->ArrayBufferObj->Name);
- } else {
- copy_array_attrib(ctx, dest, src, GL_TRUE);
- }
-
- if (!arb_vao
- || src->ArrayObj->ElementArrayBufferObj->Name == 0
- || _mesa_IsBufferARB(src->ArrayObj->ElementArrayBufferObj->Name))
+ if (src->ElementArrayBufferObj->Name == 0
+ || _mesa_IsBufferARB(src->ElementArrayBufferObj->Name))
_mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
- src->ArrayObj->ElementArrayBufferObj->Name);
+ src->ElementArrayBufferObj->Name);
/* Better safe than sorry?! */
dest->RebindArrays = GL_TRUE;
* FIXME: of the old ArrayObj->_Enabled and the new _Enabled.
* ... just do it.
*/
- dest->NewState |= src->ArrayObj->_Enabled | dest->ArrayObj->_Enabled;
-}
-
-/**
- * init/alloc the fields of 'attrib'.
- * Needs to the init part matching free_array_attrib_data below.
- */
-static void
-init_array_attrib_data(struct gl_context *ctx,
- struct gl_array_attrib *attrib)
-{
- /* Get a non driver gl_array_object. */
- attrib->ArrayObj = CALLOC_STRUCT( gl_array_object );
- _mesa_initialize_array_object(ctx, attrib->ArrayObj, 0);
-}
-
-/**
- * Free/unreference the fields of 'attrib' but don't delete it (that's
- * done later in the calling code).
- * Needs to the cleanup part matching init_array_attrib_data above.
- */
-static void
-free_array_attrib_data(struct gl_context *ctx,
- struct gl_array_attrib *attrib)
-{
- /* We use a non driver array object, so don't just unref since we would
- * end up using the drivers DeleteArrayObject function for deletion. */
- _mesa_delete_array_object(ctx, attrib->ArrayObj);
- attrib->ArrayObj = 0;
- _mesa_reference_buffer_object(ctx, &attrib->ArrayBufferObj, NULL);
+ dest->NewState |= src->_Enabled | dest->_Enabled;
}
if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
struct gl_array_attrib *attr;
attr = CALLOC_STRUCT( gl_array_attrib );
- init_array_attrib_data(ctx, attr);
+ _mesa_init_varray(ctx, attr);
save_array_attrib(ctx, attr, &ctx->Array);
save_attrib_data(&head, GL_CLIENT_VERTEX_ARRAY_BIT, attr);
}
struct gl_array_attrib * attr =
(struct gl_array_attrib *) node->data;
restore_array_attrib(ctx, &ctx->Array, attr);
- free_array_attrib_data(ctx, attr);
+ _mesa_free_varray_data(ctx, attr);
ctx->NewState |= _NEW_ARRAY;
break;
}
*/
static GLboolean
validate_blend_factors(struct gl_context *ctx, const char *func,
- GLenum sfactorRGB, GLenum dfactorRGB,
- GLenum sfactorA, GLenum dfactorA)
+ GLenum srcfactor, GLenum dstfactor)
{
- if (!legal_src_factor(ctx, sfactorRGB)) {
+ if (!legal_src_factor(ctx, srcfactor)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(sfactorRGB = %s)", func,
- _mesa_lookup_enum_by_nr(sfactorRGB));
+ _mesa_lookup_enum_by_nr(srcfactor));
return GL_FALSE;
}
- if (!legal_dst_factor(ctx, dfactorRGB)) {
+ if (!legal_dst_factor(ctx, dstfactor)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(dfactorRGB = %s)", func,
- _mesa_lookup_enum_by_nr(dfactorRGB));
- return GL_FALSE;
- }
-
- if (sfactorA != sfactorRGB && !legal_src_factor(ctx, sfactorA)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "%s(sfactorA = %s)", func,
- _mesa_lookup_enum_by_nr(sfactorA));
- return GL_FALSE;
- }
-
- if (dfactorA != dfactorRGB && !legal_dst_factor(ctx, dfactorA)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "%s(dfactorA = %s)", func,
- _mesa_lookup_enum_by_nr(dfactorA));
+ _mesa_lookup_enum_by_nr(dstfactor));
return GL_FALSE;
}
* \param sfactor source factor operator.
* \param dfactor destination factor operator.
*
- * \sa glBlendFunc, glBlendFuncSeparateEXT
+ * \sa glBlendFunc
*/
void GLAPIENTRY
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
-{
- _mesa_BlendFuncSeparateEXT(sfactor, dfactor, sfactor, dfactor);
-}
-
-
-/**
- * Set the separate blend source/dest factors for all draw buffers.
- *
- * \param sfactorRGB RGB source factor operator.
- * \param dfactorRGB RGB destination factor operator.
- * \param sfactorA alpha source factor operator.
- * \param dfactorA alpha destination factor operator.
- */
-void GLAPIENTRY
-_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
- GLenum sfactorA, GLenum dfactorA )
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n",
- _mesa_lookup_enum_by_nr(sfactorRGB),
- _mesa_lookup_enum_by_nr(dfactorRGB),
- _mesa_lookup_enum_by_nr(sfactorA),
- _mesa_lookup_enum_by_nr(dfactorA));
-
- if (!validate_blend_factors(ctx, "glBlendFuncSeparate",
- sfactorRGB, dfactorRGB,
- sfactorA, dfactorA)) {
- return;
- }
+ _mesa_debug(ctx, "glBlendFunc %s %s\n",
+ _mesa_lookup_enum_by_nr(sfactor),
+ _mesa_lookup_enum_by_nr(dfactor));
- if (ctx->Color.SrcRGB == sfactorRGB &&
- ctx->Color.DstRGB == dfactorRGB &&
- ctx->Color.SrcA == sfactorA &&
- ctx->Color.DstA == dfactorA) {
+ if (!validate_blend_factors(ctx, "glBlendFunc", sfactor, dfactor)) {
return;
}
- FLUSH_VERTICES(ctx, _NEW_COLOR);
-
- 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);
- }
-}
-
-
-#if _HAVE_FULL_GL
-/**
- * Check if given blend equation is legal.
- * \return GL_TRUE if legal, GL_FALSE otherwise.
- */
-static GLboolean
-legal_blend_equation(const struct gl_context *ctx, GLenum mode)
-{
- switch (mode) {
- case GL_FUNC_ADD:
- case GL_FUNC_SUBTRACT:
- case GL_FUNC_REVERSE_SUBTRACT:
- return GL_TRUE;
- case GL_MIN:
- case GL_MAX:
- return ctx->Extensions.EXT_blend_minmax;
- default:
- return GL_FALSE;
- }
-}
-
-
-/* This is really an extension function! */
-void GLAPIENTRY
-_mesa_BlendEquation( GLenum mode )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glBlendEquation(%s)\n",
- _mesa_lookup_enum_by_nr(mode));
-
- if (!legal_blend_equation(ctx, mode)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
+ if (ctx->Color.SrcFactor == sfactor &&
+ ctx->Color.DstFactor == dfactor) {
return;
}
- if (ctx->Color.EquationRGB == mode && ctx->Color.EquationA == mode) {
- return;
- }
-
- FLUSH_VERTICES(ctx, _NEW_COLOR);
- ctx->Color.EquationRGB = mode;
- ctx->Color.EquationA = mode;
-
- if (ctx->Driver.BlendEquationSeparate)
- (*ctx->Driver.BlendEquationSeparate)( ctx, mode, mode );
-}
-
-void GLAPIENTRY
-_mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n",
- _mesa_lookup_enum_by_nr(modeRGB),
- _mesa_lookup_enum_by_nr(modeA));
-
- if ( (modeRGB != modeA) && !ctx->Extensions.EXT_blend_equation_separate ) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glBlendEquationSeparateEXT not supported by driver");
- return;
- }
-
- if (!legal_blend_equation(ctx, modeRGB)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeRGB)");
- return;
- }
-
- if (!legal_blend_equation(ctx, modeA)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeA)");
- return;
- }
-
- if (ctx->Color.EquationRGB == modeRGB && ctx->Color.EquationA == modeA) {
- return;
- }
-
- FLUSH_VERTICES(ctx, _NEW_COLOR);
- ctx->Color.EquationRGB = modeRGB;
- ctx->Color.EquationA = modeA;
-
- if (ctx->Driver.BlendEquationSeparate)
- ctx->Driver.BlendEquationSeparate(ctx, modeRGB, modeA);
-}
-
-
-#endif /* _HAVE_FULL_GL */
-
-
-/**
- * Set the blending color.
- *
- * \param red red color component.
- * \param green green color component.
- * \param blue blue color component.
- * \param alpha alpha color component.
- *
- * \sa glBlendColor().
- *
- * Clamps the parameters and updates gl_colorbuffer_attrib::BlendColor. On a
- * change, flushes the vertices and notifies the driver via
- * dd_function_table::BlendColor callback.
- */
-void GLAPIENTRY
-_mesa_BlendColor( 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.BlendColor))
- return;
-
FLUSH_VERTICES(ctx, _NEW_COLOR);
- COPY_4FV( ctx->Color.BlendColor, tmp );
- if (ctx->Driver.BlendColor)
- (*ctx->Driver.BlendColor)(ctx, ctx->Color.BlendColor);
+ ctx->Color.SrcFactor = sfactor;
+ ctx->Color.DstFactor = dfactor;
}
ctx->Color.AlphaFunc = GL_ALWAYS;
ctx->Color.AlphaRef = 0;
ctx->Color.BlendEnabled = 0x0;
- 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 );
+ ctx->Color.SrcFactor = GL_ONE;
+ ctx->Color.DstFactor = GL_ZERO;
ctx->Color.IndexLogicOpEnabled = GL_FALSE;
ctx->Color.ColorLogicOpEnabled = GL_FALSE;
ctx->Color.LogicOp = GL_COPY;
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor );
-extern void GLAPIENTRY
-_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
- GLenum sfactorA, GLenum dfactorA );
-
-
-extern void GLAPIENTRY
-_mesa_BlendEquation( GLenum mode );
-
-
-
-extern void GLAPIENTRY
-_mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA );
-
-
-extern void GLAPIENTRY
-_mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-
-
extern void GLAPIENTRY
_mesa_AlphaFunc( GLenum func, GLclampf ref );
get_buffer_target(struct gl_context *ctx, GLenum target)
{
switch (target) {
- case GL_ARRAY_BUFFER_ARB:
- return &ctx->Array.ArrayBufferObj;
case GL_ELEMENT_ARRAY_BUFFER_ARB:
- return &ctx->Array.ArrayObj->ElementArrayBufferObj;
+ return &ctx->Array.ElementArrayBufferObj;
default:
return NULL;
}
memset(&DummyBufferObject, 0, sizeof(DummyBufferObject));
_glthread_INIT_MUTEX(DummyBufferObject.Mutex);
DummyBufferObject.RefCount = 1000*1000*1000; /* never delete */
-
- _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
- ctx->Shared->NullBufferObj);
-}
-
-
-void
-_mesa_free_buffer_objects( struct gl_context *ctx )
-{
- _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL);
}
for (i = 0; i < n; i++) {
struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, ids[i]);
if (bufObj) {
- struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLuint j;
ASSERT(bufObj->Name == ids[i] || bufObj == &DummyBufferObject);
}
/* unbind any vertex pointers bound to this buffer */
- for (j = 0; j < Elements(arrayObj->VertexAttrib); j++) {
- unbind(ctx, &arrayObj->VertexAttrib[j].BufferObj, bufObj);
+ for (j = 0; j < Elements(ctx->Array.VertexAttrib); j++) {
+ unbind(ctx, &ctx->Array.VertexAttrib[j].BufferObj, bufObj);
}
- if (ctx->Array.ArrayBufferObj == bufObj) {
- _mesa_BindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
- }
- if (arrayObj->ElementArrayBufferObj == bufObj) {
+ if (ctx->Array.ElementArrayBufferObj == bufObj) {
_mesa_BindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 );
}
ctx->Driver.FlushMappedBufferRange(ctx, offset, length, bufObj);
}
-
-#if FEATURE_APPLE_object_purgeable
-static GLenum
-buffer_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option)
-{
- struct gl_buffer_object *bufObj;
- GLenum retval;
-
- bufObj = _mesa_lookup_bufferobj(ctx, name);
- if (!bufObj) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glObjectPurgeable(name = 0x%x)", name);
- return 0;
- }
- if (!_mesa_is_bufferobj(bufObj)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glObjectPurgeable(buffer 0)" );
- 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.BufferObjectPurgeable)
- retval = ctx->Driver.BufferObjectPurgeable(ctx, bufObj, option);
-
- return retval;
-}
-
-static GLenum
-texture_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option)
-{
- struct gl_texture_object *bufObj;
- GLenum retval;
-
- bufObj = _mesa_lookup_texture(ctx, name);
- if (!bufObj) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glObjectPurgeable(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.TextureObjectPurgeable)
- retval = ctx->Driver.TextureObjectPurgeable(ctx, bufObj, option);
-
- return retval;
-}
-
-
-GLenum GLAPIENTRY
-_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
-{
- GLenum retval;
-
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
-
- if (name == 0) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glObjectPurgeable(name = 0x%x)", name);
- return 0;
- }
-
- switch (option) {
- case GL_VOLATILE_APPLE:
- case GL_RELEASED_APPLE:
- /* legal */
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glObjectPurgeable(name = 0x%x) invalid option: %d",
- name, option);
- return 0;
- }
-
- switch (objectType) {
- case GL_TEXTURE:
- retval = texture_object_purgeable(ctx, name, option);
- break;
- case GL_BUFFER_OBJECT_APPLE:
- retval = buffer_object_purgeable(ctx, name, option);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glObjectPurgeable(name = 0x%x) invalid type: %d",
- name, objectType);
- return 0;
- }
-
- /* In strict conformance to the spec, we must only return VOLATILE when
- * when passed the VOLATILE option. Madness.
- *
- * XXX First fix the spec, then fix me.
- */
- return option == GL_VOLATILE_APPLE ? GL_VOLATILE_APPLE : retval;
-}
-
-
-static GLenum
-buffer_object_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
-{
- struct gl_buffer_object *bufObj;
- GLenum retval;
-
- bufObj = _mesa_lookup_bufferobj(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.BufferObjectUnpurgeable)
- retval = ctx->Driver.BufferObjectUnpurgeable(ctx, bufObj, option);
-
- return retval;
-}
-
-static GLenum
-texture_object_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option)
-{
- struct gl_texture_object *bufObj;
- GLenum retval;
-
- bufObj = _mesa_lookup_texture(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.TextureObjectUnpurgeable)
- retval = ctx->Driver.TextureObjectUnpurgeable(ctx, bufObj, option);
-
- return retval;
-}
-
-
-GLenum GLAPIENTRY
-_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
-
- if (name == 0) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glObjectUnpurgeable(name = 0x%x)", name);
- return 0;
- }
-
- switch (option) {
- case GL_RETAINED_APPLE:
- case GL_UNDEFINED_APPLE:
- /* legal */
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glObjectUnpurgeable(name = 0x%x) invalid option: %d",
- name, option);
- return 0;
- }
-
- switch (objectType) {
- case GL_BUFFER_OBJECT_APPLE:
- return buffer_object_unpurgeable(ctx, name, option);
- case GL_TEXTURE:
- return texture_object_unpurgeable(ctx, name, option);
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glObjectUnpurgeable(name = 0x%x) invalid type: %d",
- name, objectType);
- return 0;
- }
-}
-
-
-static void
-get_buffer_object_parameteriv(struct gl_context *ctx, GLuint name,
- GLenum pname, GLint *params)
-{
- struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, name);
- if (!bufObj) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glGetObjectParameteriv(name = 0x%x) invalid object", name);
- return;
- }
-
- switch (pname) {
- case GL_PURGEABLE_APPLE:
- *params = bufObj->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)
-{
- struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, name);
- if (!texObj) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glObjectUnpurgeable(name = 0x%x)", name);
- return;
- }
-
- switch (pname) {
- case GL_PURGEABLE_APPLE:
- *params = texObj->Purgeable;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetObjectParameteriv(name = 0x%x) invalid enum: %d",
- name, pname);
- break;
- }
-}
-
-
-void GLAPIENTRY
-_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname,
- GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- if (name == 0) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glGetObjectParameteriv(name = 0x%x)", name);
- return;
- }
-
- switch (objectType) {
- case GL_TEXTURE:
- get_texture_object_parameteriv(ctx, name, pname, params);
- break;
- case GL_BUFFER_OBJECT_APPLE:
- get_buffer_object_parameteriv(ctx, name, pname, params);
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glGetObjectParameteriv(name = 0x%x) invalid type: %d",
- name, objectType);
- }
-}
-
-#endif /* FEATURE_APPLE_object_purgeable */
+++ /dev/null
-/*
- * 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 <precomp.h>
-
-#if FEATURE_colortable
-
-void GLAPIENTRY
-_mesa_ColorTable( GLenum target, GLenum internalFormat,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid *data )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
-}
-
-
-
-void GLAPIENTRY
-_mesa_ColorSubTable( GLenum target, GLsizei start,
- GLsizei count, GLenum format, GLenum type,
- const GLvoid *data )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
-}
-
-
-
-static void GLAPIENTRY
-_mesa_CopyColorTable(GLenum target, GLenum internalformat,
- GLint x, GLint y, GLsizei width)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glCopyColorTable(target)");
-}
-
-
-
-static void GLAPIENTRY
-_mesa_CopyColorSubTable(GLenum target, GLsizei start,
- GLint x, GLint y, GLsizei width)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glCopyColorSubTable(target)");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetColorTable( GLenum target, GLenum format,
- GLenum type, GLvoid *data )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
-}
-
-
-static void GLAPIENTRY
-_mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
-{
- /* no extensions use this function */
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(target)");
-}
-
-
-
-static void GLAPIENTRY
-_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
-{
- /* no extensions use this function */
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameteriv(target)");
-}
-
-
-
-static void GLAPIENTRY
-_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)");
-}
-
-
-
-static void GLAPIENTRY
-_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)");
-}
-
-
-void
-_mesa_init_colortable_dispatch(struct _glapi_table *disp)
-{
- SET_ColorSubTable(disp, _mesa_ColorSubTable);
- SET_ColorTable(disp, _mesa_ColorTable);
- SET_ColorTableParameterfv(disp, _mesa_ColorTableParameterfv);
- SET_ColorTableParameteriv(disp, _mesa_ColorTableParameteriv);
- SET_CopyColorSubTable(disp, _mesa_CopyColorSubTable);
- SET_CopyColorTable(disp, _mesa_CopyColorTable);
- SET_GetColorTable(disp, _mesa_GetColorTable);
- SET_GetColorTableParameterfv(disp, _mesa_GetColorTableParameterfv);
- SET_GetColorTableParameteriv(disp, _mesa_GetColorTableParameteriv);
-}
-
-
-#endif /* FEATURE_colortable */
+++ /dev/null
-/*
- * 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.
- */
-
-
-#ifndef COLORTAB_H
-#define COLORTAB_H
-
-
-#include "compiler.h"
-#include "glheader.h"
-#include "mfeatures.h"
-
-struct _glapi_table;
-
-#if FEATURE_colortable
-
-extern void GLAPIENTRY
-_mesa_ColorTable( GLenum target, GLenum internalformat,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid *table );
-
-extern void GLAPIENTRY
-_mesa_ColorSubTable( GLenum target, GLsizei start,
- GLsizei count, GLenum format, GLenum type,
- const GLvoid *table );
-
-extern void
-_mesa_init_colortable_dispatch(struct _glapi_table *disp);
-
-#else /* FEATURE_colortable */
-
-static inline void GLAPIENTRY
-_mesa_ColorTable( GLenum target, GLenum internalformat,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid *table )
-{
- ASSERT_NO_FEATURE();
-}
-
-static inline void GLAPIENTRY
-_mesa_ColorSubTable( GLenum target, GLsizei start,
- GLsizei count, GLenum format, GLenum type,
- const GLvoid *table )
-{
- ASSERT_NO_FEATURE();
-}
-
-static inline void
-_mesa_init_colortable_dispatch(struct _glapi_table *disp)
-{
-}
-
-#endif /* FEATURE_colortable */
-
-#endif /* COLORTAB_H */
/** Line width granularity */
#define LINE_WIDTH_GRANULARITY 0.1
-/** Max texture palette / color table size */
-#define MAX_COLOR_TABLE_SIZE 256
-
/** Max memory to allow for a single texture image (in megabytes) */
#define MAX_TEXTURE_MBYTES 1024
#undef MAX_WIDTH
#undef MAX_HEIGHT
#define MAX_TEXTURE_LEVELS 13
-#define MAX_3D_TEXTURE_LEVELS 9
#define MAX_CUBE_TEXTURE_LEVELS 13
#define MAX_WIDTH 4096
#define MAX_HEIGHT 4096
/** Max convolution filter height */
#define MAX_CONVOLUTION_HEIGHT 9
-/** For GL_ARB_texture_compression */
-#define MAX_COMPRESSED_TEXTURE_FORMATS 25
-
/** For GL_EXT_texture_filter_anisotropic */
#define MAX_TEXTURE_MAX_ANISOTROPY 16.0
/* redo special cases: */
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 1.0, 0.0, 0.0, 0.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_NORMAL], 0.0, 0.0, 1.0, 1.0 );
- ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR0], 1.0, 1.0, 1.0, 1.0 );
- ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR1], 0.0, 0.0, 0.0, 1.0 );
+ ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR], 1.0, 1.0, 1.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX], 1.0, 0.0, 0.0, 1.0 );
ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG], 1.0, 0.0, 0.0, 1.0 );
}
/* Constants, may be overriden (usually only reduced) by device drivers */
ctx->Const.MaxTextureMbytes = MAX_TEXTURE_MBYTES;
ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS;
- ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS;
ctx->Const.MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS;
ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY;
ctx->Const.MaxArrayLockSize = MAX_ARRAY_LOCK_SIZE;
ctx->Const.MinLineWidthAA = MIN_LINE_WIDTH;
ctx->Const.MaxLineWidthAA = MAX_LINE_WIDTH;
ctx->Const.LineWidthGranularity = (GLfloat) LINE_WIDTH_GRANULARITY;
- ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE;
ctx->Const.MaxClipPlanes = 6;
ctx->Const.MaxLights = MAX_LIGHTS;
ctx->Const.MaxShininess = 128.0;
_mesa_init_scissor( ctx );
_mesa_init_stencil( ctx );
_mesa_init_transform( ctx );
- _mesa_init_varray( ctx );
+ _mesa_init_varray(ctx, &ctx->Array);
_mesa_init_viewport( ctx );
if (!_mesa_init_texture( ctx ))
_mesa_reference_framebuffer(&ctx->ReadBuffer, NULL);
_mesa_free_attrib_data(ctx);
- _mesa_free_buffer_objects(ctx);
_mesa_free_lighting_data( ctx );
_mesa_free_eval_data( ctx );
_mesa_free_texture_data( ctx );
_mesa_free_matrix_data( ctx );
_mesa_free_viewport_data( ctx );
- _mesa_free_varray_data(ctx);
-
- _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj);
-
- _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL);
+ _mesa_free_varray_data(ctx, &ctx->Array);
/* free dispatch tables */
free(ctx->Exec);
+++ /dev/null
-/*
- * 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.
- */
-
-/*
- * Image convolution functions.
- *
- * Notes: filter kernel elements are indexed by <n> and <m> as in
- * the GL spec.
- */
-
-#include <precomp.h>
-
-#if FEATURE_convolve
-
-static void GLAPIENTRY
-_mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D");
-}
-
-static void GLAPIENTRY
-_mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D");
-}
-
-
-static void GLAPIENTRY
-_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf");
-}
-
-
-static void GLAPIENTRY
-_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv");
-}
-
-
-static void GLAPIENTRY
-_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri");
-}
-
-
-static void GLAPIENTRY
-_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv");
-}
-
-
-static void GLAPIENTRY
-_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D");
-}
-
-
-static void GLAPIENTRY
-_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *image)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionFilter");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *row, GLvoid *column,
- GLvoid *span)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter");
-}
-
-
-static void GLAPIENTRY
-_mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D");
-}
-
-void
-_mesa_init_convolve_dispatch(struct _glapi_table *disp)
-{
- SET_ConvolutionFilter1D(disp, _mesa_ConvolutionFilter1D);
- SET_ConvolutionFilter2D(disp, _mesa_ConvolutionFilter2D);
- SET_ConvolutionParameterf(disp, _mesa_ConvolutionParameterf);
- SET_ConvolutionParameterfv(disp, _mesa_ConvolutionParameterfv);
- SET_ConvolutionParameteri(disp, _mesa_ConvolutionParameteri);
- SET_ConvolutionParameteriv(disp, _mesa_ConvolutionParameteriv);
- SET_CopyConvolutionFilter1D(disp, _mesa_CopyConvolutionFilter1D);
- SET_CopyConvolutionFilter2D(disp, _mesa_CopyConvolutionFilter2D);
- SET_GetConvolutionFilter(disp, _mesa_GetConvolutionFilter);
- SET_GetConvolutionParameterfv(disp, _mesa_GetConvolutionParameterfv);
- SET_GetConvolutionParameteriv(disp, _mesa_GetConvolutionParameteriv);
- SET_SeparableFilter2D(disp, _mesa_SeparableFilter2D);
- SET_GetSeparableFilter(disp, _mesa_GetSeparableFilter);
-}
-
-
-#endif /* FEATURE_convolve */
+++ /dev/null
-
-/*
- * 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 CONVOLVE_H
-#define CONVOLVE_H
-
-
-#include "compiler.h"
-#include "mfeatures.h"
-
-struct _glapi_table;
-
-
-#if FEATURE_convolve
-
-extern void
-_mesa_init_convolve_dispatch(struct _glapi_table *disp);
-
-#else /* FEATURE_convolve */
-
-static inline void
-_mesa_init_convolve_dispatch(struct _glapi_table *disp)
-{
-}
-
-#endif /* FEATURE_convolve */
-
-#endif /* CONVOLVE_H */
GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing);
-
- /**
- * Called by glTexImage3D().
- *
- * \sa dd_function_table::TexImage1D.
- */
- void (*TexImage3D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint height, GLint depth, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
/**
* Called by glTexSubImage1D(). Replace a subset of the target texture
GLenum format, GLenum type,
const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing);
-
- /**
- * Called by glTexSubImage3D().
- *
- * \sa dd_function_table::TexSubImage1D.
- */
- void (*TexSubImage3D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLint depth,
- GLenum format, GLenum type,
- const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
/**
GLint x, GLint y,
GLsizei width, GLsizei height);
- /**
- * Called by glCopyTexSubImage3D() and glCopyTexImage3D().
- */
- void (*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);
-
/**
* Called by glTexImage[123]D when user specifies a proxy texture
* target.
GLsizei width, GLsizei height, GLint border,
GLsizei imageSize, const GLvoid *data);
- /**
- * Called by glCompressedTexImage3D().
- *
- * \sa dd_function_table::CompressedTexImage3D.
- */
- void (*CompressedTexImage3D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border,
- GLsizei imageSize, const GLvoid *data);
-
/**
* Called by glCompressedTexSubImage1D().
*/
GLsizei width, GLint height,
GLenum format,
GLsizei imageSize, const GLvoid *data);
-
- /**
- * Called by glCompressedTexSubImage3D().
- */
- void (*CompressedTexSubImage3D)(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLint height, GLint depth,
- GLenum format,
- GLsizei imageSize, const GLvoid *data);
/*@}*/
/**
/*@{*/
/** Specify the alpha test function */
void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
- /** Set the blend color */
- void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
- /** Set the blend equation */
- void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA);
- void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
- GLenum modeRGB, GLenum modeA);
- /** Specify pixel arithmetic */
- void (*BlendFuncSeparate)(struct gl_context *ctx,
- GLenum sfactorRGB, GLenum dfactorRGB,
- GLenum sfactorA, GLenum dfactorA);
- void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
- GLenum sfactorRGB, GLenum dfactorRGB,
- GLenum sfactorA, GLenum dfactorA);
/** Specify clear values for the color buffers */
void (*ClearColor)(struct gl_context *ctx,
const union gl_color_union color);
struct gl_buffer_object *obj );
/*@}*/
- /**
- * \name Functions for GL_APPLE_object_purgeable
- */
- /*@{*/
- /* variations on ObjectPurgeable */
- GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
- GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
- GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
-
- /* variations on ObjectUnpurgeable */
- GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
- GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
- GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
- /*@}*/
-
-
- /**
- * \name Vertex Array objects
- */
- /*@{*/
- struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
- void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
- void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
- /*@}*/
-
/**
* \name Support for multiple T&L engines
void (*EndCallList)( struct gl_context *ctx );
/**@}*/
-
- /**
- * \name GL_NV_texture_barrier interface
- */
- void (*TextureBarrier)(struct gl_context *ctx);
};
void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
void (GLAPIENTRYP Normal3fv)( const GLfloat * );
- void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
- void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
void (GLAPIENTRYP TexCoord1f)( GLfloat );
void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices );
- void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
- GLuint end, GLsizei count,
- GLenum type, const GLvoid *indices );
/*@}*/
/**
#define _gloffset_TexSubImage2D 333
#define _gloffset_PopClientAttrib 334
#define _gloffset_PushClientAttrib 335
-#define _gloffset_BlendColor 336
-#define _gloffset_BlendEquation 337
-#define _gloffset_DrawRangeElements 338
-#define _gloffset_ColorTable 339
-#define _gloffset_ColorTableParameterfv 340
-#define _gloffset_ColorTableParameteriv 341
-#define _gloffset_CopyColorTable 342
-#define _gloffset_GetColorTable 343
-#define _gloffset_GetColorTableParameterfv 344
-#define _gloffset_GetColorTableParameteriv 345
-#define _gloffset_ColorSubTable 346
-#define _gloffset_CopyColorSubTable 347
-#define _gloffset_ConvolutionFilter1D 348
-#define _gloffset_ConvolutionFilter2D 349
-#define _gloffset_ConvolutionParameterf 350
-#define _gloffset_ConvolutionParameterfv 351
-#define _gloffset_ConvolutionParameteri 352
-#define _gloffset_ConvolutionParameteriv 353
-#define _gloffset_CopyConvolutionFilter1D 354
-#define _gloffset_CopyConvolutionFilter2D 355
-#define _gloffset_GetConvolutionFilter 356
-#define _gloffset_GetConvolutionParameterfv 357
-#define _gloffset_GetConvolutionParameteriv 358
-#define _gloffset_GetSeparableFilter 359
-#define _gloffset_SeparableFilter2D 360
-#define _gloffset_GetHistogram 361
-#define _gloffset_GetHistogramParameterfv 362
-#define _gloffset_GetHistogramParameteriv 363
-#define _gloffset_GetMinmax 364
-#define _gloffset_GetMinmaxParameterfv 365
-#define _gloffset_GetMinmaxParameteriv 366
-#define _gloffset_Histogram 367
-#define _gloffset_Minmax 368
-#define _gloffset_ResetHistogram 369
-#define _gloffset_ResetMinmax 370
-#define _gloffset_TexImage3D 371
-#define _gloffset_TexSubImage3D 372
-#define _gloffset_CopyTexSubImage3D 373
-
-#if !FEATURE_remap_table
-
-#define _gloffset_GetStringi 435
+
#define _gloffset_GetBufferParameteri64v 438
#define _gloffset_GetInteger64i_v 439
#define _gloffset_LoadTransposeMatrixdARB 441
#define _gloffset_MapBufferARB 519
#define _gloffset_UnmapBufferARB 520
#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_GetAttachedObjectsARB 536
#define _gloffset_GetInfoLogARB 538
#define _gloffset_GetObjectParameterfvARB 539
#define _gloffset_GetObjectParameterivARB 540
-#define _gloffset_GetShaderSourceARB 541
-#define _gloffset_LinkProgramARB 545
-#define _gloffset_ShaderSourceARB 546
-#define _gloffset_ValidateProgramARB 567
#define _gloffset_GetActiveAttribARB 569
#define _gloffset_FlushMappedBufferRange 580
#define _gloffset_MapBufferRange 581
-#define _gloffset_BindVertexArray 583
-#define _gloffset_GenVertexArrays 584
#define _gloffset_TexStorage1D 685
#define _gloffset_TexStorage2D 686
#define _gloffset_TexStorage3D 687
#define _gloffset_PointParameterfvEXT 707
#define _gloffset_LockArraysEXT 708
#define _gloffset_UnlockArraysEXT 709
-#define _gloffset_SecondaryColor3bEXT 710
-#define _gloffset_SecondaryColor3bvEXT 711
-#define _gloffset_SecondaryColor3dEXT 712
-#define _gloffset_SecondaryColor3dvEXT 713
-#define _gloffset_SecondaryColor3fEXT 714
-#define _gloffset_SecondaryColor3fvEXT 715
-#define _gloffset_SecondaryColor3iEXT 716
-#define _gloffset_SecondaryColor3ivEXT 717
-#define _gloffset_SecondaryColor3sEXT 718
-#define _gloffset_SecondaryColor3svEXT 719
-#define _gloffset_SecondaryColor3ubEXT 720
-#define _gloffset_SecondaryColor3ubvEXT 721
-#define _gloffset_SecondaryColor3uiEXT 722
-#define _gloffset_SecondaryColor3uivEXT 723
-#define _gloffset_SecondaryColor3usEXT 724
-#define _gloffset_SecondaryColor3usvEXT 725
-#define _gloffset_SecondaryColorPointerEXT 726
#define _gloffset_FogCoordPointerEXT 729
#define _gloffset_FogCoorddEXT 730
#define _gloffset_FogCoorddvEXT 731
#define _gloffset_FogCoordfEXT 732
#define _gloffset_FogCoordfvEXT 733
#define _gloffset_PixelTexGenSGIX 734
-#define _gloffset_BlendFuncSeparateEXT 735
#define _gloffset_FlushVertexArrayRangeNV 736
#define _gloffset_VertexArrayRangeNV 737
#define _gloffset_CombinerInputNV 738
#define _gloffset_IsFenceNV 782
#define _gloffset_SetFenceNV 783
#define _gloffset_TestFenceNV 784
-#define _gloffset_AreProgramsResidentNV 785
-#define _gloffset_ExecuteProgramNV 788
-#define _gloffset_GetProgramParameterdvNV 790
-#define _gloffset_GetProgramParameterfvNV 791
-#define _gloffset_GetTrackMatrixivNV 794
-#define _gloffset_LoadProgramNV 800
-#define _gloffset_ProgramParameters4dvNV 801
-#define _gloffset_ProgramParameters4fvNV 802
-#define _gloffset_RequestResidentProgramsNV 803
-#define _gloffset_TrackMatrixNV 804
#define _gloffset_VertexAttrib1dNV 805
#define _gloffset_VertexAttrib1dvNV 806
#define _gloffset_VertexAttrib1fNV 807
#define _gloffset_VertexAttrib4svNV 828
#define _gloffset_VertexAttrib4ubNV 829
#define _gloffset_VertexAttrib4ubvNV 830
-#define _gloffset_VertexAttribs1dvNV 832
-#define _gloffset_VertexAttribs1fvNV 833
-#define _gloffset_VertexAttribs1svNV 834
-#define _gloffset_VertexAttribs2dvNV 835
-#define _gloffset_VertexAttribs2fvNV 836
-#define _gloffset_VertexAttribs2svNV 837
-#define _gloffset_VertexAttribs3dvNV 838
-#define _gloffset_VertexAttribs3fvNV 839
-#define _gloffset_VertexAttribs3svNV 840
-#define _gloffset_VertexAttribs4dvNV 841
-#define _gloffset_VertexAttribs4fvNV 842
-#define _gloffset_VertexAttribs4svNV 843
-#define _gloffset_VertexAttribs4ubvNV 844
#define _gloffset_PointParameteriNV 863
#define _gloffset_PointParameterivNV 864
#define _gloffset_ActiveStencilFaceEXT 865
-#define _gloffset_BindVertexArrayAPPLE 866
-#define _gloffset_DeleteVertexArraysAPPLE 867
-#define _gloffset_GenVertexArraysAPPLE 868
-#define _gloffset_IsVertexArrayAPPLE 869
-#define _gloffset_GetProgramNamedParameterdvNV 870
-#define _gloffset_GetProgramNamedParameterfvNV 871
-#define _gloffset_ProgramNamedParameter4dNV 872
-#define _gloffset_ProgramNamedParameter4dvNV 873
-#define _gloffset_ProgramNamedParameter4fNV 874
-#define _gloffset_ProgramNamedParameter4fvNV 875
#define _gloffset_DepthBoundsEXT 878
-#define _gloffset_BlendEquationSeparateEXT 879
#define _gloffset_BufferParameteriAPPLE 898
#define _gloffset_FlushMappedBufferRangeAPPLE 899
#define _gloffset_BindFragDataLocationEXT 900
#define _gloffset_TexParameterIuivEXT 946
#define _gloffset_GetTexParameterPointervAPPLE 957
#define _gloffset_TextureRangeAPPLE 958
-#define _gloffset_GetObjectParameterivAPPLE 959
-#define _gloffset_ObjectPurgeableAPPLE 960
-#define _gloffset_ObjectUnpurgeableAPPLE 961
-#define _gloffset_CreateShaderProgramEXT 963
-#define _gloffset_TextureBarrierNV 965
-
-#else /* !FEATURE_remap_table */
-
-#define driDispatchRemapTable_size 565
-extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
-
-#define GetStringi_remap_index 27
-#define TexBuffer_remap_index 28
-#define GetBufferParameteri64v_remap_index 30
-#define GetInteger64i_v_remap_index 31
-#define VertexAttribDivisor_remap_index 32
-#define LoadTransposeMatrixdARB_remap_index 33
-#define LoadTransposeMatrixfARB_remap_index 34
-#define MultTransposeMatrixdARB_remap_index 35
-#define MultTransposeMatrixfARB_remap_index 36
-#define SampleCoverageARB_remap_index 37
-#define BindBufferARB_remap_index 102
-#define BufferDataARB_remap_index 103
-#define BufferSubDataARB_remap_index 104
-#define DeleteBuffersARB_remap_index 105
-#define GenBuffersARB_remap_index 106
-#define GetBufferParameterivARB_remap_index 107
-#define GetBufferPointervARB_remap_index 108
-#define GetBufferSubDataARB_remap_index 109
-#define IsBufferARB_remap_index 110
-#define MapBufferARB_remap_index 111
-#define UnmapBufferARB_remap_index 112
-#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 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 LinkProgramARB_remap_index 137
-#define ShaderSourceARB_remap_index 138
-#define ValidateProgramARB_remap_index 159
-#define GetActiveAttribARB_remap_index 161
-#define VertexAttribDivisorARB_remap_index 171
-#define FlushMappedBufferRange_remap_index 172
-#define MapBufferRange_remap_index 173
-#define BindVertexArray_remap_index 175
-#define GenVertexArrays_remap_index 176
-#define TexStorage1D_remap_index 277
-#define TexStorage2D_remap_index 278
-#define TexStorage3D_remap_index 279
-#define TextureStorage1DEXT_remap_index 280
-#define TextureStorage2DEXT_remap_index 281
-#define TextureStorage3DEXT_remap_index 282
-#define PolygonOffsetEXT_remap_index 283
-#define SampleMaskSGIS_remap_index 290
-#define SamplePatternSGIS_remap_index 291
-#define ColorPointerEXT_remap_index 292
-#define EdgeFlagPointerEXT_remap_index 293
-#define IndexPointerEXT_remap_index 294
-#define NormalPointerEXT_remap_index 295
-#define TexCoordPointerEXT_remap_index 296
-#define VertexPointerEXT_remap_index 297
-#define PointParameterfEXT_remap_index 298
-#define PointParameterfvEXT_remap_index 299
-#define LockArraysEXT_remap_index 300
-#define UnlockArraysEXT_remap_index 301
-#define SecondaryColor3bEXT_remap_index 302
-#define SecondaryColor3bvEXT_remap_index 303
-#define SecondaryColor3dEXT_remap_index 304
-#define SecondaryColor3dvEXT_remap_index 305
-#define SecondaryColor3fEXT_remap_index 306
-#define SecondaryColor3fvEXT_remap_index 307
-#define SecondaryColor3iEXT_remap_index 308
-#define SecondaryColor3ivEXT_remap_index 309
-#define SecondaryColor3sEXT_remap_index 310
-#define SecondaryColor3svEXT_remap_index 311
-#define SecondaryColor3ubEXT_remap_index 312
-#define SecondaryColor3ubvEXT_remap_index 313
-#define SecondaryColor3uiEXT_remap_index 314
-#define SecondaryColor3uivEXT_remap_index 315
-#define SecondaryColor3usEXT_remap_index 316
-#define SecondaryColor3usvEXT_remap_index 317
-#define SecondaryColorPointerEXT_remap_index 318
-#define MultiDrawArraysEXT_remap_index 319
-#define FogCoordPointerEXT_remap_index 321
-#define FogCoorddEXT_remap_index 322
-#define FogCoorddvEXT_remap_index 323
-#define FogCoordfEXT_remap_index 324
-#define FogCoordfvEXT_remap_index 325
-#define PixelTexGenSGIX_remap_index 326
-#define BlendFuncSeparateEXT_remap_index 327
-#define FlushVertexArrayRangeNV_remap_index 328
-#define VertexArrayRangeNV_remap_index 329
-#define CombinerInputNV_remap_index 330
-#define CombinerOutputNV_remap_index 331
-#define CombinerParameterfNV_remap_index 332
-#define CombinerParameterfvNV_remap_index 333
-#define CombinerParameteriNV_remap_index 334
-#define CombinerParameterivNV_remap_index 335
-#define FinalCombinerInputNV_remap_index 336
-#define GetCombinerInputParameterfvNV_remap_index 337
-#define GetCombinerInputParameterivNV_remap_index 338
-#define GetCombinerOutputParameterfvNV_remap_index 339
-#define GetCombinerOutputParameterivNV_remap_index 340
-#define GetFinalCombinerInputParameterfvNV_remap_index 341
-#define GetFinalCombinerInputParameterivNV_remap_index 342
-#define WindowPos2dMESA_remap_index 344
-#define WindowPos2dvMESA_remap_index 345
-#define WindowPos2fMESA_remap_index 346
-#define WindowPos2fvMESA_remap_index 347
-#define WindowPos2iMESA_remap_index 348
-#define WindowPos2ivMESA_remap_index 349
-#define WindowPos2sMESA_remap_index 350
-#define WindowPos2svMESA_remap_index 351
-#define WindowPos3dMESA_remap_index 352
-#define WindowPos3dvMESA_remap_index 353
-#define WindowPos3fMESA_remap_index 354
-#define WindowPos3fvMESA_remap_index 355
-#define WindowPos3iMESA_remap_index 356
-#define WindowPos3ivMESA_remap_index 357
-#define WindowPos3sMESA_remap_index 358
-#define WindowPos3svMESA_remap_index 359
-#define WindowPos4dMESA_remap_index 360
-#define WindowPos4dvMESA_remap_index 361
-#define WindowPos4fMESA_remap_index 362
-#define WindowPos4fvMESA_remap_index 363
-#define WindowPos4iMESA_remap_index 364
-#define WindowPos4ivMESA_remap_index 365
-#define WindowPos4sMESA_remap_index 366
-#define WindowPos4svMESA_remap_index 367
-#define MultiModeDrawArraysIBM_remap_index 368
-#define MultiModeDrawElementsIBM_remap_index 369
-#define DeleteFencesNV_remap_index 370
-#define FinishFenceNV_remap_index 371
-#define GenFencesNV_remap_index 372
-#define GetFenceivNV_remap_index 373
-#define IsFenceNV_remap_index 374
-#define SetFenceNV_remap_index 375
-#define TestFenceNV_remap_index 376
-#define AreProgramsResidentNV_remap_index 377
-#define ExecuteProgramNV_remap_index 380
-#define GetProgramParameterdvNV_remap_index 382
-#define GetProgramParameterfvNV_remap_index 383
-#define GetTrackMatrixivNV_remap_index 386
-#define LoadProgramNV_remap_index 392
-#define ProgramParameters4dvNV_remap_index 393
-#define ProgramParameters4fvNV_remap_index 394
-#define RequestResidentProgramsNV_remap_index 395
-#define TrackMatrixNV_remap_index 396
-#define VertexAttrib1dNV_remap_index 397
-#define VertexAttrib1dvNV_remap_index 398
-#define VertexAttrib1fNV_remap_index 399
-#define VertexAttrib1fvNV_remap_index 400
-#define VertexAttrib1sNV_remap_index 401
-#define VertexAttrib1svNV_remap_index 402
-#define VertexAttrib2dNV_remap_index 403
-#define VertexAttrib2dvNV_remap_index 404
-#define VertexAttrib2fNV_remap_index 405
-#define VertexAttrib2fvNV_remap_index 406
-#define VertexAttrib2sNV_remap_index 407
-#define VertexAttrib2svNV_remap_index 408
-#define VertexAttrib3dNV_remap_index 409
-#define VertexAttrib3dvNV_remap_index 410
-#define VertexAttrib3fNV_remap_index 411
-#define VertexAttrib3fvNV_remap_index 412
-#define VertexAttrib3sNV_remap_index 413
-#define VertexAttrib3svNV_remap_index 414
-#define VertexAttrib4dNV_remap_index 415
-#define VertexAttrib4dvNV_remap_index 416
-#define VertexAttrib4fNV_remap_index 417
-#define VertexAttrib4fvNV_remap_index 418
-#define VertexAttrib4sNV_remap_index 419
-#define VertexAttrib4svNV_remap_index 420
-#define VertexAttrib4ubNV_remap_index 421
-#define VertexAttrib4ubvNV_remap_index 422
-#define VertexAttribs1dvNV_remap_index 424
-#define VertexAttribs1fvNV_remap_index 425
-#define VertexAttribs1svNV_remap_index 426
-#define VertexAttribs2dvNV_remap_index 427
-#define VertexAttribs2fvNV_remap_index 428
-#define VertexAttribs2svNV_remap_index 429
-#define VertexAttribs3dvNV_remap_index 430
-#define VertexAttribs3fvNV_remap_index 431
-#define VertexAttribs3svNV_remap_index 432
-#define VertexAttribs4dvNV_remap_index 433
-#define VertexAttribs4fvNV_remap_index 434
-#define VertexAttribs4svNV_remap_index 435
-#define VertexAttribs4ubvNV_remap_index 436
-#define PointParameteriNV_remap_index 455
-#define PointParameterivNV_remap_index 456
-#define ActiveStencilFaceEXT_remap_index 457
-#define BindVertexArrayAPPLE_remap_index 458
-#define DeleteVertexArraysAPPLE_remap_index 459
-#define GenVertexArraysAPPLE_remap_index 460
-#define IsVertexArrayAPPLE_remap_index 461
-#define GetProgramNamedParameterdvNV_remap_index 462
-#define GetProgramNamedParameterfvNV_remap_index 463
-#define ProgramNamedParameter4dNV_remap_index 464
-#define ProgramNamedParameter4dvNV_remap_index 465
-#define ProgramNamedParameter4fNV_remap_index 466
-#define ProgramNamedParameter4fvNV_remap_index 467
-#define DepthBoundsEXT_remap_index 470
-#define BlendEquationSeparateEXT_remap_index 471
-#define BufferParameteriAPPLE_remap_index 490
-#define FlushMappedBufferRangeAPPLE_remap_index 491
-#define BindFragDataLocationEXT_remap_index 492
-#define GetFragDataLocationEXT_remap_index 493
-#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 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 CreateShaderProgramEXT_remap_index 555
-#define TextureBarrierNV_remap_index 557
-
-#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index]
-#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index]
-#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_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_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index]
-#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index]
-#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index]
-#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index]
-#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index]
-#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index]
-#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index]
-#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index]
-#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index]
-#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index]
-#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_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_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_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index]
-#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index]
-#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index]
-#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index]
-#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index]
-#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index]
-#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index]
-#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index]
-#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index]
-#define _gloffset_TexStorage1D driDispatchRemapTable[TexStorage1D_remap_index]
-#define _gloffset_TexStorage2D driDispatchRemapTable[TexStorage2D_remap_index]
-#define _gloffset_TexStorage3D driDispatchRemapTable[TexStorage3D_remap_index]
-#define _gloffset_TextureStorage1DEXT driDispatchRemapTable[TextureStorage1DEXT_remap_index]
-#define _gloffset_TextureStorage2DEXT driDispatchRemapTable[TextureStorage2DEXT_remap_index]
-#define _gloffset_TextureStorage3DEXT driDispatchRemapTable[TextureStorage3DEXT_remap_index]
-#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index]
-#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index]
-#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index]
-#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index]
-#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index]
-#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index]
-#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index]
-#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index]
-#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index]
-#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index]
-#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index]
-#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index]
-#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index]
-#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index]
-#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index]
-#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index]
-#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index]
-#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index]
-#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index]
-#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index]
-#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index]
-#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index]
-#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index]
-#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index]
-#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index]
-#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index]
-#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index]
-#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index]
-#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index]
-#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index]
-#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index]
-#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index]
-#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index]
-#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index]
-#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index]
-#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index]
-#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index]
-#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index]
-#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index]
-#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index]
-#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index]
-#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index]
-#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index]
-#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index]
-#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index]
-#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index]
-#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index]
-#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index]
-#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index]
-#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index]
-#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index]
-#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index]
-#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index]
-#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index]
-#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index]
-#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index]
-#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index]
-#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index]
-#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index]
-#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index]
-#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index]
-#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index]
-#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index]
-#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index]
-#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index]
-#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index]
-#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index]
-#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index]
-#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index]
-#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index]
-#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index]
-#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index]
-#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index]
-#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index]
-#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index]
-#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index]
-#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index]
-#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index]
-#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index]
-#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index]
-#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index]
-#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index]
-#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index]
-#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index]
-#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index]
-#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index]
-#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index]
-#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index]
-#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index]
-#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index]
-#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index]
-#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index]
-#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index]
-#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index]
-#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index]
-#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index]
-#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index]
-#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index]
-#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index]
-#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index]
-#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index]
-#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index]
-#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index]
-#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index]
-#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index]
-#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index]
-#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index]
-#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index]
-#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index]
-#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index]
-#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index]
-#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index]
-#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index]
-#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index]
-#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index]
-#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index]
-#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index]
-#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index]
-#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index]
-#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index]
-#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index]
-#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index]
-#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index]
-#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index]
-#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index]
-#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index]
-#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index]
-#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index]
-#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index]
-#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index]
-#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index]
-#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index]
-#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index]
-#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]
-#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index]
-#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index]
-#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index]
-#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]
-#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]
-#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]
-#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]
-#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index]
-#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index]
-#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index]
-#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index]
-#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index]
-#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index]
-#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index]
-#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_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_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_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_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index]
-#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index]
-
-#endif /* !FEATURE_remap_table */
typedef void (GLAPIENTRYP _glptr_NewList)(GLuint, GLenum);
#define CALL_NewList(disp, parameters) \
SET_by_offset(disp, _gloffset_PushClientAttrib, fn);
}
-typedef void (GLAPIENTRYP _glptr_BlendColor)(GLclampf, GLclampf, GLclampf, GLclampf);
-#define CALL_BlendColor(disp, parameters) \
- (* GET_BlendColor(disp)) parameters
-static inline _glptr_BlendColor GET_BlendColor(struct _glapi_table *disp) {
- return (_glptr_BlendColor) (GET_by_offset(disp, _gloffset_BlendColor));
-}
-
-static inline void SET_BlendColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) {
- SET_by_offset(disp, _gloffset_BlendColor, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_BlendEquation)(GLenum);
-#define CALL_BlendEquation(disp, parameters) \
- (* GET_BlendEquation(disp)) parameters
-static inline _glptr_BlendEquation GET_BlendEquation(struct _glapi_table *disp) {
- return (_glptr_BlendEquation) (GET_by_offset(disp, _gloffset_BlendEquation));
-}
-
-static inline void SET_BlendEquation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) {
- SET_by_offset(disp, _gloffset_BlendEquation, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_DrawRangeElements)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
-#define CALL_DrawRangeElements(disp, parameters) \
- (* GET_DrawRangeElements(disp)) parameters
-static inline _glptr_DrawRangeElements GET_DrawRangeElements(struct _glapi_table *disp) {
- return (_glptr_DrawRangeElements) (GET_by_offset(disp, _gloffset_DrawRangeElements));
-}
-
-static inline void SET_DrawRangeElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_DrawRangeElements, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ColorTable)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-#define CALL_ColorTable(disp, parameters) \
- (* GET_ColorTable(disp)) parameters
-static inline _glptr_ColorTable GET_ColorTable(struct _glapi_table *disp) {
- return (_glptr_ColorTable) (GET_by_offset(disp, _gloffset_ColorTable));
-}
-
-static inline void SET_ColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_ColorTable, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ColorTableParameterfv)(GLenum, GLenum, const GLfloat *);
-#define CALL_ColorTableParameterfv(disp, parameters) \
- (* GET_ColorTableParameterfv(disp)) parameters
-static inline _glptr_ColorTableParameterfv GET_ColorTableParameterfv(struct _glapi_table *disp) {
- return (_glptr_ColorTableParameterfv) (GET_by_offset(disp, _gloffset_ColorTableParameterfv));
-}
-
-static inline void SET_ColorTableParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ColorTableParameteriv)(GLenum, GLenum, const GLint *);
-#define CALL_ColorTableParameteriv(disp, parameters) \
- (* GET_ColorTableParameteriv(disp)) parameters
-static inline _glptr_ColorTableParameteriv GET_ColorTableParameteriv(struct _glapi_table *disp) {
- return (_glptr_ColorTableParameteriv) (GET_by_offset(disp, _gloffset_ColorTableParameteriv));
-}
-
-static inline void SET_ColorTableParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) {
- SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_CopyColorTable)(GLenum, GLenum, GLint, GLint, GLsizei);
-#define CALL_CopyColorTable(disp, parameters) \
- (* GET_CopyColorTable(disp)) parameters
-static inline _glptr_CopyColorTable GET_CopyColorTable(struct _glapi_table *disp) {
- return (_glptr_CopyColorTable) (GET_by_offset(disp, _gloffset_CopyColorTable));
-}
-
-static inline void SET_CopyColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei)) {
- SET_by_offset(disp, _gloffset_CopyColorTable, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetColorTable)(GLenum, GLenum, GLenum, GLvoid *);
-#define CALL_GetColorTable(disp, parameters) \
- (* GET_GetColorTable(disp)) parameters
-static inline _glptr_GetColorTable GET_GetColorTable(struct _glapi_table *disp) {
- return (_glptr_GetColorTable) (GET_by_offset(disp, _gloffset_GetColorTable));
-}
-
-static inline void SET_GetColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *)) {
- SET_by_offset(disp, _gloffset_GetColorTable, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetColorTableParameterfv)(GLenum, GLenum, GLfloat *);
-#define CALL_GetColorTableParameterfv(disp, parameters) \
- (* GET_GetColorTableParameterfv(disp)) parameters
-static inline _glptr_GetColorTableParameterfv GET_GetColorTableParameterfv(struct _glapi_table *disp) {
- return (_glptr_GetColorTableParameterfv) (GET_by_offset(disp, _gloffset_GetColorTableParameterfv));
-}
-
-static inline void SET_GetColorTableParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) {
- SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetColorTableParameteriv)(GLenum, GLenum, GLint *);
-#define CALL_GetColorTableParameteriv(disp, parameters) \
- (* GET_GetColorTableParameteriv(disp)) parameters
-static inline _glptr_GetColorTableParameteriv GET_GetColorTableParameteriv(struct _glapi_table *disp) {
- return (_glptr_GetColorTableParameteriv) (GET_by_offset(disp, _gloffset_GetColorTableParameteriv));
-}
-
-static inline void SET_GetColorTableParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) {
- SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ColorSubTable)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#define CALL_ColorSubTable(disp, parameters) \
- (* GET_ColorSubTable(disp)) parameters
-static inline _glptr_ColorSubTable GET_ColorSubTable(struct _glapi_table *disp) {
- return (_glptr_ColorSubTable) (GET_by_offset(disp, _gloffset_ColorSubTable));
-}
-
-static inline void SET_ColorSubTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_ColorSubTable, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_CopyColorSubTable)(GLenum, GLsizei, GLint, GLint, GLsizei);
-#define CALL_CopyColorSubTable(disp, parameters) \
- (* GET_CopyColorSubTable(disp)) parameters
-static inline _glptr_CopyColorSubTable GET_CopyColorSubTable(struct _glapi_table *disp) {
- return (_glptr_CopyColorSubTable) (GET_by_offset(disp, _gloffset_CopyColorSubTable));
-}
-
-static inline void SET_CopyColorSubTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLint, GLint, GLsizei)) {
- SET_by_offset(disp, _gloffset_CopyColorSubTable, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ConvolutionFilter1D)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-#define CALL_ConvolutionFilter1D(disp, parameters) \
- (* GET_ConvolutionFilter1D(disp)) parameters
-static inline _glptr_ConvolutionFilter1D GET_ConvolutionFilter1D(struct _glapi_table *disp) {
- return (_glptr_ConvolutionFilter1D) (GET_by_offset(disp, _gloffset_ConvolutionFilter1D));
-}
-
-static inline void SET_ConvolutionFilter1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ConvolutionFilter2D)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#define CALL_ConvolutionFilter2D(disp, parameters) \
- (* GET_ConvolutionFilter2D(disp)) parameters
-static inline _glptr_ConvolutionFilter2D GET_ConvolutionFilter2D(struct _glapi_table *disp) {
- return (_glptr_ConvolutionFilter2D) (GET_by_offset(disp, _gloffset_ConvolutionFilter2D));
-}
-
-static inline void SET_ConvolutionFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ConvolutionParameterf)(GLenum, GLenum, GLfloat);
-#define CALL_ConvolutionParameterf(disp, parameters) \
- (* GET_ConvolutionParameterf(disp)) parameters
-static inline _glptr_ConvolutionParameterf GET_ConvolutionParameterf(struct _glapi_table *disp) {
- return (_glptr_ConvolutionParameterf) (GET_by_offset(disp, _gloffset_ConvolutionParameterf));
-}
-
-static inline void SET_ConvolutionParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) {
- SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ConvolutionParameterfv)(GLenum, GLenum, const GLfloat *);
-#define CALL_ConvolutionParameterfv(disp, parameters) \
- (* GET_ConvolutionParameterfv(disp)) parameters
-static inline _glptr_ConvolutionParameterfv GET_ConvolutionParameterfv(struct _glapi_table *disp) {
- return (_glptr_ConvolutionParameterfv) (GET_by_offset(disp, _gloffset_ConvolutionParameterfv));
-}
-
-static inline void SET_ConvolutionParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ConvolutionParameteri)(GLenum, GLenum, GLint);
-#define CALL_ConvolutionParameteri(disp, parameters) \
- (* GET_ConvolutionParameteri(disp)) parameters
-static inline _glptr_ConvolutionParameteri GET_ConvolutionParameteri(struct _glapi_table *disp) {
- return (_glptr_ConvolutionParameteri) (GET_by_offset(disp, _gloffset_ConvolutionParameteri));
-}
-
-static inline void SET_ConvolutionParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) {
- SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ConvolutionParameteriv)(GLenum, GLenum, const GLint *);
-#define CALL_ConvolutionParameteriv(disp, parameters) \
- (* GET_ConvolutionParameteriv(disp)) parameters
-static inline _glptr_ConvolutionParameteriv GET_ConvolutionParameteriv(struct _glapi_table *disp) {
- return (_glptr_ConvolutionParameteriv) (GET_by_offset(disp, _gloffset_ConvolutionParameteriv));
-}
-
-static inline void SET_ConvolutionParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) {
- SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_CopyConvolutionFilter1D)(GLenum, GLenum, GLint, GLint, GLsizei);
-#define CALL_CopyConvolutionFilter1D(disp, parameters) \
- (* GET_CopyConvolutionFilter1D(disp)) parameters
-static inline _glptr_CopyConvolutionFilter1D GET_CopyConvolutionFilter1D(struct _glapi_table *disp) {
- return (_glptr_CopyConvolutionFilter1D) (GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D));
-}
-
-static inline void SET_CopyConvolutionFilter1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei)) {
- SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_CopyConvolutionFilter2D)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
-#define CALL_CopyConvolutionFilter2D(disp, parameters) \
- (* GET_CopyConvolutionFilter2D(disp)) parameters
-static inline _glptr_CopyConvolutionFilter2D GET_CopyConvolutionFilter2D(struct _glapi_table *disp) {
- return (_glptr_CopyConvolutionFilter2D) (GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D));
-}
-
-static inline void SET_CopyConvolutionFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)) {
- SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetConvolutionFilter)(GLenum, GLenum, GLenum, GLvoid *);
-#define CALL_GetConvolutionFilter(disp, parameters) \
- (* GET_GetConvolutionFilter(disp)) parameters
-static inline _glptr_GetConvolutionFilter GET_GetConvolutionFilter(struct _glapi_table *disp) {
- return (_glptr_GetConvolutionFilter) (GET_by_offset(disp, _gloffset_GetConvolutionFilter));
-}
-
-static inline void SET_GetConvolutionFilter(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *)) {
- SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetConvolutionParameterfv)(GLenum, GLenum, GLfloat *);
-#define CALL_GetConvolutionParameterfv(disp, parameters) \
- (* GET_GetConvolutionParameterfv(disp)) parameters
-static inline _glptr_GetConvolutionParameterfv GET_GetConvolutionParameterfv(struct _glapi_table *disp) {
- return (_glptr_GetConvolutionParameterfv) (GET_by_offset(disp, _gloffset_GetConvolutionParameterfv));
-}
-
-static inline void SET_GetConvolutionParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) {
- SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetConvolutionParameteriv)(GLenum, GLenum, GLint *);
-#define CALL_GetConvolutionParameteriv(disp, parameters) \
- (* GET_GetConvolutionParameteriv(disp)) parameters
-static inline _glptr_GetConvolutionParameteriv GET_GetConvolutionParameteriv(struct _glapi_table *disp) {
- return (_glptr_GetConvolutionParameteriv) (GET_by_offset(disp, _gloffset_GetConvolutionParameteriv));
-}
-
-static inline void SET_GetConvolutionParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) {
- SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetSeparableFilter)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
-#define CALL_GetSeparableFilter(disp, parameters) \
- (* GET_GetSeparableFilter(disp)) parameters
-static inline _glptr_GetSeparableFilter GET_GetSeparableFilter(struct _glapi_table *disp) {
- return (_glptr_GetSeparableFilter) (GET_by_offset(disp, _gloffset_GetSeparableFilter));
-}
-
-static inline void SET_GetSeparableFilter(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)) {
- SET_by_offset(disp, _gloffset_GetSeparableFilter, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SeparableFilter2D)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
-#define CALL_SeparableFilter2D(disp, parameters) \
- (* GET_SeparableFilter2D(disp)) parameters
-static inline _glptr_SeparableFilter2D GET_SeparableFilter2D(struct _glapi_table *disp) {
- return (_glptr_SeparableFilter2D) (GET_by_offset(disp, _gloffset_SeparableFilter2D));
-}
-
-static inline void SET_SeparableFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_SeparableFilter2D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetHistogram)(GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-#define CALL_GetHistogram(disp, parameters) \
- (* GET_GetHistogram(disp)) parameters
-static inline _glptr_GetHistogram GET_GetHistogram(struct _glapi_table *disp) {
- return (_glptr_GetHistogram) (GET_by_offset(disp, _gloffset_GetHistogram));
-}
-
-static inline void SET_GetHistogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)) {
- SET_by_offset(disp, _gloffset_GetHistogram, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetHistogramParameterfv)(GLenum, GLenum, GLfloat *);
-#define CALL_GetHistogramParameterfv(disp, parameters) \
- (* GET_GetHistogramParameterfv(disp)) parameters
-static inline _glptr_GetHistogramParameterfv GET_GetHistogramParameterfv(struct _glapi_table *disp) {
- return (_glptr_GetHistogramParameterfv) (GET_by_offset(disp, _gloffset_GetHistogramParameterfv));
-}
-
-static inline void SET_GetHistogramParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) {
- SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetHistogramParameteriv)(GLenum, GLenum, GLint *);
-#define CALL_GetHistogramParameteriv(disp, parameters) \
- (* GET_GetHistogramParameteriv(disp)) parameters
-static inline _glptr_GetHistogramParameteriv GET_GetHistogramParameteriv(struct _glapi_table *disp) {
- return (_glptr_GetHistogramParameteriv) (GET_by_offset(disp, _gloffset_GetHistogramParameteriv));
-}
-
-static inline void SET_GetHistogramParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) {
- SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetMinmax)(GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-#define CALL_GetMinmax(disp, parameters) \
- (* GET_GetMinmax(disp)) parameters
-static inline _glptr_GetMinmax GET_GetMinmax(struct _glapi_table *disp) {
- return (_glptr_GetMinmax) (GET_by_offset(disp, _gloffset_GetMinmax));
-}
-
-static inline void SET_GetMinmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)) {
- SET_by_offset(disp, _gloffset_GetMinmax, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetMinmaxParameterfv)(GLenum, GLenum, GLfloat *);
-#define CALL_GetMinmaxParameterfv(disp, parameters) \
- (* GET_GetMinmaxParameterfv(disp)) parameters
-static inline _glptr_GetMinmaxParameterfv GET_GetMinmaxParameterfv(struct _glapi_table *disp) {
- return (_glptr_GetMinmaxParameterfv) (GET_by_offset(disp, _gloffset_GetMinmaxParameterfv));
-}
-
-static inline void SET_GetMinmaxParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) {
- SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetMinmaxParameteriv)(GLenum, GLenum, GLint *);
-#define CALL_GetMinmaxParameteriv(disp, parameters) \
- (* GET_GetMinmaxParameteriv(disp)) parameters
-static inline _glptr_GetMinmaxParameteriv GET_GetMinmaxParameteriv(struct _glapi_table *disp) {
- return (_glptr_GetMinmaxParameteriv) (GET_by_offset(disp, _gloffset_GetMinmaxParameteriv));
-}
-
-static inline void SET_GetMinmaxParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) {
- SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_Histogram)(GLenum, GLsizei, GLenum, GLboolean);
-#define CALL_Histogram(disp, parameters) \
- (* GET_Histogram(disp)) parameters
-static inline _glptr_Histogram GET_Histogram(struct _glapi_table *disp) {
- return (_glptr_Histogram) (GET_by_offset(disp, _gloffset_Histogram));
-}
-
-static inline void SET_Histogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, GLboolean)) {
- SET_by_offset(disp, _gloffset_Histogram, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_Minmax)(GLenum, GLenum, GLboolean);
-#define CALL_Minmax(disp, parameters) \
- (* GET_Minmax(disp)) parameters
-static inline _glptr_Minmax GET_Minmax(struct _glapi_table *disp) {
- return (_glptr_Minmax) (GET_by_offset(disp, _gloffset_Minmax));
-}
-
-static inline void SET_Minmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLboolean)) {
- SET_by_offset(disp, _gloffset_Minmax, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ResetHistogram)(GLenum);
-#define CALL_ResetHistogram(disp, parameters) \
- (* GET_ResetHistogram(disp)) parameters
-static inline _glptr_ResetHistogram GET_ResetHistogram(struct _glapi_table *disp) {
- return (_glptr_ResetHistogram) (GET_by_offset(disp, _gloffset_ResetHistogram));
-}
-
-static inline void SET_ResetHistogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) {
- SET_by_offset(disp, _gloffset_ResetHistogram, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ResetMinmax)(GLenum);
-#define CALL_ResetMinmax(disp, parameters) \
- (* GET_ResetMinmax(disp)) parameters
-static inline _glptr_ResetMinmax GET_ResetMinmax(struct _glapi_table *disp) {
- return (_glptr_ResetMinmax) (GET_by_offset(disp, _gloffset_ResetMinmax));
-}
-
-static inline void SET_ResetMinmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) {
- SET_by_offset(disp, _gloffset_ResetMinmax, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_TexImage3D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-#define CALL_TexImage3D(disp, parameters) \
- (* GET_TexImage3D(disp)) parameters
-static inline _glptr_TexImage3D GET_TexImage3D(struct _glapi_table *disp) {
- return (_glptr_TexImage3D) (GET_by_offset(disp, _gloffset_TexImage3D));
-}
-
-static inline void SET_TexImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_TexImage3D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_TexSubImage3D)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#define CALL_TexSubImage3D(disp, parameters) \
- (* GET_TexSubImage3D(disp)) parameters
-static inline _glptr_TexSubImage3D GET_TexSubImage3D(struct _glapi_table *disp) {
- return (_glptr_TexSubImage3D) (GET_by_offset(disp, _gloffset_TexSubImage3D));
-}
-
-static inline void SET_TexSubImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_TexSubImage3D, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_CopyTexSubImage3D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-#define CALL_CopyTexSubImage3D(disp, parameters) \
- (* GET_CopyTexSubImage3D(disp)) parameters
-static inline _glptr_CopyTexSubImage3D GET_CopyTexSubImage3D(struct _glapi_table *disp) {
- return (_glptr_CopyTexSubImage3D) (GET_by_offset(disp, _gloffset_CopyTexSubImage3D));
-}
-
-static inline void SET_CopyTexSubImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) {
- SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn);
-}
-
-typedef const GLubyte * (GLAPIENTRYP _glptr_GetStringi)(GLenum, GLuint);
-#define CALL_GetStringi(disp, parameters) \
- (* GET_GetStringi(disp)) parameters
-static inline _glptr_GetStringi GET_GetStringi(struct _glapi_table *disp) {
- return (_glptr_GetStringi) (GET_by_offset(disp, _gloffset_GetStringi));
-}
-
-static inline void SET_GetStringi(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum, GLuint)) {
- SET_by_offset(disp, _gloffset_GetStringi, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_GetBufferParameteri64v)(GLenum, GLenum, GLint64 *);
#define CALL_GetBufferParameteri64v(disp, parameters) \
(* GET_GetBufferParameteri64v(disp)) parameters
SET_by_offset(disp, _gloffset_AttachObjectARB, fn);
}
-typedef void (GLAPIENTRYP _glptr_CompileShaderARB)(GLhandleARB);
-#define CALL_CompileShaderARB(disp, parameters) \
- (* GET_CompileShaderARB(disp)) parameters
-static inline _glptr_CompileShaderARB GET_CompileShaderARB(struct _glapi_table *disp) {
- return (_glptr_CompileShaderARB) (GET_by_offset(disp, _gloffset_CompileShaderARB));
-}
-
-static inline void SET_CompileShaderARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) {
- SET_by_offset(disp, _gloffset_CompileShaderARB, fn);
-}
-
-typedef GLhandleARB (GLAPIENTRYP _glptr_CreateProgramObjectARB)(void);
-#define CALL_CreateProgramObjectARB(disp, parameters) \
- (* GET_CreateProgramObjectARB(disp)) parameters
-static inline _glptr_CreateProgramObjectARB GET_CreateProgramObjectARB(struct _glapi_table *disp) {
- return (_glptr_CreateProgramObjectARB) (GET_by_offset(disp, _gloffset_CreateProgramObjectARB));
-}
-
-static inline void SET_CreateProgramObjectARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(void)) {
- SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn);
-}
-
-typedef GLhandleARB (GLAPIENTRYP _glptr_CreateShaderObjectARB)(GLenum);
-#define CALL_CreateShaderObjectARB(disp, parameters) \
- (* GET_CreateShaderObjectARB(disp)) parameters
-static inline _glptr_CreateShaderObjectARB GET_CreateShaderObjectARB(struct _glapi_table *disp) {
- return (_glptr_CreateShaderObjectARB) (GET_by_offset(disp, _gloffset_CreateShaderObjectARB));
-}
-
-static inline void SET_CreateShaderObjectARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(GLenum)) {
- SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_DeleteObjectARB)(GLhandleARB);
#define CALL_DeleteObjectARB(disp, parameters) \
(* GET_DeleteObjectARB(disp)) parameters
SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn);
}
-typedef void (GLAPIENTRYP _glptr_GetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
-#define CALL_GetShaderSourceARB(disp, parameters) \
- (* GET_GetShaderSourceARB(disp)) parameters
-static inline _glptr_GetShaderSourceARB GET_GetShaderSourceARB(struct _glapi_table *disp) {
- return (_glptr_GetShaderSourceARB) (GET_by_offset(disp, _gloffset_GetShaderSourceARB));
-}
-
-static inline void SET_GetShaderSourceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) {
- SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_LinkProgramARB)(GLhandleARB);
-#define CALL_LinkProgramARB(disp, parameters) \
- (* GET_LinkProgramARB(disp)) parameters
-static inline _glptr_LinkProgramARB GET_LinkProgramARB(struct _glapi_table *disp) {
- return (_glptr_LinkProgramARB) (GET_by_offset(disp, _gloffset_LinkProgramARB));
-}
-
-static inline void SET_LinkProgramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) {
- SET_by_offset(disp, _gloffset_LinkProgramARB, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *);
-#define CALL_ShaderSourceARB(disp, parameters) \
- (* GET_ShaderSourceARB(disp)) parameters
-static inline _glptr_ShaderSourceARB GET_ShaderSourceARB(struct _glapi_table *disp) {
- return (_glptr_ShaderSourceARB) (GET_by_offset(disp, _gloffset_ShaderSourceARB));
-}
-
-static inline void SET_ShaderSourceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)) {
- SET_by_offset(disp, _gloffset_ShaderSourceARB, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ValidateProgramARB)(GLhandleARB);
-#define CALL_ValidateProgramARB(disp, parameters) \
- (* GET_ValidateProgramARB(disp)) parameters
-static inline _glptr_ValidateProgramARB GET_ValidateProgramARB(struct _glapi_table *disp) {
- return (_glptr_ValidateProgramARB) (GET_by_offset(disp, _gloffset_ValidateProgramARB));
-}
-
-static inline void SET_ValidateProgramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) {
- SET_by_offset(disp, _gloffset_ValidateProgramARB, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_GetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
#define CALL_GetActiveAttribARB(disp, parameters) \
(* GET_GetActiveAttribARB(disp)) parameters
SET_by_offset(disp, _gloffset_MapBufferRange, fn);
}
-typedef void (GLAPIENTRYP _glptr_BindVertexArray)(GLuint);
-#define CALL_BindVertexArray(disp, parameters) \
- (* GET_BindVertexArray(disp)) parameters
-static inline _glptr_BindVertexArray GET_BindVertexArray(struct _glapi_table *disp) {
- return (_glptr_BindVertexArray) (GET_by_offset(disp, _gloffset_BindVertexArray));
-}
-
-static inline void SET_BindVertexArray(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) {
- SET_by_offset(disp, _gloffset_BindVertexArray, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GenVertexArrays)(GLsizei, GLuint *);
-#define CALL_GenVertexArrays(disp, parameters) \
- (* GET_GenVertexArrays(disp)) parameters
-static inline _glptr_GenVertexArrays GET_GenVertexArrays(struct _glapi_table *disp) {
- return (_glptr_GenVertexArrays) (GET_by_offset(disp, _gloffset_GenVertexArrays));
-}
-
-static inline void SET_GenVertexArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) {
- SET_by_offset(disp, _gloffset_GenVertexArrays, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_TexStorage1D)(GLenum, GLsizei, GLenum, GLsizei);
#define CALL_TexStorage1D(disp, parameters) \
(* GET_TexStorage1D(disp)) parameters
SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn);
}
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3bEXT)(GLbyte, GLbyte, GLbyte);
-#define CALL_SecondaryColor3bEXT(disp, parameters) \
- (* GET_SecondaryColor3bEXT(disp)) parameters
-static inline _glptr_SecondaryColor3bEXT GET_SecondaryColor3bEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3bEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3bEXT));
-}
-
-static inline void SET_SecondaryColor3bEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3bvEXT)(const GLbyte *);
-#define CALL_SecondaryColor3bvEXT(disp, parameters) \
- (* GET_SecondaryColor3bvEXT(disp)) parameters
-static inline _glptr_SecondaryColor3bvEXT GET_SecondaryColor3bvEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3bvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT));
-}
-
-static inline void SET_SecondaryColor3bvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3dEXT)(GLdouble, GLdouble, GLdouble);
-#define CALL_SecondaryColor3dEXT(disp, parameters) \
- (* GET_SecondaryColor3dEXT(disp)) parameters
-static inline _glptr_SecondaryColor3dEXT GET_SecondaryColor3dEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3dEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3dEXT));
-}
-
-static inline void SET_SecondaryColor3dEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3dvEXT)(const GLdouble *);
-#define CALL_SecondaryColor3dvEXT(disp, parameters) \
- (* GET_SecondaryColor3dvEXT(disp)) parameters
-static inline _glptr_SecondaryColor3dvEXT GET_SecondaryColor3dvEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3dvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT));
-}
-
-static inline void SET_SecondaryColor3dvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3fEXT)(GLfloat, GLfloat, GLfloat);
-#define CALL_SecondaryColor3fEXT(disp, parameters) \
- (* GET_SecondaryColor3fEXT(disp)) parameters
-static inline _glptr_SecondaryColor3fEXT GET_SecondaryColor3fEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3fEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3fEXT));
-}
-
-static inline void SET_SecondaryColor3fEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3fvEXT)(const GLfloat *);
-#define CALL_SecondaryColor3fvEXT(disp, parameters) \
- (* GET_SecondaryColor3fvEXT(disp)) parameters
-static inline _glptr_SecondaryColor3fvEXT GET_SecondaryColor3fvEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3fvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT));
-}
-
-static inline void SET_SecondaryColor3fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3iEXT)(GLint, GLint, GLint);
-#define CALL_SecondaryColor3iEXT(disp, parameters) \
- (* GET_SecondaryColor3iEXT(disp)) parameters
-static inline _glptr_SecondaryColor3iEXT GET_SecondaryColor3iEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3iEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3iEXT));
-}
-
-static inline void SET_SecondaryColor3iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3ivEXT)(const GLint *);
-#define CALL_SecondaryColor3ivEXT(disp, parameters) \
- (* GET_SecondaryColor3ivEXT(disp)) parameters
-static inline _glptr_SecondaryColor3ivEXT GET_SecondaryColor3ivEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3ivEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT));
-}
-
-static inline void SET_SecondaryColor3ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3sEXT)(GLshort, GLshort, GLshort);
-#define CALL_SecondaryColor3sEXT(disp, parameters) \
- (* GET_SecondaryColor3sEXT(disp)) parameters
-static inline _glptr_SecondaryColor3sEXT GET_SecondaryColor3sEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3sEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3sEXT));
-}
-
-static inline void SET_SecondaryColor3sEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3svEXT)(const GLshort *);
-#define CALL_SecondaryColor3svEXT(disp, parameters) \
- (* GET_SecondaryColor3svEXT(disp)) parameters
-static inline _glptr_SecondaryColor3svEXT GET_SecondaryColor3svEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3svEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3svEXT));
-}
-
-static inline void SET_SecondaryColor3svEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3ubEXT)(GLubyte, GLubyte, GLubyte);
-#define CALL_SecondaryColor3ubEXT(disp, parameters) \
- (* GET_SecondaryColor3ubEXT(disp)) parameters
-static inline _glptr_SecondaryColor3ubEXT GET_SecondaryColor3ubEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3ubEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT));
-}
-
-static inline void SET_SecondaryColor3ubEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3ubvEXT)(const GLubyte *);
-#define CALL_SecondaryColor3ubvEXT(disp, parameters) \
- (* GET_SecondaryColor3ubvEXT(disp)) parameters
-static inline _glptr_SecondaryColor3ubvEXT GET_SecondaryColor3ubvEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3ubvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT));
-}
-
-static inline void SET_SecondaryColor3ubvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3uiEXT)(GLuint, GLuint, GLuint);
-#define CALL_SecondaryColor3uiEXT(disp, parameters) \
- (* GET_SecondaryColor3uiEXT(disp)) parameters
-static inline _glptr_SecondaryColor3uiEXT GET_SecondaryColor3uiEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3uiEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT));
-}
-
-static inline void SET_SecondaryColor3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3uivEXT)(const GLuint *);
-#define CALL_SecondaryColor3uivEXT(disp, parameters) \
- (* GET_SecondaryColor3uivEXT(disp)) parameters
-static inline _glptr_SecondaryColor3uivEXT GET_SecondaryColor3uivEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3uivEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT));
-}
-
-static inline void SET_SecondaryColor3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3usEXT)(GLushort, GLushort, GLushort);
-#define CALL_SecondaryColor3usEXT(disp, parameters) \
- (* GET_SecondaryColor3usEXT(disp)) parameters
-static inline _glptr_SecondaryColor3usEXT GET_SecondaryColor3usEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3usEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3usEXT));
-}
-
-static inline void SET_SecondaryColor3usEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColor3usvEXT)(const GLushort *);
-#define CALL_SecondaryColor3usvEXT(disp, parameters) \
- (* GET_SecondaryColor3usvEXT(disp)) parameters
-static inline _glptr_SecondaryColor3usvEXT GET_SecondaryColor3usvEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColor3usvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT));
-}
-
-static inline void SET_SecondaryColor3usvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) {
- SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_SecondaryColorPointerEXT)(GLint, GLenum, GLsizei, const GLvoid *);
-#define CALL_SecondaryColorPointerEXT(disp, parameters) \
- (* GET_SecondaryColorPointerEXT(disp)) parameters
-static inline _glptr_SecondaryColorPointerEXT GET_SecondaryColorPointerEXT(struct _glapi_table *disp) {
- return (_glptr_SecondaryColorPointerEXT) (GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT));
-}
-
-static inline void SET_SecondaryColorPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) {
- SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_FogCoordPointerEXT)(GLenum, GLsizei, const GLvoid *);
#define CALL_FogCoordPointerEXT(disp, parameters) \
(* GET_FogCoordPointerEXT(disp)) parameters
SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn);
}
-typedef void (GLAPIENTRYP _glptr_BlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum);
-#define CALL_BlendFuncSeparateEXT(disp, parameters) \
- (* GET_BlendFuncSeparateEXT(disp)) parameters
-static inline _glptr_BlendFuncSeparateEXT GET_BlendFuncSeparateEXT(struct _glapi_table *disp) {
- return (_glptr_BlendFuncSeparateEXT) (GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT));
-}
-
-static inline void SET_BlendFuncSeparateEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) {
- SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_FlushVertexArrayRangeNV)(void);
#define CALL_FlushVertexArrayRangeNV(disp, parameters) \
(* GET_FlushVertexArrayRangeNV(disp)) parameters
SET_by_offset(disp, _gloffset_TestFenceNV, fn);
}
-typedef GLboolean (GLAPIENTRYP _glptr_AreProgramsResidentNV)(GLsizei, const GLuint *, GLboolean *);
-#define CALL_AreProgramsResidentNV(disp, parameters) \
- (* GET_AreProgramsResidentNV(disp)) parameters
-static inline _glptr_AreProgramsResidentNV GET_AreProgramsResidentNV(struct _glapi_table *disp) {
- return (_glptr_AreProgramsResidentNV) (GET_by_offset(disp, _gloffset_AreProgramsResidentNV));
-}
-
-static inline void SET_AreProgramsResidentNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLboolean *)) {
- SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ExecuteProgramNV)(GLenum, GLuint, const GLfloat *);
-#define CALL_ExecuteProgramNV(disp, parameters) \
- (* GET_ExecuteProgramNV(disp)) parameters
-static inline _glptr_ExecuteProgramNV GET_ExecuteProgramNV(struct _glapi_table *disp) {
- return (_glptr_ExecuteProgramNV) (GET_by_offset(disp, _gloffset_ExecuteProgramNV));
-}
-
-static inline void SET_ExecuteProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetProgramParameterdvNV)(GLenum, GLuint, GLenum, GLdouble *);
-#define CALL_GetProgramParameterdvNV(disp, parameters) \
- (* GET_GetProgramParameterdvNV(disp)) parameters
-static inline _glptr_GetProgramParameterdvNV GET_GetProgramParameterdvNV(struct _glapi_table *disp) {
- return (_glptr_GetProgramParameterdvNV) (GET_by_offset(disp, _gloffset_GetProgramParameterdvNV));
-}
-
-static inline void SET_GetProgramParameterdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLdouble *)) {
- SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetProgramParameterfvNV)(GLenum, GLuint, GLenum, GLfloat *);
-#define CALL_GetProgramParameterfvNV(disp, parameters) \
- (* GET_GetProgramParameterfvNV(disp)) parameters
-static inline _glptr_GetProgramParameterfvNV GET_GetProgramParameterfvNV(struct _glapi_table *disp) {
- return (_glptr_GetProgramParameterfvNV) (GET_by_offset(disp, _gloffset_GetProgramParameterfvNV));
-}
-
-static inline void SET_GetProgramParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLfloat *)) {
- SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetTrackMatrixivNV)(GLenum, GLuint, GLenum, GLint *);
-#define CALL_GetTrackMatrixivNV(disp, parameters) \
- (* GET_GetTrackMatrixivNV(disp)) parameters
-static inline _glptr_GetTrackMatrixivNV GET_GetTrackMatrixivNV(struct _glapi_table *disp) {
- return (_glptr_GetTrackMatrixivNV) (GET_by_offset(disp, _gloffset_GetTrackMatrixivNV));
-}
-
-static inline void SET_GetTrackMatrixivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLint *)) {
- SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_LoadProgramNV)(GLenum, GLuint, GLsizei, const GLubyte *);
-#define CALL_LoadProgramNV(disp, parameters) \
- (* GET_LoadProgramNV(disp)) parameters
-static inline _glptr_LoadProgramNV GET_LoadProgramNV(struct _glapi_table *disp) {
- return (_glptr_LoadProgramNV) (GET_by_offset(disp, _gloffset_LoadProgramNV));
-}
-
-static inline void SET_LoadProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLubyte *)) {
- SET_by_offset(disp, _gloffset_LoadProgramNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ProgramParameters4dvNV)(GLenum, GLuint, GLsizei, const GLdouble *);
-#define CALL_ProgramParameters4dvNV(disp, parameters) \
- (* GET_ProgramParameters4dvNV(disp)) parameters
-static inline _glptr_ProgramParameters4dvNV GET_ProgramParameters4dvNV(struct _glapi_table *disp) {
- return (_glptr_ProgramParameters4dvNV) (GET_by_offset(disp, _gloffset_ProgramParameters4dvNV));
-}
-
-static inline void SET_ProgramParameters4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLdouble *)) {
- SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ProgramParameters4fvNV)(GLenum, GLuint, GLsizei, const GLfloat *);
-#define CALL_ProgramParameters4fvNV(disp, parameters) \
- (* GET_ProgramParameters4fvNV(disp)) parameters
-static inline _glptr_ProgramParameters4fvNV GET_ProgramParameters4fvNV(struct _glapi_table *disp) {
- return (_glptr_ProgramParameters4fvNV) (GET_by_offset(disp, _gloffset_ProgramParameters4fvNV));
-}
-
-static inline void SET_ProgramParameters4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_RequestResidentProgramsNV)(GLsizei, const GLuint *);
-#define CALL_RequestResidentProgramsNV(disp, parameters) \
- (* GET_RequestResidentProgramsNV(disp)) parameters
-static inline _glptr_RequestResidentProgramsNV GET_RequestResidentProgramsNV(struct _glapi_table *disp) {
- return (_glptr_RequestResidentProgramsNV) (GET_by_offset(disp, _gloffset_RequestResidentProgramsNV));
-}
-
-static inline void SET_RequestResidentProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) {
- SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_TrackMatrixNV)(GLenum, GLuint, GLenum, GLenum);
-#define CALL_TrackMatrixNV(disp, parameters) \
- (* GET_TrackMatrixNV(disp)) parameters
-static inline _glptr_TrackMatrixNV GET_TrackMatrixNV(struct _glapi_table *disp) {
- return (_glptr_TrackMatrixNV) (GET_by_offset(disp, _gloffset_TrackMatrixNV));
-}
-
-static inline void SET_TrackMatrixNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLenum)) {
- SET_by_offset(disp, _gloffset_TrackMatrixNV, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_VertexAttrib1dNV)(GLuint, GLdouble);
#define CALL_VertexAttrib1dNV(disp, parameters) \
(* GET_VertexAttrib1dNV(disp)) parameters
SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn);
}
-typedef void (GLAPIENTRYP _glptr_VertexAttribs1dvNV)(GLuint, GLsizei, const GLdouble *);
-#define CALL_VertexAttribs1dvNV(disp, parameters) \
- (* GET_VertexAttribs1dvNV(disp)) parameters
-static inline _glptr_VertexAttribs1dvNV GET_VertexAttribs1dvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs1dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs1dvNV));
-}
-
-static inline void SET_VertexAttribs1dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs1fvNV)(GLuint, GLsizei, const GLfloat *);
-#define CALL_VertexAttribs1fvNV(disp, parameters) \
- (* GET_VertexAttribs1fvNV(disp)) parameters
-static inline _glptr_VertexAttribs1fvNV GET_VertexAttribs1fvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs1fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs1fvNV));
-}
-
-static inline void SET_VertexAttribs1fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs1svNV)(GLuint, GLsizei, const GLshort *);
-#define CALL_VertexAttribs1svNV(disp, parameters) \
- (* GET_VertexAttribs1svNV(disp)) parameters
-static inline _glptr_VertexAttribs1svNV GET_VertexAttribs1svNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs1svNV) (GET_by_offset(disp, _gloffset_VertexAttribs1svNV));
-}
-
-static inline void SET_VertexAttribs1svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs2dvNV)(GLuint, GLsizei, const GLdouble *);
-#define CALL_VertexAttribs2dvNV(disp, parameters) \
- (* GET_VertexAttribs2dvNV(disp)) parameters
-static inline _glptr_VertexAttribs2dvNV GET_VertexAttribs2dvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs2dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs2dvNV));
-}
-
-static inline void SET_VertexAttribs2dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs2fvNV)(GLuint, GLsizei, const GLfloat *);
-#define CALL_VertexAttribs2fvNV(disp, parameters) \
- (* GET_VertexAttribs2fvNV(disp)) parameters
-static inline _glptr_VertexAttribs2fvNV GET_VertexAttribs2fvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs2fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs2fvNV));
-}
-
-static inline void SET_VertexAttribs2fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs2svNV)(GLuint, GLsizei, const GLshort *);
-#define CALL_VertexAttribs2svNV(disp, parameters) \
- (* GET_VertexAttribs2svNV(disp)) parameters
-static inline _glptr_VertexAttribs2svNV GET_VertexAttribs2svNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs2svNV) (GET_by_offset(disp, _gloffset_VertexAttribs2svNV));
-}
-
-static inline void SET_VertexAttribs2svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs3dvNV)(GLuint, GLsizei, const GLdouble *);
-#define CALL_VertexAttribs3dvNV(disp, parameters) \
- (* GET_VertexAttribs3dvNV(disp)) parameters
-static inline _glptr_VertexAttribs3dvNV GET_VertexAttribs3dvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs3dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs3dvNV));
-}
-
-static inline void SET_VertexAttribs3dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs3fvNV)(GLuint, GLsizei, const GLfloat *);
-#define CALL_VertexAttribs3fvNV(disp, parameters) \
- (* GET_VertexAttribs3fvNV(disp)) parameters
-static inline _glptr_VertexAttribs3fvNV GET_VertexAttribs3fvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs3fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs3fvNV));
-}
-
-static inline void SET_VertexAttribs3fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs3svNV)(GLuint, GLsizei, const GLshort *);
-#define CALL_VertexAttribs3svNV(disp, parameters) \
- (* GET_VertexAttribs3svNV(disp)) parameters
-static inline _glptr_VertexAttribs3svNV GET_VertexAttribs3svNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs3svNV) (GET_by_offset(disp, _gloffset_VertexAttribs3svNV));
-}
-
-static inline void SET_VertexAttribs3svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs4dvNV)(GLuint, GLsizei, const GLdouble *);
-#define CALL_VertexAttribs4dvNV(disp, parameters) \
- (* GET_VertexAttribs4dvNV(disp)) parameters
-static inline _glptr_VertexAttribs4dvNV GET_VertexAttribs4dvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs4dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs4dvNV));
-}
-
-static inline void SET_VertexAttribs4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs4fvNV)(GLuint, GLsizei, const GLfloat *);
-#define CALL_VertexAttribs4fvNV(disp, parameters) \
- (* GET_VertexAttribs4fvNV(disp)) parameters
-static inline _glptr_VertexAttribs4fvNV GET_VertexAttribs4fvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs4fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs4fvNV));
-}
-
-static inline void SET_VertexAttribs4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs4svNV)(GLuint, GLsizei, const GLshort *);
-#define CALL_VertexAttribs4svNV(disp, parameters) \
- (* GET_VertexAttribs4svNV(disp)) parameters
-static inline _glptr_VertexAttribs4svNV GET_VertexAttribs4svNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs4svNV) (GET_by_offset(disp, _gloffset_VertexAttribs4svNV));
-}
-
-static inline void SET_VertexAttribs4svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_VertexAttribs4ubvNV)(GLuint, GLsizei, const GLubyte *);
-#define CALL_VertexAttribs4ubvNV(disp, parameters) \
- (* GET_VertexAttribs4ubvNV(disp)) parameters
-static inline _glptr_VertexAttribs4ubvNV GET_VertexAttribs4ubvNV(struct _glapi_table *disp) {
- return (_glptr_VertexAttribs4ubvNV) (GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV));
-}
-
-static inline void SET_VertexAttribs4ubvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *)) {
- SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_PointParameteriNV)(GLenum, GLint);
#define CALL_PointParameteriNV(disp, parameters) \
(* GET_PointParameteriNV(disp)) parameters
SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn);
}
-typedef void (GLAPIENTRYP _glptr_BindVertexArrayAPPLE)(GLuint);
-#define CALL_BindVertexArrayAPPLE(disp, parameters) \
- (* GET_BindVertexArrayAPPLE(disp)) parameters
-static inline _glptr_BindVertexArrayAPPLE GET_BindVertexArrayAPPLE(struct _glapi_table *disp) {
- return (_glptr_BindVertexArrayAPPLE) (GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE));
-}
-
-static inline void SET_BindVertexArrayAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) {
- SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_DeleteVertexArraysAPPLE)(GLsizei, const GLuint *);
-#define CALL_DeleteVertexArraysAPPLE(disp, parameters) \
- (* GET_DeleteVertexArraysAPPLE(disp)) parameters
-static inline _glptr_DeleteVertexArraysAPPLE GET_DeleteVertexArraysAPPLE(struct _glapi_table *disp) {
- return (_glptr_DeleteVertexArraysAPPLE) (GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE));
-}
-
-static inline void SET_DeleteVertexArraysAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) {
- SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GenVertexArraysAPPLE)(GLsizei, GLuint *);
-#define CALL_GenVertexArraysAPPLE(disp, parameters) \
- (* GET_GenVertexArraysAPPLE(disp)) parameters
-static inline _glptr_GenVertexArraysAPPLE GET_GenVertexArraysAPPLE(struct _glapi_table *disp) {
- return (_glptr_GenVertexArraysAPPLE) (GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE));
-}
-
-static inline void SET_GenVertexArraysAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) {
- SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn);
-}
-
-typedef GLboolean (GLAPIENTRYP _glptr_IsVertexArrayAPPLE)(GLuint);
-#define CALL_IsVertexArrayAPPLE(disp, parameters) \
- (* GET_IsVertexArrayAPPLE(disp)) parameters
-static inline _glptr_IsVertexArrayAPPLE GET_IsVertexArrayAPPLE(struct _glapi_table *disp) {
- return (_glptr_IsVertexArrayAPPLE) (GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE));
-}
-
-static inline void SET_IsVertexArrayAPPLE(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) {
- SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetProgramNamedParameterdvNV)(GLuint, GLsizei, const GLubyte *, GLdouble *);
-#define CALL_GetProgramNamedParameterdvNV(disp, parameters) \
- (* GET_GetProgramNamedParameterdvNV(disp)) parameters
-static inline _glptr_GetProgramNamedParameterdvNV GET_GetProgramNamedParameterdvNV(struct _glapi_table *disp) {
- return (_glptr_GetProgramNamedParameterdvNV) (GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV));
-}
-
-static inline void SET_GetProgramNamedParameterdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLdouble *)) {
- SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_GetProgramNamedParameterfvNV)(GLuint, GLsizei, const GLubyte *, GLfloat *);
-#define CALL_GetProgramNamedParameterfvNV(disp, parameters) \
- (* GET_GetProgramNamedParameterfvNV(disp)) parameters
-static inline _glptr_GetProgramNamedParameterfvNV GET_GetProgramNamedParameterfvNV(struct _glapi_table *disp) {
- return (_glptr_GetProgramNamedParameterfvNV) (GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV));
-}
-
-static inline void SET_GetProgramNamedParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLfloat *)) {
- SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4dNV)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble);
-#define CALL_ProgramNamedParameter4dNV(disp, parameters) \
- (* GET_ProgramNamedParameter4dNV(disp)) parameters
-static inline _glptr_ProgramNamedParameter4dNV GET_ProgramNamedParameter4dNV(struct _glapi_table *disp) {
- return (_glptr_ProgramNamedParameter4dNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV));
-}
-
-static inline void SET_ProgramNamedParameter4dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)) {
- SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4dvNV)(GLuint, GLsizei, const GLubyte *, const GLdouble *);
-#define CALL_ProgramNamedParameter4dvNV(disp, parameters) \
- (* GET_ProgramNamedParameter4dvNV(disp)) parameters
-static inline _glptr_ProgramNamedParameter4dvNV GET_ProgramNamedParameter4dvNV(struct _glapi_table *disp) {
- return (_glptr_ProgramNamedParameter4dvNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV));
-}
-
-static inline void SET_ProgramNamedParameter4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, const GLdouble *)) {
- SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4fNV)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat);
-#define CALL_ProgramNamedParameter4fNV(disp, parameters) \
- (* GET_ProgramNamedParameter4fNV(disp)) parameters
-static inline _glptr_ProgramNamedParameter4fNV GET_ProgramNamedParameter4fNV(struct _glapi_table *disp) {
- return (_glptr_ProgramNamedParameter4fNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV));
-}
-
-static inline void SET_ProgramNamedParameter4fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)) {
- SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4fvNV)(GLuint, GLsizei, const GLubyte *, const GLfloat *);
-#define CALL_ProgramNamedParameter4fvNV(disp, parameters) \
- (* GET_ProgramNamedParameter4fvNV(disp)) parameters
-static inline _glptr_ProgramNamedParameter4fvNV GET_ProgramNamedParameter4fvNV(struct _glapi_table *disp) {
- return (_glptr_ProgramNamedParameter4fvNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV));
-}
-
-static inline void SET_ProgramNamedParameter4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, const GLfloat *)) {
- SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_DepthBoundsEXT)(GLclampd, GLclampd);
#define CALL_DepthBoundsEXT(disp, parameters) \
(* GET_DepthBoundsEXT(disp)) parameters
SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn);
}
-typedef void (GLAPIENTRYP _glptr_BlendEquationSeparateEXT)(GLenum, GLenum);
-#define CALL_BlendEquationSeparateEXT(disp, parameters) \
- (* GET_BlendEquationSeparateEXT(disp)) parameters
-static inline _glptr_BlendEquationSeparateEXT GET_BlendEquationSeparateEXT(struct _glapi_table *disp) {
- return (_glptr_BlendEquationSeparateEXT) (GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT));
-}
-
-static inline void SET_BlendEquationSeparateEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) {
- SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn);
-}
-
typedef void (GLAPIENTRYP _glptr_BufferParameteriAPPLE)(GLenum, GLenum, GLint);
#define CALL_BufferParameteriAPPLE(disp, parameters) \
(* GET_BufferParameteriAPPLE(disp)) parameters
SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn);
}
-typedef void (GLAPIENTRYP _glptr_GetObjectParameterivAPPLE)(GLenum, GLuint, GLenum, GLint *);
-#define CALL_GetObjectParameterivAPPLE(disp, parameters) \
- (* GET_GetObjectParameterivAPPLE(disp)) parameters
-static inline _glptr_GetObjectParameterivAPPLE GET_GetObjectParameterivAPPLE(struct _glapi_table *disp) {
- return (_glptr_GetObjectParameterivAPPLE) (GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE));
-}
-
-static inline void SET_GetObjectParameterivAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLint *)) {
- SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn);
-}
-
-typedef GLenum (GLAPIENTRYP _glptr_ObjectPurgeableAPPLE)(GLenum, GLuint, GLenum);
-#define CALL_ObjectPurgeableAPPLE(disp, parameters) \
- (* GET_ObjectPurgeableAPPLE(disp)) parameters
-static inline _glptr_ObjectPurgeableAPPLE GET_ObjectPurgeableAPPLE(struct _glapi_table *disp) {
- return (_glptr_ObjectPurgeableAPPLE) (GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE));
-}
-
-static inline void SET_ObjectPurgeableAPPLE(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum, GLuint, GLenum)) {
- SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn);
-}
-
-typedef GLenum (GLAPIENTRYP _glptr_ObjectUnpurgeableAPPLE)(GLenum, GLuint, GLenum);
-#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) \
- (* GET_ObjectUnpurgeableAPPLE(disp)) parameters
-static inline _glptr_ObjectUnpurgeableAPPLE GET_ObjectUnpurgeableAPPLE(struct _glapi_table *disp) {
- return (_glptr_ObjectUnpurgeableAPPLE) (GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE));
-}
-
-static inline void SET_ObjectUnpurgeableAPPLE(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum, GLuint, GLenum)) {
- SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn);
-}
-
-typedef GLuint (GLAPIENTRYP _glptr_CreateShaderProgramEXT)(GLenum, const GLchar *);
-#define CALL_CreateShaderProgramEXT(disp, parameters) \
- (* GET_CreateShaderProgramEXT(disp)) parameters
-static inline _glptr_CreateShaderProgramEXT GET_CreateShaderProgramEXT(struct _glapi_table *disp) {
- return (_glptr_CreateShaderProgramEXT) (GET_by_offset(disp, _gloffset_CreateShaderProgramEXT));
-}
-
-static inline void SET_CreateShaderProgramEXT(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum, const GLchar *)) {
- SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn);
-}
-
-typedef void (GLAPIENTRYP _glptr_TextureBarrierNV)(void);
-#define CALL_TextureBarrierNV(disp, parameters) \
- (* GET_TextureBarrierNV(disp)) parameters
-static inline _glptr_TextureBarrierNV GET_TextureBarrierNV(struct _glapi_table *disp) {
- return (_glptr_TextureBarrierNV) (GET_by_offset(disp, _gloffset_TextureBarrierNV));
-}
-
-static inline void SET_TextureBarrierNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) {
- SET_by_offset(disp, _gloffset_TextureBarrierNV, fn);
-}
-
#endif /* !defined( _DISPATCH_H_ ) */
OPCODE_ALPHA_FUNC,
OPCODE_BIND_TEXTURE,
OPCODE_BITMAP,
- OPCODE_BLEND_COLOR,
- OPCODE_BLEND_EQUATION,
- OPCODE_BLEND_EQUATION_SEPARATE,
- OPCODE_BLEND_FUNC_SEPARATE,
+ OPCODE_BLEND_FUNC,
OPCODE_CALL_LIST,
OPCODE_CALL_LIST_OFFSET,
OPCODE_CLIP_PLANE,
OPCODE_COLOR_MASK,
OPCODE_COLOR_MATERIAL,
- OPCODE_COLOR_TABLE,
- OPCODE_COLOR_TABLE_PARAMETER_FV,
- OPCODE_COLOR_TABLE_PARAMETER_IV,
- OPCODE_COLOR_SUB_TABLE,
- OPCODE_CONVOLUTION_FILTER_1D,
- OPCODE_CONVOLUTION_FILTER_2D,
- OPCODE_CONVOLUTION_PARAMETER_I,
- OPCODE_CONVOLUTION_PARAMETER_IV,
- OPCODE_CONVOLUTION_PARAMETER_F,
- OPCODE_CONVOLUTION_PARAMETER_FV,
- OPCODE_COPY_COLOR_SUB_TABLE,
- OPCODE_COPY_COLOR_TABLE,
OPCODE_COPY_PIXELS,
OPCODE_COPY_TEX_IMAGE1D,
OPCODE_COPY_TEX_IMAGE2D,
OPCODE_COPY_TEX_SUB_IMAGE1D,
OPCODE_COPY_TEX_SUB_IMAGE2D,
- OPCODE_COPY_TEX_SUB_IMAGE3D,
OPCODE_CULL_FACE,
OPCODE_DEPTH_FUNC,
OPCODE_DEPTH_MASK,
OPCODE_FRONT_FACE,
OPCODE_FRUSTUM,
OPCODE_HINT,
- OPCODE_HISTOGRAM,
OPCODE_INDEX_MASK,
OPCODE_INIT_NAMES,
OPCODE_LIGHT,
OPCODE_MAPGRID1,
OPCODE_MAPGRID2,
OPCODE_MATRIX_MODE,
- OPCODE_MIN_MAX,
OPCODE_MULT_MATRIX,
OPCODE_ORTHO,
OPCODE_PASSTHROUGH,
OPCODE_PUSH_NAME,
OPCODE_RASTER_POS,
OPCODE_READ_BUFFER,
- OPCODE_RESET_HISTOGRAM,
- OPCODE_RESET_MIN_MAX,
OPCODE_ROTATE,
OPCODE_SCALE,
OPCODE_SCISSOR,
OPCODE_TEXPARAMETER,
OPCODE_TEX_IMAGE1D,
OPCODE_TEX_IMAGE2D,
- OPCODE_TEX_IMAGE3D,
OPCODE_TEX_SUB_IMAGE1D,
OPCODE_TEX_SUB_IMAGE2D,
- OPCODE_TEX_SUB_IMAGE3D,
OPCODE_TRANSLATE,
OPCODE_VIEWPORT,
OPCODE_WINDOW_POS,
OPCODE_TEXPARAMETER_I,
OPCODE_TEXPARAMETER_UI,
- /* GL_NV_texture_barrier */
- OPCODE_TEXTURE_BARRIER_NV,
-
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
free(n[7].data);
n += InstSize[n[0].opcode];
break;
- case OPCODE_COLOR_TABLE:
- free(n[6].data);
- n += InstSize[n[0].opcode];
- break;
- case OPCODE_COLOR_SUB_TABLE:
- free(n[6].data);
- n += InstSize[n[0].opcode];
- break;
- case OPCODE_CONVOLUTION_FILTER_1D:
- free(n[6].data);
- n += InstSize[n[0].opcode];
- break;
- case OPCODE_CONVOLUTION_FILTER_2D:
- free(n[7].data);
- n += InstSize[n[0].opcode];
- break;
case OPCODE_POLYGON_STIPPLE:
free(n[1].data);
n += InstSize[n[0].opcode];
free(n[9].data);
n += InstSize[n[0].opcode];
break;
- case OPCODE_TEX_IMAGE3D:
- free(n[10].data);
- n += InstSize[n[0].opcode];
- break;
case OPCODE_TEX_SUB_IMAGE1D:
free(n[7].data);
n += InstSize[n[0].opcode];
free(n[9].data);
n += InstSize[n[0].opcode];
break;
- case OPCODE_TEX_SUB_IMAGE3D:
- free(n[11].data);
- n += InstSize[n[0].opcode];
- break;
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
free(block);
}
-static void GLAPIENTRY
-save_BlendEquation(GLenum mode)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION, 1);
- if (n) {
- n[1].e = mode;
- }
- if (ctx->ExecuteFlag) {
- CALL_BlendEquation(ctx->Exec, (mode));
- }
-}
-
-
-static void GLAPIENTRY
-save_BlendEquationSeparateEXT(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, 2);
- if (n) {
- n[1].e = modeRGB;
- n[2].e = modeA;
- }
- if (ctx->ExecuteFlag) {
- CALL_BlendEquationSeparateEXT(ctx->Exec, (modeRGB, modeA));
- }
-}
-
-
-static void GLAPIENTRY
-save_BlendFuncSeparateEXT(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, 4);
- if (n) {
- n[1].e = sfactorRGB;
- n[2].e = dfactorRGB;
- n[3].e = sfactorA;
- n[4].e = dfactorA;
- }
- if (ctx->ExecuteFlag) {
- CALL_BlendFuncSeparateEXT(ctx->Exec,
- (sfactorRGB, dfactorRGB, sfactorA, dfactorA));
- }
-}
-
-
static void GLAPIENTRY
save_BlendFunc(GLenum srcfactor, GLenum dstfactor)
-{
- save_BlendFuncSeparateEXT(srcfactor, dstfactor, srcfactor, dstfactor);
-}
-
-
-static void GLAPIENTRY
-save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_BLEND_COLOR, 4);
+ n = alloc_instruction(ctx, OPCODE_BLEND_FUNC, 2);
if (n) {
- n[1].f = red;
- n[2].f = green;
- n[3].f = blue;
- n[4].f = alpha;
+ n[1].e = srcfactor;
+ n[2].e = dstfactor;
}
if (ctx->ExecuteFlag) {
- CALL_BlendColor(ctx->Exec, (red, green, blue, alpha));
+ CALL_BlendFunc(ctx->Exec, (srcfactor, dstfactor));
}
}
+
static void invalidate_saved_current_state( struct gl_context *ctx )
{
GLint i;
}
-static void GLAPIENTRY
-save_ColorTable(GLenum target, GLenum internalFormat,
- GLsizei width, GLenum format, GLenum type,
- const GLvoid * table)
-{
- GET_CURRENT_CONTEXT(ctx);
- if (_mesa_is_proxy_texture(target)) {
- /* execute immediately */
- CALL_ColorTable(ctx->Exec, (target, internalFormat, width,
- format, type, table));
- }
- else {
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_COLOR_TABLE, 6);
- if (n) {
- n[1].e = target;
- n[2].e = internalFormat;
- n[3].i = width;
- n[4].e = format;
- n[5].e = type;
- n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, table,
- &ctx->Unpack);
- }
- if (ctx->ExecuteFlag) {
- CALL_ColorTable(ctx->Exec, (target, internalFormat, width,
- format, type, table));
- }
- }
-}
-
-
-
-static void GLAPIENTRY
-save_ColorTableParameterfv(GLenum target, GLenum pname,
- const GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-
- n = alloc_instruction(ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6);
- if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].f = params[0];
- if (pname == GL_COLOR_TABLE_SGI ||
- pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||
- pname == GL_TEXTURE_COLOR_TABLE_SGI) {
- n[4].f = params[1];
- n[5].f = params[2];
- n[6].f = params[3];
- }
- }
-
- if (ctx->ExecuteFlag) {
- CALL_ColorTableParameterfv(ctx->Exec, (target, pname, params));
- }
-}
-
-
-static void GLAPIENTRY
-save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-
- n = alloc_instruction(ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6);
- if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].i = params[0];
- if (pname == GL_COLOR_TABLE_SGI ||
- pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||
- pname == GL_TEXTURE_COLOR_TABLE_SGI) {
- n[4].i = params[1];
- n[5].i = params[2];
- n[6].i = params[3];
- }
- }
-
- if (ctx->ExecuteFlag) {
- CALL_ColorTableParameteriv(ctx->Exec, (target, pname, params));
- }
-}
-
-
-
-static void GLAPIENTRY
-save_ColorSubTable(GLenum target, GLsizei start, GLsizei count,
- GLenum format, GLenum type, const GLvoid * table)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_COLOR_SUB_TABLE, 6);
- if (n) {
- n[1].e = target;
- n[2].i = start;
- n[3].i = count;
- n[4].e = format;
- n[5].e = type;
- n[6].data = unpack_image(ctx, 1, count, 1, 1, format, type, table,
- &ctx->Unpack);
- }
- if (ctx->ExecuteFlag) {
- CALL_ColorSubTable(ctx->Exec,
- (target, start, count, format, type, table));
- }
-}
-
-
-static void GLAPIENTRY
-save_CopyColorSubTable(GLenum target, GLsizei start,
- GLint x, GLint y, GLsizei width)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5);
- if (n) {
- n[1].e = target;
- n[2].i = start;
- n[3].i = x;
- n[4].i = y;
- n[5].i = width;
- }
- if (ctx->ExecuteFlag) {
- CALL_CopyColorSubTable(ctx->Exec, (target, start, x, y, width));
- }
-}
-
-
-static void GLAPIENTRY
-save_CopyColorTable(GLenum target, GLenum internalformat,
- GLint x, GLint y, GLsizei width)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_COPY_COLOR_TABLE, 5);
- if (n) {
- n[1].e = target;
- n[2].e = internalformat;
- n[3].i = x;
- n[4].i = y;
- n[5].i = width;
- }
- if (ctx->ExecuteFlag) {
- CALL_CopyColorTable(ctx->Exec, (target, internalformat, x, y, width));
- }
-}
-
-
-static void GLAPIENTRY
-save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
- GLenum format, GLenum type, const GLvoid * filter)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-
- n = alloc_instruction(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
- if (n) {
- n[1].e = target;
- n[2].e = internalFormat;
- n[3].i = width;
- n[4].e = format;
- n[5].e = type;
- n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, filter,
- &ctx->Unpack);
- }
- if (ctx->ExecuteFlag) {
- CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width,
- format, type, filter));
- }
-}
-
-
-static void GLAPIENTRY
-save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
- GLsizei width, GLsizei height, GLenum format,
- GLenum type, const GLvoid * filter)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-
- n = alloc_instruction(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
- if (n) {
- n[1].e = target;
- n[2].e = internalFormat;
- n[3].i = width;
- n[4].i = height;
- n[5].e = format;
- n[6].e = type;
- n[7].data = unpack_image(ctx, 2, width, height, 1, format, type, filter,
- &ctx->Unpack);
- }
- if (ctx->ExecuteFlag) {
- CALL_ConvolutionFilter2D(ctx->Exec,
- (target, internalFormat, width, height, format,
- type, filter));
- }
-}
-
-
-static void GLAPIENTRY
-save_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3);
- if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].i = param;
- }
- if (ctx->ExecuteFlag) {
- CALL_ConvolutionParameteri(ctx->Exec, (target, pname, param));
- }
-}
-
-
-static void GLAPIENTRY
-save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6);
- if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].i = params[0];
- if (pname == GL_CONVOLUTION_BORDER_COLOR ||
- pname == GL_CONVOLUTION_FILTER_SCALE ||
- pname == GL_CONVOLUTION_FILTER_BIAS) {
- 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_ConvolutionParameteriv(ctx->Exec, (target, pname, params));
- }
-}
-
-
-static void GLAPIENTRY
-save_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3);
- if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].f = param;
- }
- if (ctx->ExecuteFlag) {
- CALL_ConvolutionParameterf(ctx->Exec, (target, pname, param));
- }
-}
-
-
-static void GLAPIENTRY
-save_ConvolutionParameterfv(GLenum target, GLenum pname,
- const GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6);
- if (n) {
- n[1].e = target;
- n[2].e = pname;
- n[3].f = params[0];
- if (pname == GL_CONVOLUTION_BORDER_COLOR ||
- pname == GL_CONVOLUTION_FILTER_SCALE ||
- pname == GL_CONVOLUTION_FILTER_BIAS) {
- 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_ConvolutionParameterfv(ctx->Exec, (target, pname, params));
- }
-}
-
-
static void GLAPIENTRY
save_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
{
}
-static void GLAPIENTRY
-save_CopyTexSubImage3D(GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint x, GLint y, GLsizei width, GLint height)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9);
- 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 = x;
- n[7].i = y;
- n[8].i = width;
- n[9].i = height;
- }
- if (ctx->ExecuteFlag) {
- CALL_CopyTexSubImage3D(ctx->Exec, (target, level,
- xoffset, yoffset, zoffset,
- x, y, width, height));
- }
-}
-
-
static void GLAPIENTRY
save_CullFace(GLenum mode)
{
}
-static void GLAPIENTRY
-save_Histogram(GLenum target, GLsizei width, GLenum internalFormat,
- GLboolean sink)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_HISTOGRAM, 4);
- if (n) {
- n[1].e = target;
- n[2].i = width;
- n[3].e = internalFormat;
- n[4].b = sink;
- }
- if (ctx->ExecuteFlag) {
- CALL_Histogram(ctx->Exec, (target, width, internalFormat, sink));
- }
-}
-
-
static void GLAPIENTRY
save_IndexMask(GLuint mask)
{
}
-static void GLAPIENTRY
-save_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_MIN_MAX, 3);
- if (n) {
- n[1].e = target;
- n[2].e = internalFormat;
- n[3].b = sink;
- }
- if (ctx->ExecuteFlag) {
- CALL_Minmax(ctx->Exec, (target, internalFormat, sink));
- }
-}
-
-
static void GLAPIENTRY
save_MultMatrixf(const GLfloat * m)
{
}
-static void GLAPIENTRY
-save_ResetHistogram(GLenum target)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_RESET_HISTOGRAM, 1);
- if (n) {
- n[1].e = target;
- }
- if (ctx->ExecuteFlag) {
- CALL_ResetHistogram(ctx->Exec, (target));
- }
-}
-
-
-static void GLAPIENTRY
-save_ResetMinmax(GLenum target)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_RESET_MIN_MAX, 1);
- if (n) {
- n[1].e = target;
- }
- if (ctx->ExecuteFlag) {
- CALL_ResetMinmax(ctx->Exec, (target));
- }
-}
-
-
static void GLAPIENTRY
save_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
{
}
-static void GLAPIENTRY
-save_TexImage3D(GLenum target,
- GLint level, GLint internalFormat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border,
- GLenum format, GLenum type, const GLvoid * pixels)
-{
- GET_CURRENT_CONTEXT(ctx);
- if (target == GL_PROXY_TEXTURE_3D) {
- /* don't compile, execute immediately */
- CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
- height, depth, border, format, type,
- pixels));
- }
- else {
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_TEX_IMAGE3D, 10);
- if (n) {
- n[1].e = target;
- n[2].i = level;
- n[3].i = (GLint) internalFormat;
- n[4].i = (GLint) width;
- n[5].i = (GLint) height;
- n[6].i = (GLint) depth;
- n[7].i = border;
- n[8].e = format;
- n[9].e = type;
- n[10].data = unpack_image(ctx, 3, width, height, depth, format, type,
- pixels, &ctx->Unpack);
- }
- if (ctx->ExecuteFlag) {
- CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width,
- height, depth, border, format, type,
- pixels));
- }
- }
-}
-
-
static void GLAPIENTRY
save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
GLsizei width, GLenum format, GLenum type,
}
-static void GLAPIENTRY
-save_TexSubImage3D(GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid * pixels)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
-
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
-
- n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE3D, 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].e = type;
- n[11].data = unpack_image(ctx, 3, width, height, depth, format, type,
- pixels, &ctx->Unpack);
- }
- if (ctx->ExecuteFlag) {
- CALL_TexSubImage3D(ctx->Exec, (target, level,
- xoffset, yoffset, zoffset,
- width, height, depth, format, type,
- pixels));
- }
-}
-
-
static void GLAPIENTRY
save_Translatef(GLfloat x, GLfloat y, GLfloat z)
{
static void GLAPIENTRY
save_SampleCoverageARB(GLclampf value, GLboolean invert)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = alloc_instruction(ctx, OPCODE_SAMPLE_COVERAGE, 2);
- if (n) {
- n[1].f = value;
- n[2].b = invert;
- }
- if (ctx->ExecuteFlag) {
- CALL_SampleCoverageARB(ctx->Exec, (value, invert));
- }
-}
-
-
-/*
- * GL_NV_vertex_program
- */
-
-#if FEATURE_NV_fragment_program
-static void GLAPIENTRY
-save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name,
- 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_NAMED_PARAMETER_NV, 6);
- if (n) {
- GLubyte *nameCopy = (GLubyte *) malloc(len);
- if (!nameCopy) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV");
- return;
- }
- memcpy(nameCopy, name, len);
- n[1].ui = id;
- n[2].i = len;
- n[3].data = nameCopy;
- n[4].f = x;
- n[5].f = y;
- n[6].f = z;
- n[7].f = w;
- }
- if (ctx->ExecuteFlag) {
- CALL_ProgramNamedParameter4fNV(ctx->Exec, (id, len, name, x, y, z, w));
- }
-}
-
-static void GLAPIENTRY
-save_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name,
- const float v[])
-{
- save_ProgramNamedParameter4fNV(id, len, name, v[0], v[1], v[2], v[3]);
-}
-
-
-static void GLAPIENTRY
-save_ProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name,
- GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
- save_ProgramNamedParameter4fNV(id, len, name, (GLfloat) x, (GLfloat) y,
- (GLfloat) z, (GLfloat) w);
-}
-
-
-static void GLAPIENTRY
-save_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name,
- const double v[])
-{
- save_ProgramNamedParameter4fNV(id, len, name, (GLfloat) v[0],
- (GLfloat) v[1], (GLfloat) v[2],
- (GLfloat) v[3]);
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_SAMPLE_COVERAGE, 2);
+ if (n) {
+ n[1].f = value;
+ n[2].b = invert;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_SampleCoverageARB(ctx->Exec, (value, invert));
+ }
}
-#endif
/* GL_EXT_depth_bounds_test */
static void GLAPIENTRY
save_Color3f(GLfloat x, GLfloat y, GLfloat z)
{
- save_Attr3fNV(VERT_ATTRIB_COLOR0, x, y, z);
+ save_Attr3fNV(VERT_ATTRIB_COLOR, x, y, z);
}
static void GLAPIENTRY
save_Color3fv(const GLfloat * v)
{
- save_Attr3fNV(VERT_ATTRIB_COLOR0, v[0], v[1], v[2]);
+ save_Attr3fNV(VERT_ATTRIB_COLOR, v[0], v[1], v[2]);
}
static void GLAPIENTRY
save_Color4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- save_Attr4fNV(VERT_ATTRIB_COLOR0, x, y, z, w);
+ save_Attr4fNV(VERT_ATTRIB_COLOR, x, y, z, w);
}
static void GLAPIENTRY
save_Color4fv(const GLfloat * v)
{
- save_Attr4fNV(VERT_ATTRIB_COLOR0, v[0], v[1], v[2], v[3]);
-}
-
-static void GLAPIENTRY
-save_SecondaryColor3fEXT(GLfloat x, GLfloat y, GLfloat z)
-{
- save_Attr3fNV(VERT_ATTRIB_COLOR1, x, y, z);
-}
-
-static void GLAPIENTRY
-save_SecondaryColor3fvEXT(const GLfloat * v)
-{
- save_Attr3fNV(VERT_ATTRIB_COLOR1, v[0], v[1], v[2]);
+ save_Attr4fNV(VERT_ATTRIB_COLOR, v[0], v[1], v[2], v[3]);
}
CALL_GetTexParameterIuivEXT(ctx->Exec, (target, pname, params));
}
-
-/* GL_NV_texture_barrier */
-static void GLAPIENTRY
-save_TextureBarrierNV(void)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- alloc_instruction(ctx, OPCODE_TEXTURE_BARRIER_NV, 0);
- if (ctx->ExecuteFlag) {
- CALL_TextureBarrierNV(ctx->Exec, ());
- }
-}
-
/**
* Save an error-generating command into display list.
*
ctx->Unpack = save; /* restore */
}
break;
- case OPCODE_BLEND_COLOR:
- CALL_BlendColor(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
- break;
- case OPCODE_BLEND_EQUATION:
- CALL_BlendEquation(ctx->Exec, (n[1].e));
- break;
- case OPCODE_BLEND_EQUATION_SEPARATE:
- CALL_BlendEquationSeparateEXT(ctx->Exec, (n[1].e, n[2].e));
- break;
- case OPCODE_BLEND_FUNC_SEPARATE:
- CALL_BlendFuncSeparateEXT(ctx->Exec,
- (n[1].e, n[2].e, n[3].e, n[4].e));
+ case OPCODE_BLEND_FUNC:
+ CALL_BlendFunc(ctx->Exec, (n[1].e, n[2].e));
break;
-
case OPCODE_CALL_LIST:
/* Generated by glCallList(), don't add ListBase */
if (ctx->ListState.CallDepth < MAX_LIST_NESTING) {
case OPCODE_COLOR_MATERIAL:
CALL_ColorMaterial(ctx->Exec, (n[1].e, n[2].e));
break;
- case OPCODE_COLOR_TABLE:
- {
- const struct gl_pixelstore_attrib save = ctx->Unpack;
- ctx->Unpack = ctx->DefaultPacking;
- CALL_ColorTable(ctx->Exec, (n[1].e, n[2].e, n[3].i, n[4].e,
- n[5].e, n[6].data));
- ctx->Unpack = save; /* restore */
- }
- break;
- case OPCODE_COLOR_TABLE_PARAMETER_FV:
- {
- GLfloat params[4];
- params[0] = n[3].f;
- params[1] = n[4].f;
- params[2] = n[5].f;
- params[3] = n[6].f;
- CALL_ColorTableParameterfv(ctx->Exec,
- (n[1].e, n[2].e, params));
- }
- break;
- case OPCODE_COLOR_TABLE_PARAMETER_IV:
- {
- GLint params[4];
- params[0] = n[3].i;
- params[1] = n[4].i;
- params[2] = n[5].i;
- params[3] = n[6].i;
- CALL_ColorTableParameteriv(ctx->Exec,
- (n[1].e, n[2].e, params));
- }
- break;
- case OPCODE_COLOR_SUB_TABLE:
- {
- const struct gl_pixelstore_attrib save = ctx->Unpack;
- ctx->Unpack = ctx->DefaultPacking;
- CALL_ColorSubTable(ctx->Exec, (n[1].e, n[2].i, n[3].i,
- n[4].e, n[5].e, n[6].data));
- ctx->Unpack = save; /* restore */
- }
- break;
- case OPCODE_CONVOLUTION_FILTER_1D:
- {
- const struct gl_pixelstore_attrib save = ctx->Unpack;
- ctx->Unpack = ctx->DefaultPacking;
- CALL_ConvolutionFilter1D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
- n[4].e, n[5].e,
- n[6].data));
- ctx->Unpack = save; /* restore */
- }
- break;
- case OPCODE_CONVOLUTION_FILTER_2D:
- {
- const struct gl_pixelstore_attrib save = ctx->Unpack;
- ctx->Unpack = ctx->DefaultPacking;
- CALL_ConvolutionFilter2D(ctx->Exec, (n[1].e, n[2].i, n[3].i,
- n[4].i, n[5].e, n[6].e,
- n[7].data));
- ctx->Unpack = save; /* restore */
- }
- break;
- case OPCODE_CONVOLUTION_PARAMETER_I:
- CALL_ConvolutionParameteri(ctx->Exec, (n[1].e, n[2].e, n[3].i));
- break;
- case OPCODE_CONVOLUTION_PARAMETER_IV:
- {
- GLint params[4];
- params[0] = n[3].i;
- params[1] = n[4].i;
- params[2] = n[5].i;
- params[3] = n[6].i;
- CALL_ConvolutionParameteriv(ctx->Exec,
- (n[1].e, n[2].e, params));
- }
- break;
- case OPCODE_CONVOLUTION_PARAMETER_F:
- CALL_ConvolutionParameterf(ctx->Exec, (n[1].e, n[2].e, n[3].f));
- break;
- case OPCODE_CONVOLUTION_PARAMETER_FV:
- {
- GLfloat params[4];
- params[0] = n[3].f;
- params[1] = n[4].f;
- params[2] = n[5].f;
- params[3] = n[6].f;
- CALL_ConvolutionParameterfv(ctx->Exec,
- (n[1].e, n[2].e, params));
- }
- break;
- case OPCODE_COPY_COLOR_SUB_TABLE:
- CALL_CopyColorSubTable(ctx->Exec, (n[1].e, n[2].i,
- n[3].i, n[4].i, n[5].i));
- break;
- case OPCODE_COPY_COLOR_TABLE:
- CALL_CopyColorSubTable(ctx->Exec, (n[1].e, n[2].i,
- n[3].i, n[4].i, n[5].i));
- break;
case OPCODE_COPY_PIXELS:
CALL_CopyPixels(ctx->Exec, (n[1].i, n[2].i,
(GLsizei) n[3].i, (GLsizei) n[4].i,
n[4].i, n[5].i, n[6].i, n[7].i,
n[8].i));
break;
- case OPCODE_COPY_TEX_SUB_IMAGE3D:
- CALL_CopyTexSubImage3D(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].i));
- break;
case OPCODE_CULL_FACE:
CALL_CullFace(ctx->Exec, (n[1].e));
break;
case OPCODE_HINT:
CALL_Hint(ctx->Exec, (n[1].e, n[2].e));
break;
- case OPCODE_HISTOGRAM:
- CALL_Histogram(ctx->Exec, (n[1].e, n[2].i, n[3].e, n[4].b));
- break;
case OPCODE_INDEX_MASK:
CALL_IndexMask(ctx->Exec, (n[1].ui));
break;
case OPCODE_MATRIX_MODE:
CALL_MatrixMode(ctx->Exec, (n[1].e));
break;
- case OPCODE_MIN_MAX:
- CALL_Minmax(ctx->Exec, (n[1].e, n[2].e, n[3].b));
- break;
case OPCODE_MULT_MATRIX:
if (sizeof(Node) == sizeof(GLfloat)) {
CALL_MultMatrixf(ctx->Exec, (&n[1].f));
case OPCODE_READ_BUFFER:
CALL_ReadBuffer(ctx->Exec, (n[1].e));
break;
- case OPCODE_RESET_HISTOGRAM:
- CALL_ResetHistogram(ctx->Exec, (n[1].e));
- break;
- case OPCODE_RESET_MIN_MAX:
- CALL_ResetMinmax(ctx->Exec, (n[1].e));
- break;
case OPCODE_ROTATE:
CALL_Rotatef(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
break;
ctx->Unpack = save; /* restore */
}
break;
- case OPCODE_TEX_IMAGE3D:
- {
- const struct gl_pixelstore_attrib save = ctx->Unpack;
- ctx->Unpack = ctx->DefaultPacking;
- CALL_TexImage3D(ctx->Exec, (n[1].e, /* target */
- n[2].i, /* level */
- n[3].i, /* components */
- n[4].i, /* width */
- n[5].i, /* height */
- n[6].i, /* depth */
- n[7].e, /* border */
- n[8].e, /* format */
- n[9].e, /* type */
- n[10].data));
- ctx->Unpack = save; /* restore */
- }
- break;
case OPCODE_TEX_SUB_IMAGE1D:
{
const struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = save; /* restore */
}
break;
- case OPCODE_TEX_SUB_IMAGE3D:
- {
- const struct gl_pixelstore_attrib save = ctx->Unpack;
- ctx->Unpack = ctx->DefaultPacking;
- CALL_TexSubImage3D(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].e,
- n[11].data));
- ctx->Unpack = save; /* restore */
- }
- break;
case OPCODE_TRANSLATE:
CALL_Translatef(ctx->Exec, (n[1].f, n[2].f, n[3].f));
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
- case OPCODE_EXECUTE_PROGRAM_NV:
- {
- GLfloat v[4];
- v[0] = n[3].f;
- v[1] = n[4].f;
- v[2] = n[5].f;
- v[3] = n[6].f;
- CALL_ExecuteProgramNV(ctx->Exec, (n[1].e, n[2].ui, v));
- }
- break;
- case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
- CALL_RequestResidentProgramsNV(ctx->Exec, (n[1].ui,
- (GLuint *) n[2].data));
- break;
- case OPCODE_LOAD_PROGRAM_NV:
- CALL_LoadProgramNV(ctx->Exec, (n[1].e, n[2].ui, n[3].i,
- (const GLubyte *) n[4].data));
- break;
- case OPCODE_TRACK_MATRIX_NV:
- CALL_TrackMatrixNV(ctx->Exec, (n[1].e, n[2].ui, n[3].e, n[4].e));
- break;
-#endif
-
-#if FEATURE_NV_fragment_program
- case OPCODE_PROGRAM_NAMED_PARAMETER_NV:
- CALL_ProgramNamedParameter4fNV(ctx->Exec, (n[1].ui, n[2].i,
- (const GLubyte *) n[3].
- data, n[4].f, n[5].f,
- n[6].f, n[7].f));
- break;
-#endif
case OPCODE_DEPTH_BOUNDS_EXT:
CALL_DepthBoundsEXT(ctx->Exec, (n[1].f, n[2].f));
}
break;
- case OPCODE_TEXTURE_BARRIER_NV:
- CALL_TextureBarrierNV(ctx->Exec, ());
- break;
-
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
CALL_VertexPointer(ctx->Exec, (size, type, stride, ptr));
}
-static void GLAPIENTRY
-exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
- GLint x, GLint y, GLsizei width)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_CopyConvolutionFilter1D(ctx->Exec,
- (target, internalFormat, x, y, width));
-}
-
-static void GLAPIENTRY
-exec_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat,
- GLint x, GLint y, GLsizei width, GLsizei height)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_CopyConvolutionFilter2D(ctx->Exec,
- (target, internalFormat, x, y, width,
- height));
-}
-
-static void GLAPIENTRY
-exec_GetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * data)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetColorTable(ctx->Exec, (target, format, type, data));
-}
-
-static void GLAPIENTRY
-exec_GetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetColorTableParameterfv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetColorTableParameteriv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
- GLvoid * image)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetConvolutionFilter(ctx->Exec, (target, format, type, image));
-}
-
-static void GLAPIENTRY
-exec_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetConvolutionParameterfv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetConvolutionParameteriv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
- GLenum type, GLvoid *values)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetHistogram(ctx->Exec, (target, reset, format, type, values));
-}
-
-static void GLAPIENTRY
-exec_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetHistogramParameterfv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetHistogramParameteriv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
- GLenum type, GLvoid *values)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetMinmax(ctx->Exec, (target, reset, format, type, values));
-}
-
-static void GLAPIENTRY
-exec_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetMinmaxParameterfv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetMinmaxParameteriv(ctx->Exec, (target, pname, params));
-}
-
-static void GLAPIENTRY
-exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *row, GLvoid *column, GLvoid *span)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetSeparableFilter(ctx->Exec,
- (target, format, type, row, column, span));
-}
-
-static void GLAPIENTRY
-exec_SeparableFilter2D(GLenum target, GLenum internalFormat,
- GLsizei width, GLsizei height, GLenum format,
- GLenum type, const GLvoid *row, const GLvoid *column)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_SeparableFilter2D(ctx->Exec,
- (target, internalFormat, width, height, format,
- type, row, column));
-}
-
static void GLAPIENTRY
exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride,
GLsizei count, const GLvoid *ptr)
CALL_UnlockArraysEXT(ctx->Exec, ());
}
-static void GLAPIENTRY
-exec_SecondaryColorPointerEXT(GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_SecondaryColorPointerEXT(ctx->Exec, (size, type, stride, ptr));
-}
-
static void GLAPIENTRY
exec_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
{
SET_TexSubImage2D(table, save_TexSubImage2D);
SET_VertexPointer(table, exec_VertexPointer);
- /* GL 1.2 */
- SET_CopyTexSubImage3D(table, save_CopyTexSubImage3D);
- SET_TexImage3D(table, save_TexImage3D);
- SET_TexSubImage3D(table, save_TexSubImage3D);
-
- /* GL_ARB_imaging */
- /* Not all are supported */
- SET_BlendColor(table, save_BlendColor);
- SET_BlendEquation(table, save_BlendEquation);
- SET_ColorSubTable(table, save_ColorSubTable);
- SET_ColorTable(table, save_ColorTable);
- SET_ColorTableParameterfv(table, save_ColorTableParameterfv);
- SET_ColorTableParameteriv(table, save_ColorTableParameteriv);
- SET_ConvolutionFilter1D(table, save_ConvolutionFilter1D);
- SET_ConvolutionFilter2D(table, save_ConvolutionFilter2D);
- SET_ConvolutionParameterf(table, save_ConvolutionParameterf);
- SET_ConvolutionParameterfv(table, save_ConvolutionParameterfv);
- SET_ConvolutionParameteri(table, save_ConvolutionParameteri);
- SET_ConvolutionParameteriv(table, save_ConvolutionParameteriv);
- SET_CopyColorSubTable(table, save_CopyColorSubTable);
- SET_CopyColorTable(table, save_CopyColorTable);
- SET_CopyConvolutionFilter1D(table, exec_CopyConvolutionFilter1D);
- SET_CopyConvolutionFilter2D(table, exec_CopyConvolutionFilter2D);
- SET_GetColorTable(table, exec_GetColorTable);
- SET_GetColorTableParameterfv(table, exec_GetColorTableParameterfv);
- SET_GetColorTableParameteriv(table, exec_GetColorTableParameteriv);
- SET_GetConvolutionFilter(table, exec_GetConvolutionFilter);
- SET_GetConvolutionParameterfv(table, exec_GetConvolutionParameterfv);
- SET_GetConvolutionParameteriv(table, exec_GetConvolutionParameteriv);
- SET_GetHistogram(table, exec_GetHistogram);
- SET_GetHistogramParameterfv(table, exec_GetHistogramParameterfv);
- SET_GetHistogramParameteriv(table, exec_GetHistogramParameteriv);
- SET_GetMinmax(table, exec_GetMinmax);
- SET_GetMinmaxParameterfv(table, exec_GetMinmaxParameterfv);
- SET_GetMinmaxParameteriv(table, exec_GetMinmaxParameteriv);
- SET_GetSeparableFilter(table, exec_GetSeparableFilter);
- SET_Histogram(table, save_Histogram);
- SET_Minmax(table, save_Minmax);
- SET_ResetHistogram(table, save_ResetHistogram);
- SET_ResetMinmax(table, save_ResetMinmax);
- SET_SeparableFilter2D(table, exec_SeparableFilter2D);
-
- /* 2. GL_EXT_blend_color */
-#if 0
- SET_BlendColorEXT(table, save_BlendColorEXT);
-#endif
-
/* 3. GL_EXT_polygon_offset */
SET_PolygonOffsetEXT(table, save_PolygonOffsetEXT);
- /* 6. GL_EXT_texture3d */
-#if 0
- SET_CopyTexSubImage3DEXT(table, save_CopyTexSubImage3D);
- SET_TexImage3DEXT(table, save_TexImage3DEXT);
- SET_TexSubImage3DEXT(table, save_TexSubImage3D);
-#endif
-
- /* 14. GL_SGI_color_table */
-#if 0
- SET_ColorTableSGI(table, save_ColorTable);
- SET_ColorSubTableSGI(table, save_ColorSubTable);
- SET_GetColorTableSGI(table, exec_GetColorTable);
- SET_GetColorTableParameterfvSGI(table, exec_GetColorTableParameterfv);
- SET_GetColorTableParameterivSGI(table, exec_GetColorTableParameteriv);
-#endif
-
/* 30. GL_EXT_vertex_array */
SET_ColorPointerEXT(table, exec_ColorPointerEXT);
SET_EdgeFlagPointerEXT(table, exec_EdgeFlagPointerEXT);
SET_TexCoordPointerEXT(table, exec_TexCoordPointerEXT);
SET_VertexPointerEXT(table, exec_VertexPointerEXT);
- /* 37. GL_EXT_blend_minmax */
-#if 0
- SET_BlendEquationEXT(table, save_BlendEquationEXT);
-#endif
-
/* 54. GL_EXT_point_parameters */
SET_PointParameterfEXT(table, save_PointParameterfEXT);
SET_PointParameterfvEXT(table, save_PointParameterfvEXT);
SET_LockArraysEXT(table, exec_LockArraysEXT);
SET_UnlockArraysEXT(table, exec_UnlockArraysEXT);
- /* 145. GL_EXT_secondary_color */
- SET_SecondaryColorPointerEXT(table, exec_SecondaryColorPointerEXT);
-
/* 149. GL_EXT_fog_coord */
SET_FogCoordPointerEXT(table, exec_FogCoordPointerEXT);
- /* 173. GL_EXT_blend_func_separate */
- SET_BlendFuncSeparateEXT(table, save_BlendFuncSeparateEXT);
-
/* 197. GL_MESA_window_pos */
SET_WindowPos2dMESA(table, save_WindowPos2dMESA);
SET_WindowPos2dvMESA(table, save_WindowPos2dvMESA);
SET_MultiModeDrawArraysIBM(table, exec_MultiModeDrawArraysIBM);
SET_MultiModeDrawElementsIBM(table, exec_MultiModeDrawElementsIBM);
-#if FEATURE_NV_vertex_program
- /* 233. GL_NV_vertex_program */
- /* The following commands DO NOT go into display lists:
- * AreProgramsResidentNV, IsProgramNV, GenProgramsNV, DeleteProgramsNV,
- * VertexAttribPointerNV, GetProgram*, GetVertexAttrib*
- */
- SET_ExecuteProgramNV(table, save_ExecuteProgramNV);
- SET_AreProgramsResidentNV(table, _mesa_AreProgramsResidentNV);
- SET_RequestResidentProgramsNV(table, save_RequestResidentProgramsNV);
- SET_GetProgramParameterfvNV(table, _mesa_GetProgramParameterfvNV);
- SET_GetProgramParameterdvNV(table, _mesa_GetProgramParameterdvNV);
- SET_GetTrackMatrixivNV(table, _mesa_GetTrackMatrixivNV);
- SET_LoadProgramNV(table, save_LoadProgramNV);
- SET_ProgramParameters4dvNV(table, save_ProgramParameters4dvNV);
- SET_ProgramParameters4fvNV(table, save_ProgramParameters4fvNV);
- SET_TrackMatrixNV(table, save_TrackMatrixNV);
-#endif
-
- /* 282. GL_NV_fragment_program */
-#if FEATURE_NV_fragment_program
- SET_ProgramNamedParameter4fNV(table, save_ProgramNamedParameter4fNV);
- SET_ProgramNamedParameter4dNV(table, save_ProgramNamedParameter4dNV);
- SET_ProgramNamedParameter4fvNV(table, save_ProgramNamedParameter4fvNV);
- SET_ProgramNamedParameter4dvNV(table, save_ProgramNamedParameter4dvNV);
- SET_GetProgramNamedParameterfvNV(table,
- _mesa_GetProgramNamedParameterfvNV);
- SET_GetProgramNamedParameterdvNV(table,
- _mesa_GetProgramNamedParameterdvNV);
-#endif
-
/* 262. GL_NV_point_sprite */
SET_PointParameteriNV(table, save_PointParameteriNV);
SET_PointParameterivNV(table, save_PointParameterivNV);
- /* 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);
-
- /* GL_ARB_vertex_array_object */
- SET_BindVertexArray(table, _mesa_BindVertexArray);
- SET_GenVertexArrays(table, _mesa_GenVertexArrays);
-
/* ???. GL_EXT_depth_bounds_test */
SET_DepthBoundsEXT(table, save_DepthBoundsEXT);
SET_MapBufferARB(table, _mesa_MapBufferARB);
SET_UnmapBufferARB(table, _mesa_UnmapBufferARB);
- /* 299. GL_EXT_blend_equation_separate */
- SET_BlendEquationSeparateEXT(table, save_BlendEquationSeparateEXT);
-
/* 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
- /* 371. GL_APPLE_object_purgeable */
-#if FEATURE_APPLE_object_purgeable
- SET_ObjectPurgeableAPPLE(table, _mesa_ObjectPurgeableAPPLE);
- SET_ObjectUnpurgeableAPPLE(table, _mesa_ObjectUnpurgeableAPPLE);
- SET_GetObjectParameterivAPPLE(table, _mesa_GetObjectParameterivAPPLE);
-#endif
-
/* GL_EXT_texture_integer */
SET_ClearColorIiEXT(table, save_ClearColorIi);
SET_ClearColorIuiEXT(table, save_ClearColorIui);
SET_GetTexParameterIivEXT(table, exec_GetTexParameterIiv);
SET_GetTexParameterIuivEXT(table, exec_GetTexParameterIuiv);
- /* GL_NV_texture_barrier */
- SET_TextureBarrierNV(table, save_TextureBarrierNV);
-
/* GL_ARB_texture_storage (no dlist support) */
SET_TexStorage1D(table, _mesa_TexStorage1D);
SET_TexStorage2D(table, _mesa_TexStorage2D);
printf("CallList %d + offset %u = %u\n", (int) n[1].ui,
ctx->List.ListBase, ctx->List.ListBase + n[1].ui);
break;
- case OPCODE_COLOR_TABLE_PARAMETER_FV:
- printf("ColorTableParameterfv %s %s %f %f %f %f\n",
- enum_string(n[1].e), enum_string(n[2].e),
- n[3].f, n[4].f, n[5].f, n[6].f);
- break;
- case OPCODE_COLOR_TABLE_PARAMETER_IV:
- printf("ColorTableParameteriv %s %s %d %d %d %d\n",
- enum_string(n[1].e), enum_string(n[2].e),
- n[3].i, n[4].i, n[5].i, n[6].i);
- break;
case OPCODE_DISABLE:
printf("Disable %s\n", enum_string(n[1].e));
break;
vfmt->Materialfv = save_Materialfv;
vfmt->Normal3f = save_Normal3f;
vfmt->Normal3fv = save_Normal3fv;
- vfmt->SecondaryColor3fEXT = save_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = save_SecondaryColor3fvEXT;
vfmt->TexCoord1f = save_TexCoord1f;
vfmt->TexCoord1fv = save_TexCoord1fv;
vfmt->TexCoord2f = save_TexCoord2f;
#if 0
vfmt->DrawArrays = 0;
vfmt->DrawElements = 0;
- vfmt->DrawRangeElements = 0;
#endif
}
static void
client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
{
- struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLbitfield64 flag;
GLboolean *var;
switch (cap) {
case GL_VERTEX_ARRAY:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Enabled;
flag = VERT_BIT_POS;
break;
case GL_NORMAL_ARRAY:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL].Enabled;
flag = VERT_BIT_NORMAL;
break;
case GL_COLOR_ARRAY:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled;
- flag = VERT_BIT_COLOR0;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR].Enabled;
+ flag = VERT_BIT_COLOR;
break;
case GL_INDEX_ARRAY:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled;
flag = VERT_BIT_COLOR_INDEX;
break;
case GL_TEXTURE_COORD_ARRAY:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX].Enabled;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_TEX].Enabled;
flag = VERT_BIT_TEX;
break;
case GL_EDGE_FLAG_ARRAY:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled;
flag = VERT_BIT_EDGEFLAG;
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled;
+ var = &ctx->Array.VertexAttrib[VERT_ATTRIB_FOG].Enabled;
flag = VERT_BIT_FOG;
break;
- case GL_SECONDARY_COLOR_ARRAY_EXT:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled;
- flag = VERT_BIT_COLOR1;
- break;
-
-#if FEATURE_point_size_array
- case GL_POINT_SIZE_ARRAY_OES:
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled;
- flag = VERT_BIT_POINT_SIZE;
- break;
-#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, cap);
- {
- GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV;
- ASSERT(VERT_ATTRIB_GENERIC(n) < Elements(ctx->Array.ArrayObj->VertexAttrib));
- var = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(n)].Enabled;
- flag = VERT_BIT_GENERIC(n);
- }
- break;
-#endif /* FEATURE_NV_vertex_program */
default:
goto invalid_enum_error;
*var = state;
if (state)
- ctx->Array.ArrayObj->_Enabled |= flag;
+ ctx->Array._Enabled |= flag;
else
- ctx->Array.ArrayObj->_Enabled &= ~flag;
+ ctx->Array._Enabled &= ~flag;
if (ctx->Driver.Enable) {
ctx->Driver.Enable( ctx, cap, state );
ctx->Light.ColorMaterialEnabled = state;
if (state) {
_mesa_update_color_material( ctx,
- ctx->Current.Attrib[VERT_ATTRIB_COLOR0] );
+ ctx->Current.Attrib[VERT_ATTRIB_COLOR] );
}
break;
case GL_CULL_FACE:
return;
}
break;
- case GL_TEXTURE_3D:
- if (!enable_texture(ctx, state, TEXTURE_3D_BIT)) {
- return;
- }
- break;
case GL_TEXTURE_GEN_S:
case GL_TEXTURE_GEN_T:
case GL_TEXTURE_GEN_R:
return is_texture_enabled(ctx, TEXTURE_1D_BIT);
case GL_TEXTURE_2D:
return is_texture_enabled(ctx, TEXTURE_2D_BIT);
- case GL_TEXTURE_3D:
- return is_texture_enabled(ctx, TEXTURE_3D_BIT);
case GL_TEXTURE_GEN_S:
case GL_TEXTURE_GEN_T:
case GL_TEXTURE_GEN_R:
/* client-side state */
case GL_VERTEX_ARRAY:
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled != 0);
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Enabled != 0);
case GL_NORMAL_ARRAY:
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled != 0);
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL].Enabled != 0);
case GL_COLOR_ARRAY:
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled != 0);
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR].Enabled != 0);
case GL_INDEX_ARRAY:
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled != 0);
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled != 0);
case GL_TEXTURE_COORD_ARRAY:
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX]
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_TEX]
.Enabled != 0);
case GL_EDGE_FLAG_ARRAY:
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled != 0);
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled != 0);
case GL_FOG_COORDINATE_ARRAY_EXT:
CHECK_EXTENSION(EXT_fog_coord);
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled != 0);
- case GL_SECONDARY_COLOR_ARRAY_EXT:
- CHECK_EXTENSION(EXT_secondary_color);
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled != 0);
+ return (ctx->Array.VertexAttrib[VERT_ATTRIB_FOG].Enabled != 0);
#if FEATURE_point_size_array
case GL_POINT_SIZE_ARRAY_OES:
return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled != 0);
*/
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_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_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_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_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},
o(EXT_packed_pixels),
o(EXT_rescale_normal),
o(EXT_separate_specular_color),
- o(EXT_texture3D),
/* Vendor Extensions */
o(APPLE_packed_pixels),
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_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.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
}
{
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;
}
ctx->Fog.Density = 1.0;
ctx->Fog.Start = 0.0;
ctx->Fog.End = 1.0;
- ctx->Fog.ColorSumEnabled = GL_FALSE;
ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT;
ctx->Fog._Scale = 1.0f;
ctx->Fog.FogDistanceMode = GL_EYE_PLANE_ABSOLUTE_NV;
}
-/* MESA_FORMAT_RGBA_FLOAT32 */
-
-static void
-pack_ubyte_RGBA_FLOAT32(const GLubyte src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = UBYTE_TO_FLOAT(src[0]);
- d[1] = UBYTE_TO_FLOAT(src[1]);
- d[2] = UBYTE_TO_FLOAT(src[2]);
- d[3] = UBYTE_TO_FLOAT(src[3]);
-}
-
-static void
-pack_float_RGBA_FLOAT32(const GLfloat src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = src[0];
- d[1] = src[1];
- d[2] = src[2];
- d[3] = src[3];
-}
-
-
-/* MESA_FORMAT_RGBA_FLOAT16 */
-
-static void
-pack_ubyte_RGBA_FLOAT16(const GLubyte src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[0]));
- d[1] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[1]));
- d[2] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[2]));
- d[3] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[3]));
-}
-
-static void
-pack_float_RGBA_FLOAT16(const GLfloat src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(src[0]);
- d[1] = _mesa_float_to_half(src[1]);
- d[2] = _mesa_float_to_half(src[2]);
- d[3] = _mesa_float_to_half(src[3]);
-}
-
-
-/* MESA_FORMAT_RGB_FLOAT32 */
-
-static void
-pack_ubyte_RGB_FLOAT32(const GLubyte src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = UBYTE_TO_FLOAT(src[0]);
- d[1] = UBYTE_TO_FLOAT(src[1]);
- d[2] = UBYTE_TO_FLOAT(src[2]);
-}
-
-static void
-pack_float_RGB_FLOAT32(const GLfloat src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = src[0];
- d[1] = src[1];
- d[2] = src[2];
-}
-
-
-/* MESA_FORMAT_RGB_FLOAT16 */
-
-static void
-pack_ubyte_RGB_FLOAT16(const GLubyte src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[0]));
- d[1] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[1]));
- d[2] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[2]));
-}
-
-static void
-pack_float_RGB_FLOAT16(const GLfloat src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(src[0]);
- d[1] = _mesa_float_to_half(src[1]);
- d[2] = _mesa_float_to_half(src[2]);
-}
-
-
-/* MESA_FORMAT_ALPHA_FLOAT32 */
-
-static void
-pack_ubyte_ALPHA_FLOAT32(const GLubyte src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = UBYTE_TO_FLOAT(src[ACOMP]);
-}
-
-static void
-pack_float_ALPHA_FLOAT32(const GLfloat src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = src[ACOMP];
-}
-
-
-/* MESA_FORMAT_ALPHA_FLOAT16 */
-
-static void
-pack_ubyte_ALPHA_FLOAT16(const GLubyte src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[ACOMP]));
-}
-
-static void
-pack_float_ALPHA_FLOAT16(const GLfloat src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(src[ACOMP]);
-}
-
-
-/* MESA_FORMAT_LUMINANCE_FLOAT32 (and INTENSITY_FLOAT32, R_FLOAT32) */
-
-static void
-pack_ubyte_LUMINANCE_FLOAT32(const GLubyte src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = UBYTE_TO_FLOAT(src[RCOMP]);
-}
-
-static void
-pack_float_LUMINANCE_FLOAT32(const GLfloat src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = src[RCOMP];
-}
-
-
-/* MESA_FORMAT_LUMINANCE_FLOAT16 (and INTENSITY_FLOAT16, R_FLOAT32) */
-
-static void
-pack_ubyte_LUMINANCE_FLOAT16(const GLubyte src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[RCOMP]));
-}
-
-static void
-pack_float_LUMINANCE_FLOAT16(const GLfloat src[4], void *dst)
-{
- GLhalfARB *d = ((GLhalfARB *) dst);
- d[0] = _mesa_float_to_half(src[RCOMP]);
-}
-
-
-/* MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 */
-
-static void
-pack_ubyte_LUMINANCE_ALPHA_FLOAT32(const GLubyte src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = UBYTE_TO_FLOAT(src[RCOMP]);
- d[1] = UBYTE_TO_FLOAT(src[ACOMP]);
-}
-
-static void
-pack_float_LUMINANCE_ALPHA_FLOAT32(const GLfloat src[4], void *dst)
-{
- GLfloat *d = ((GLfloat *) dst);
- d[0] = src[RCOMP];
- d[1] = src[ACOMP];
-}
-
-
-/* MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 */
-
-static void
-pack_ubyte_LUMINANCE_ALPHA_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[ACOMP]));
-}
-
-static void
-pack_float_LUMINANCE_ALPHA_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[ACOMP]);
-}
-
-
/* MESA_FORMAT_RGBA_16 */
static void
table[MESA_FORMAT_Z32] = NULL;
table[MESA_FORMAT_S8] = NULL;
- 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;
- table[MESA_FORMAT_RGB_FLOAT16] = pack_ubyte_RGB_FLOAT16;
- table[MESA_FORMAT_ALPHA_FLOAT32] = pack_ubyte_ALPHA_FLOAT32;
- table[MESA_FORMAT_ALPHA_FLOAT16] = pack_ubyte_ALPHA_FLOAT16;
- table[MESA_FORMAT_LUMINANCE_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_LUMINANCE_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = pack_ubyte_LUMINANCE_ALPHA_FLOAT32;
- 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;
-
/* n/a */
table[MESA_FORMAT_RGBA_INT8] = NULL; /* pack_ubyte_RGBA_INT8 */
table[MESA_FORMAT_RGBA_INT16] = NULL; /* pack_ubyte_RGBA_INT16 */
table[MESA_FORMAT_Z32] = NULL;
table[MESA_FORMAT_S8] = 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;
- table[MESA_FORMAT_RGB_FLOAT16] = pack_float_RGB_FLOAT16;
- table[MESA_FORMAT_ALPHA_FLOAT32] = pack_float_ALPHA_FLOAT32;
- table[MESA_FORMAT_ALPHA_FLOAT16] = pack_float_ALPHA_FLOAT16;
- table[MESA_FORMAT_LUMINANCE_FLOAT32] = pack_float_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_LUMINANCE_FLOAT16] = pack_float_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = pack_float_LUMINANCE_ALPHA_FLOAT32;
- table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = pack_float_LUMINANCE_ALPHA_FLOAT16;
-
- table[MESA_FORMAT_INTENSITY_FLOAT32] = pack_float_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_INTENSITY_FLOAT16] = pack_float_LUMINANCE_FLOAT16;
-
/* n/a */
table[MESA_FORMAT_RGBA_INT8] = NULL;
table[MESA_FORMAT_RGBA_INT16] = NULL;
}
}
-static void
-unpack_RGBA_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*4+0];
- dst[i][GCOMP] = s[i*4+1];
- dst[i][BCOMP] = s[i*4+2];
- dst[i][ACOMP] = s[i*4+3];
- }
-}
-
-static void
-unpack_RGBA_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*4+0]);
- dst[i][GCOMP] = _mesa_half_to_float(s[i*4+1]);
- dst[i][BCOMP] = _mesa_half_to_float(s[i*4+2]);
- dst[i][ACOMP] = _mesa_half_to_float(s[i*4+3]);
- }
-}
-
-static void
-unpack_RGB_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*3+0];
- dst[i][GCOMP] = s[i*3+1];
- dst[i][BCOMP] = s[i*3+2];
- dst[i][ACOMP] = 1.0F;
- }
-}
-
-static void
-unpack_RGB_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*3+0]);
- dst[i][GCOMP] = _mesa_half_to_float(s[i*3+1]);
- dst[i][BCOMP] = _mesa_half_to_float(s[i*3+2]);
- dst[i][ACOMP] = 1.0F;
- }
-}
-
-static void
-unpack_ALPHA_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] = 0.0F;
- dst[i][ACOMP] = s[i];
- }
-}
-
-static void
-unpack_ALPHA_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] = 0.0F;
- dst[i][ACOMP] = _mesa_half_to_float(s[i]);
- }
-}
-
-static void
-unpack_LUMINANCE_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] = s[i];
- dst[i][ACOMP] = 1.0F;
- }
-}
-
-static void
-unpack_LUMINANCE_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] = _mesa_half_to_float(s[i]);
- dst[i][ACOMP] = 1.0F;
- }
-}
-
-static void
-unpack_LUMINANCE_ALPHA_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] = s[i*2+0];
- dst[i][ACOMP] = s[i*2+1];
- }
-}
-
-static void
-unpack_LUMINANCE_ALPHA_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] = _mesa_half_to_float(s[i*2+0]);
- dst[i][ACOMP] = _mesa_half_to_float(s[i*2+1]);
- }
-}
-
-static void
-unpack_INTENSITY_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] =
- dst[i][ACOMP] = s[i];
- }
-}
-
-static void
-unpack_INTENSITY_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] =
- dst[i][GCOMP] =
- dst[i][BCOMP] =
- dst[i][ACOMP] = _mesa_half_to_float(s[i]);
- }
-}
-
static void
unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n)
{
table[MESA_FORMAT_Z32] = unpack_Z32;
table[MESA_FORMAT_S8] = unpack_S8;
- table[MESA_FORMAT_RGBA_FLOAT32] = unpack_RGBA_FLOAT32;
- table[MESA_FORMAT_RGBA_FLOAT16] = unpack_RGBA_FLOAT16;
- table[MESA_FORMAT_RGB_FLOAT32] = unpack_RGB_FLOAT32;
- table[MESA_FORMAT_RGB_FLOAT16] = unpack_RGB_FLOAT16;
- table[MESA_FORMAT_ALPHA_FLOAT32] = unpack_ALPHA_FLOAT32;
- table[MESA_FORMAT_ALPHA_FLOAT16] = unpack_ALPHA_FLOAT16;
- table[MESA_FORMAT_LUMINANCE_FLOAT32] = unpack_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_LUMINANCE_FLOAT16] = unpack_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = unpack_LUMINANCE_ALPHA_FLOAT32;
- 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_RGBA_INT8] = unpack_RGBA_INT8;
table[MESA_FORMAT_RGBA_INT16] = unpack_RGBA_INT16;
table[MESA_FORMAT_RGBA_INT32] = unpack_RGBA_INT32;
0, 0, 0, 0, 8, /* Lum/Int/Index/Depth/StencilBits */
1, 1, 1 /* BlockWidth/Height,Bytes */
},
- {
- MESA_FORMAT_RGBA_FLOAT32,
- "MESA_FORMAT_RGBA_FLOAT32",
- GL_RGBA,
- GL_FLOAT,
- 32, 32, 32, 32,
- 0, 0, 0, 0, 0,
- 1, 1, 16
- },
- {
- MESA_FORMAT_RGBA_FLOAT16,
- "MESA_FORMAT_RGBA_FLOAT16",
- GL_RGBA,
- GL_FLOAT,
- 16, 16, 16, 16,
- 0, 0, 0, 0, 0,
- 1, 1, 8
- },
- {
- MESA_FORMAT_RGB_FLOAT32,
- "MESA_FORMAT_RGB_FLOAT32",
- GL_RGB,
- GL_FLOAT,
- 32, 32, 32, 0,
- 0, 0, 0, 0, 0,
- 1, 1, 12
- },
- {
- MESA_FORMAT_RGB_FLOAT16,
- "MESA_FORMAT_RGB_FLOAT16",
- GL_RGB,
- GL_FLOAT,
- 16, 16, 16, 0,
- 0, 0, 0, 0, 0,
- 1, 1, 6
- },
- {
- MESA_FORMAT_ALPHA_FLOAT32,
- "MESA_FORMAT_ALPHA_FLOAT32",
- GL_ALPHA,
- GL_FLOAT,
- 0, 0, 0, 32,
- 0, 0, 0, 0, 0,
- 1, 1, 4
- },
- {
- MESA_FORMAT_ALPHA_FLOAT16,
- "MESA_FORMAT_ALPHA_FLOAT16",
- GL_ALPHA,
- GL_FLOAT,
- 0, 0, 0, 16,
- 0, 0, 0, 0, 0,
- 1, 1, 2
- },
- {
- MESA_FORMAT_LUMINANCE_FLOAT32,
- "MESA_FORMAT_LUMINANCE_FLOAT32",
- GL_LUMINANCE,
- GL_FLOAT,
- 0, 0, 0, 0,
- 32, 0, 0, 0, 0,
- 1, 1, 4
- },
- {
- MESA_FORMAT_LUMINANCE_FLOAT16,
- "MESA_FORMAT_LUMINANCE_FLOAT16",
- GL_LUMINANCE,
- GL_FLOAT,
- 0, 0, 0, 0,
- 16, 0, 0, 0, 0,
- 1, 1, 2
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
- "MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32",
- GL_LUMINANCE_ALPHA,
- GL_FLOAT,
- 0, 0, 0, 32,
- 32, 0, 0, 0, 0,
- 1, 1, 8
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
- "MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16",
- GL_LUMINANCE_ALPHA,
- GL_FLOAT,
- 0, 0, 0, 16,
- 16, 0, 0, 0, 0,
- 1, 1, 4
- },
- {
- MESA_FORMAT_INTENSITY_FLOAT32,
- "MESA_FORMAT_INTENSITY_FLOAT32",
- GL_INTENSITY,
- GL_FLOAT,
- 0, 0, 0, 0,
- 0, 32, 0, 0, 0,
- 1, 1, 4
- },
- {
- MESA_FORMAT_INTENSITY_FLOAT16,
- "MESA_FORMAT_INTENSITY_FLOAT16",
- GL_INTENSITY,
- GL_FLOAT,
- 0, 0, 0, 0,
- 0, 16, 0, 0, 0,
- 1, 1, 2
- },
- /* unnormalized signed int formats */
/* unnormalized unsigned int formats */
{
MESA_FORMAT_ALPHA_UINT8,
*comps = 4;
return;
- case MESA_FORMAT_RGBA_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 4;
- return;
- case MESA_FORMAT_RGBA_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 4;
- return;
- case MESA_FORMAT_RGB_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 3;
- return;
- case MESA_FORMAT_RGB_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 3;
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 2;
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 2;
- return;
- case MESA_FORMAT_ALPHA_FLOAT32:
- case MESA_FORMAT_LUMINANCE_FLOAT32:
- case MESA_FORMAT_INTENSITY_FLOAT32:
- *datatype = GL_FLOAT;
- *comps = 1;
- return;
- case MESA_FORMAT_ALPHA_FLOAT16:
- case MESA_FORMAT_LUMINANCE_FLOAT16:
- case MESA_FORMAT_INTENSITY_FLOAT16:
- *datatype = GL_HALF_FLOAT_ARB;
- *comps = 1;
- return;
-
case MESA_FORMAT_ALPHA_UINT8:
case MESA_FORMAT_LUMINANCE_UINT8:
case MESA_FORMAT_INTENSITY_UINT8:
case MESA_FORMAT_S8:
return GL_FALSE;
- case MESA_FORMAT_RGBA_FLOAT32:
- return format == GL_RGBA && type == GL_FLOAT;
- case MESA_FORMAT_RGBA_FLOAT16:
- return format == GL_RGBA && type == GL_HALF_FLOAT;
-
- case MESA_FORMAT_RGB_FLOAT32:
- return format == GL_RGB && type == GL_FLOAT;
- case MESA_FORMAT_RGB_FLOAT16:
- return format == GL_RGB && type == GL_HALF_FLOAT;
-
- case MESA_FORMAT_ALPHA_FLOAT32:
- return format == GL_ALPHA && type == GL_FLOAT;
- case MESA_FORMAT_ALPHA_FLOAT16:
- return format == GL_ALPHA && type == GL_HALF_FLOAT;
-
- case MESA_FORMAT_LUMINANCE_FLOAT32:
- return format == GL_LUMINANCE && type == GL_FLOAT;
- case MESA_FORMAT_LUMINANCE_FLOAT16:
- return format == GL_LUMINANCE && type == GL_HALF_FLOAT;
-
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
- return format == GL_LUMINANCE_ALPHA && type == GL_FLOAT;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
- return format == GL_LUMINANCE_ALPHA && type == GL_HALF_FLOAT;
-
- case MESA_FORMAT_INTENSITY_FLOAT32:
- return format == GL_INTENSITY && type == GL_FLOAT;
- case MESA_FORMAT_INTENSITY_FLOAT16:
- return format == GL_INTENSITY && 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:
MESA_FORMAT_S8, /* SSSS SSSS */
/*@}*/
- /**
- * \name Floating point texture formats.
- */
- /*@{*/
- MESA_FORMAT_RGBA_FLOAT32,
- MESA_FORMAT_RGBA_FLOAT16,
- MESA_FORMAT_RGB_FLOAT32,
- MESA_FORMAT_RGB_FLOAT16,
- MESA_FORMAT_ALPHA_FLOAT32,
- MESA_FORMAT_ALPHA_FLOAT16,
- MESA_FORMAT_LUMINANCE_FLOAT32,
- MESA_FORMAT_LUMINANCE_FLOAT16,
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
- MESA_FORMAT_INTENSITY_FLOAT32,
- MESA_FORMAT_INTENSITY_FLOAT16,
- /*@}*/
-
/**
* \name Non-normalized signed integer formats.
* XXX Note: these are just stand-ins for some better hardware
#define CONTEXT_FIELD(field, type) \
LOC_CONTEXT, type, offsetof(struct gl_context, field)
#define ARRAY_FIELD(field, type) \
- LOC_ARRAY, type, offsetof(struct gl_array_object, field)
+ LOC_ARRAY, type, offsetof(struct gl_array_attrib, field)
#define CONST(value) \
LOC_CONTEXT, TYPE_CONST, value
EXTRA_EXT(NV_point_sprite);
EXTRA_EXT(NV_light_max_exponent);
EXTRA_EXT(EXT_depth_bounds_test);
-EXTRA_EXT(APPLE_vertex_array_object);
EXTRA_EXT(EXT_compiled_vertex_array);
EXTRA_EXT2(NV_point_sprite, ARB_point_sprite);
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 };
#define API_OPENGL_BIT (1 << API_OPENGL)
static const struct value_desc values[] = {
{ GL_ALPHA_BITS, BUFFER_INT(Visual.alphaBits), extra_new_buffers },
{ GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA },
- { GL_BLEND_SRC, CONTEXT_ENUM(Color.SrcRGB), NO_EXTRA },
+ { GL_BLEND_SRC, CONTEXT_ENUM(Color.SrcFactor), NO_EXTRA },
{ GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers },
{ GL_COLOR_CLEAR_VALUE, LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA },
{ GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */
/* XXX: OES_blend_subtract */
- { 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.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 },
- { GL_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT_N, 0, NO_EXTRA },
+ { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.SrcFactor), NO_EXTRA },
+ { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.DstFactor), NO_EXTRA },
/* GL_ARB_multisample */
{ GL_SAMPLE_ALPHA_TO_COVERAGE_ARB,
{ 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, NO_EXTRA },
- { GL_BLEND_DST, CONTEXT_ENUM(Color.DstRGB), NO_EXTRA },
+ { GL_BLEND_DST, CONTEXT_ENUM(Color.DstFactor), 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 },
{ GL_CLIP_DISTANCE7, CONTEXT_BIT7(Transform.ClipPlanesEnabled), extra_valid_clip_distance },
{ GL_COLOR_MATERIAL, CONTEXT_BOOL(Light.ColorMaterialEnabled), NO_EXTRA },
{ GL_CURRENT_COLOR,
- CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR0][0], TYPE_FLOATN_4),
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR][0], TYPE_FLOATN_4),
extra_flush_current },
{ GL_CURRENT_NORMAL,
CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_NORMAL][0], TYPE_FLOATN_3),
{ GL_NORMAL_ARRAY, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_NORMAL].Enabled), NO_EXTRA },
{ GL_NORMAL_ARRAY_TYPE, ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_NORMAL].Type), NO_EXTRA },
{ GL_NORMAL_ARRAY_STRIDE, ARRAY_INT(VertexAttrib[VERT_ATTRIB_NORMAL].Stride), NO_EXTRA },
- { GL_COLOR_ARRAY, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR0].Enabled), NO_EXTRA },
- { GL_COLOR_ARRAY_SIZE, ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Size), NO_EXTRA },
- { GL_COLOR_ARRAY_TYPE, ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA },
- { GL_COLOR_ARRAY_STRIDE, ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA },
+ { GL_COLOR_ARRAY, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR].Enabled), NO_EXTRA },
+ { GL_COLOR_ARRAY_SIZE, ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR].Size), NO_EXTRA },
+ { GL_COLOR_ARRAY_TYPE, ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR].Type), NO_EXTRA },
+ { GL_COLOR_ARRAY_STRIDE, ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR].Stride), NO_EXTRA },
{ GL_TEXTURE_COORD_ARRAY,
LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA },
{ GL_TEXTURE_COORD_ARRAY_SIZE,
/* GL_ARB_vertex_buffer_object */
{ GL_VERTEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_POS].BufferObj), NO_EXTRA },
+ offsetof(struct gl_array_attrib, VertexAttrib[VERT_ATTRIB_POS].BufferObj), NO_EXTRA },
{ GL_NORMAL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_NORMAL].BufferObj), NO_EXTRA },
+ offsetof(struct gl_array_attrib, VertexAttrib[VERT_ATTRIB_NORMAL].BufferObj), NO_EXTRA },
{ GL_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_COLOR0].BufferObj), NO_EXTRA },
+ offsetof(struct gl_array_attrib, VertexAttrib[VERT_ATTRIB_COLOR].BufferObj), NO_EXTRA },
{ GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
/* GL_OES_point_sprite */
{ 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_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 },
{ GL_CURRENT_RASTER_DISTANCE, CONTEXT_FLOAT(Current.RasterDistance), NO_EXTRA },
{ GL_CURRENT_RASTER_INDEX, CONST(1), NO_EXTRA },
{ GL_CURRENT_RASTER_POSITION, CONTEXT_FLOAT4(Current.RasterPos[0]), NO_EXTRA },
- { GL_CURRENT_RASTER_SECONDARY_COLOR,
- CONTEXT_FIELD(Current.RasterSecondaryColor[0], TYPE_FLOATN_4), NO_EXTRA },
{ GL_CURRENT_RASTER_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0,
extra_valid_texture_unit },
{ GL_CURRENT_RASTER_POSITION_VALID, CONTEXT_BOOL(Current.RasterPosValid), NO_EXTRA },
{ GL_INDEX_OFFSET, CONTEXT_INT(Pixel.IndexOffset), NO_EXTRA },
{ GL_INDEX_SHIFT, CONTEXT_INT(Pixel.IndexShift), NO_EXTRA },
{ GL_INDEX_WRITEMASK, CONTEXT_INT(Color.IndexMask), NO_EXTRA },
- { GL_LIGHT_MODEL_COLOR_CONTROL, CONTEXT_ENUM(Light.Model.ColorControl), NO_EXTRA },
{ GL_LIGHT_MODEL_LOCAL_VIEWER, CONTEXT_BOOL(Light.Model.LocalViewer), NO_EXTRA },
{ GL_LINE_STIPPLE, CONTEXT_BOOL(Line.StippleFlag), NO_EXTRA },
{ GL_LINE_STIPPLE_PATTERN, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
{ GL_STEREO, BUFFER_INT(Visual.stereoMode), NO_EXTRA },
{ GL_TEXTURE_1D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
- { GL_TEXTURE_3D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
{ GL_TEXTURE_BINDING_1D, LOC_CUSTOM, TYPE_INT, TEXTURE_1D_INDEX, NO_EXTRA },
CONTEXT_MATRIX_T(ProjectionMatrixStack.Top), NO_EXTRA },
{ GL_TRANSPOSE_TEXTURE_MATRIX_ARB, CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA },
- /* GL_EXT_secondary_color */
- { GL_CURRENT_SECONDARY_COLOR_EXT,
- CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4),
- extra_EXT_secondary_color_flush_current },
- { GL_SECONDARY_COLOR_ARRAY_EXT, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR1].Enabled),
- extra_EXT_secondary_color },
- { GL_SECONDARY_COLOR_ARRAY_TYPE_EXT, ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR1].Type),
- extra_EXT_secondary_color },
- { GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT, ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Stride),
- extra_EXT_secondary_color },
- { GL_SECONDARY_COLOR_ARRAY_SIZE_EXT, ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Size),
- extra_EXT_secondary_color },
-
/* GL_EXT_fog_coord */
{ GL_CURRENT_FOG_COORDINATE_EXT,
CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]),
/* GL_ARB_vertex_buffer_object */
{ GL_INDEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_COLOR_INDEX].BufferObj), NO_EXTRA },
+ offsetof(struct gl_array_attrib, VertexAttrib[VERT_ATTRIB_COLOR_INDEX].BufferObj), NO_EXTRA },
{ GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_EDGEFLAG].BufferObj), NO_EXTRA },
- { GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_COLOR1].BufferObj), NO_EXTRA },
+ offsetof(struct gl_array_attrib, VertexAttrib[VERT_ATTRIB_EDGEFLAG].BufferObj), NO_EXTRA },
{ GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
- offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA },
+ offsetof(struct gl_array_attrib, VertexAttrib[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA },
/* GL_EXT_depth_bounds_test */
{ GL_DEPTH_BOUNDS_TEST_EXT, CONTEXT_BOOL(Depth.BoundsTest),
{ GL_DEPTH_BOUNDS_EXT, CONTEXT_FLOAT2(Depth.BoundsMin),
extra_EXT_depth_bounds_test },
- /* GL_APPLE_vertex_array_object */
- { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name),
- extra_APPLE_vertex_array_object },
-
/* GL_EXT_texture_integer */
{ GL_RGBA_INTEGER_MODE_EXT, BUFFER_BOOL(_IntegerColor),
extra_EXT_texture_integer },
switch (d->pname) {
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
- case GL_TEXTURE_3D:
case GL_TEXTURE_CUBE_MAP_ARB:
v->value_bool = _mesa_IsEnabled(d->pname);
break;
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];
+ array = &ctx->Array.VertexAttrib[VERT_ATTRIB_TEX];
v->value_int = *(GLuint *) ((char *) array + d->offset);
break;
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
buffer_obj = (struct gl_buffer_object **)
- ((char *) ctx->Array.ArrayObj + d->offset);
+ ((char *) &ctx->Array + d->offset);
v->value_int = (*buffer_obj)->Name;
break;
- case GL_ARRAY_BUFFER_BINDING_ARB:
- v->value_int = ctx->Array.ArrayBufferObj->Name;
- break;
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
v->value_int =
- ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX].BufferObj->Name;
+ ctx->Array.VertexAttrib[VERT_ATTRIB_TEX].BufferObj->Name;
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- v->value_int = ctx->Array.ArrayObj->ElementArrayBufferObj->Name;
+ v->value_int = ctx->Array.ElementArrayBufferObj->Name;
break;
case GL_FOG_COLOR:
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:
- COPY_4FV(v->value_float_4, ctx->Color.BlendColor);
- break;
case GL_ALPHA_TEST_REF:
v->value_float = ctx->Color.AlphaRef;
break;
*p = ((char *) ctx + d->offset);
return d;
case LOC_ARRAY:
- *p = ((char *) ctx->Array.ArrayObj + d->offset);
+ *p = ((char *)&ctx->Array + d->offset);
return d;
case LOC_TEXUNIT:
unit = &ctx->Texture.Unit;
extern const GLubyte * GLAPIENTRY
_mesa_GetString( GLenum name );
-extern const GLubyte * GLAPIENTRY
-_mesa_GetStringi(GLenum name, GLuint index);
-
extern GLenum GLAPIENTRY
_mesa_GetError( void );
}
-/**
- * GL3
- */
-const GLubyte * GLAPIENTRY
-_mesa_GetStringi(GLenum name, GLuint index)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- if (!ctx)
- return NULL;
-
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
-
- switch (name) {
- case GL_EXTENSIONS:
- if (index >= _mesa_get_extension_count(ctx)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetStringi(index=%u)", index);
- return (const GLubyte *) 0;
- }
- return _mesa_get_enabled_extension(ctx, index);
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" );
- return (const GLubyte *) 0;
- }
-}
-
-
/**
* Return pointer-valued state, such as a vertex array pointer.
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Ptr;
break;
case GL_NORMAL_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL].Ptr;
break;
case GL_COLOR_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Ptr;
- break;
- case GL_SECONDARY_COLOR_ARRAY_POINTER_EXT:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR].Ptr;
break;
case GL_FOG_COORDINATE_ARRAY_POINTER_EXT:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_FOG].Ptr;
break;
case GL_INDEX_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Ptr;
break;
case GL_TEXTURE_COORD_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_TEX].Ptr;
break;
case GL_EDGE_FLAG_ARRAY_POINTER:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Ptr;
+ *params = (GLvoid *) ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG].Ptr;
break;
case GL_FEEDBACK_BUFFER_POINTER:
*params = ctx->Feedback.Buffer;
case GL_SELECTION_BUFFER_POINTER:
*params = ctx->Select.Buffer;
break;
-#if FEATURE_point_size_array
- case GL_POINT_SIZE_ARRAY_POINTER_OES:
- *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Ptr;
- break;
-#endif
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
return;
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
#endif
-#ifndef GL_ATI_texture_compression_3dc
-#define GL_ATI_texture_compression_3dc 1
-#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837
-#endif
-
/**
* Internal token to represent a GLSL shader program (a collection of
+++ /dev/null
-/*
- * 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.
- */
-
-#include <precomp.h>
-
-#include "histogram.h"
-
-#if FEATURE_histogram
-
-/**********************************************************************
- * API functions
- */
-
-
-/* this is defined below */
-static void GLAPIENTRY _mesa_ResetMinmax(GLenum target);
-
-
-static void GLAPIENTRY
-_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format,
- GLenum type, GLvoid *values)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmax");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format,
- GLenum type, GLvoid *values)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogram");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameterfv");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetHistogramParameteriv");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameterfv");
-}
-
-
-static void GLAPIENTRY
-_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glGetMinmaxParameteriv");
-}
-
-
-static void GLAPIENTRY
-_mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glHistogram");
-}
-
-
-static void GLAPIENTRY
-_mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glMinmax");
-}
-
-
-static void GLAPIENTRY
-_mesa_ResetHistogram(GLenum target)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glResetHistogram");
-}
-
-
-static void GLAPIENTRY
-_mesa_ResetMinmax(GLenum target)
-{
- GET_CURRENT_CONTEXT(ctx);
-
- _mesa_error(ctx, GL_INVALID_OPERATION, "glResetMinmax");
-}
-
-
-void
-_mesa_init_histogram_dispatch(struct _glapi_table *disp)
-{
- SET_GetHistogram(disp, _mesa_GetHistogram);
- SET_GetHistogramParameterfv(disp, _mesa_GetHistogramParameterfv);
- SET_GetHistogramParameteriv(disp, _mesa_GetHistogramParameteriv);
- SET_GetMinmax(disp, _mesa_GetMinmax);
- SET_GetMinmaxParameterfv(disp, _mesa_GetMinmaxParameterfv);
- SET_GetMinmaxParameteriv(disp, _mesa_GetMinmaxParameteriv);
- SET_Histogram(disp, _mesa_Histogram);
- SET_Minmax(disp, _mesa_Minmax);
- SET_ResetHistogram(disp, _mesa_ResetHistogram);
- SET_ResetMinmax(disp, _mesa_ResetMinmax);
-}
-
-#endif /* FEATURE_histogram */
+++ /dev/null
-/**
- * \file histogram.h
- * Histogram.
- *
- * \if subset
- * (No-op)
- *
- * \endif
- */
-
-/*
- * Mesa 3-D graphics library
- * Version: 5.1
- *
- * Copyright (C) 1999-2003 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 HISTOGRAM_H
-#define HISTOGRAM_H
-
-#include "compiler.h"
-#include "mfeatures.h"
-
-struct _glapi_table;
-
-#if FEATURE_histogram
-
-extern void
-_mesa_init_histogram_dispatch(struct _glapi_table *disp);
-
-#else /* FEATURE_histogram */
-
-static inline void
-_mesa_init_histogram_dispatch(struct _glapi_table *disp)
-{
-}
-
-#endif /* FEATURE_histogram */
-
-#endif /* HISTOGRAM_H */
return sizeof(GLfloat);
case GL_DOUBLE:
return sizeof(GLdouble);
- case GL_HALF_FLOAT_ARB:
- return sizeof(GLhalfARB);
case GL_FIXED:
return sizeof(GLfixed);
default:
return sizeof(GLuint);
case GL_INT:
return sizeof(GLint);
- case GL_HALF_FLOAT_ARB:
- return sizeof(GLhalfARB);
case GL_FLOAT:
return sizeof(GLfloat);
case GL_UNSIGNED_BYTE_3_3_2:
return comps * sizeof(GLint);
case GL_FLOAT:
return comps * sizeof(GLfloat);
- case GL_HALF_FLOAT_ARB:
- return comps * sizeof(GLhalfARB);
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
if (format == GL_RGB || format == GL_BGR ||
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_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_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
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_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_UNSIGNED_INT_8_8_8_8:
case GL_UNSIGNED_INT_8_8_8_8_REV:
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;
}
}
#endif
-
-/**
- * Convert a 4-byte float to a 2-byte half float.
- * Based on code from:
- * http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/008786.html
- */
-GLhalfARB
-_mesa_float_to_half(float val)
-{
- const fi_type fi = {val};
- const int flt_m = fi.i & 0x7fffff;
- const int flt_e = (fi.i >> 23) & 0xff;
- const int flt_s = (fi.i >> 31) & 0x1;
- int s, e, m = 0;
- GLhalfARB result;
-
- /* sign bit */
- s = flt_s;
-
- /* handle special cases */
- if ((flt_e == 0) && (flt_m == 0)) {
- /* zero */
- /* m = 0; - already set */
- e = 0;
- }
- else if ((flt_e == 0) && (flt_m != 0)) {
- /* denorm -- denorm float maps to 0 half */
- /* m = 0; - already set */
- e = 0;
- }
- else if ((flt_e == 0xff) && (flt_m == 0)) {
- /* infinity */
- /* m = 0; - already set */
- e = 31;
- }
- else if ((flt_e == 0xff) && (flt_m != 0)) {
- /* NaN */
- m = 1;
- e = 31;
- }
- else {
- /* regular number */
- const int new_exp = flt_e - 127;
- if (new_exp < -24) {
- /* this maps to 0 */
- /* m = 0; - already set */
- e = 0;
- }
- else if (new_exp < -14) {
- /* this maps to a denorm */
- unsigned int exp_val = (unsigned int) (-14 - new_exp); /* 2^-exp_val*/
- e = 0;
- switch (exp_val) {
- case 0:
- _mesa_warning(NULL,
- "float_to_half: logical error in denorm creation!\n");
- /* m = 0; - already set */
- break;
- case 1: m = 512 + (flt_m >> 14); break;
- case 2: m = 256 + (flt_m >> 15); break;
- case 3: m = 128 + (flt_m >> 16); break;
- case 4: m = 64 + (flt_m >> 17); break;
- case 5: m = 32 + (flt_m >> 18); break;
- case 6: m = 16 + (flt_m >> 19); break;
- case 7: m = 8 + (flt_m >> 20); break;
- case 8: m = 4 + (flt_m >> 21); break;
- case 9: m = 2 + (flt_m >> 22); break;
- case 10: m = 1; break;
- }
- }
- else if (new_exp > 15) {
- /* map this value to infinity */
- /* m = 0; - already set */
- e = 31;
- }
- else {
- /* regular */
- e = new_exp + 15;
- m = flt_m >> 13;
- }
- }
-
- result = (s << 15) | (e << 10) | m;
- return result;
-}
-
-
-/**
- * Convert a 2-byte half float to a 4-byte float.
- * Based on code from:
- * http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/008786.html
- */
-float
-_mesa_half_to_float(GLhalfARB val)
-{
- /* XXX could also use a 64K-entry lookup table */
- const int m = val & 0x3ff;
- const int e = (val >> 10) & 0x1f;
- const int s = (val >> 15) & 0x1;
- int flt_m, flt_e, flt_s;
- fi_type fi;
- float result;
-
- /* sign bit */
- flt_s = s;
-
- /* handle special cases */
- if ((e == 0) && (m == 0)) {
- /* zero */
- flt_m = 0;
- flt_e = 0;
- }
- else if ((e == 0) && (m != 0)) {
- /* denorm -- denorm half will fit in non-denorm single */
- const float half_denorm = 1.0f / 16384.0f; /* 2^-14 */
- float mantissa = ((float) (m)) / 1024.0f;
- float sign = s ? -1.0f : 1.0f;
- return sign * mantissa * half_denorm;
- }
- else if ((e == 31) && (m == 0)) {
- /* infinity */
- flt_e = 0xff;
- flt_m = 0;
- }
- else if ((e == 31) && (m != 0)) {
- /* NaN */
- flt_e = 0xff;
- flt_m = 1;
- }
- else {
- /* regular */
- flt_e = e + 112;
- flt_m = m << 13;
- }
-
- fi.i = (flt_s << 31) | (flt_e << 23) | flt_m;
- result = fi.f;
- return result;
-}
-
/*@}*/
void
_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... )
{
-#ifdef DEBUG
+//#ifdef DEBUG
char s[MAXSTRING];
va_list args;
va_start(args, fmtString);
vsnprintf(s, MAXSTRING, fmtString, args);
va_end(args);
output_if_debug("Mesa", s, GL_FALSE);
-#endif /* DEBUG */
+//#endif /* DEBUG */
(void) ctx;
(void) fmtString;
}
_mesa_bitcount(unsigned int n);
#endif
-extern GLhalfARB
-_mesa_float_to_half(float f);
-
-extern float
-_mesa_half_to_float(GLhalfARB h);
-
extern void *
_mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size,
void GLAPIENTRY
_mesa_LightModelfv( GLenum pname, const GLfloat *params )
{
- GLenum newenum;
GLboolean newbool;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
else
ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
break;
- case GL_LIGHT_MODEL_COLOR_CONTROL:
- if (params[0] == (GLfloat) GL_SINGLE_COLOR)
- newenum = GL_SINGLE_COLOR;
- else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR)
- newenum = GL_SEPARATE_SPECULAR_COLOR;
- else {
- _mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(param=0x0%x)",
- (GLint) params[0] );
- return;
- }
- if (ctx->Light.Model.ColorControl == newenum)
- return;
- FLUSH_VERTICES(ctx, _NEW_LIGHT);
- ctx->Light.Model.ColorControl = newenum;
- break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(pname=0x%x)", pname );
break;
if (ctx->Light.ColorMaterialEnabled) {
FLUSH_CURRENT( ctx, 0 );
- _mesa_update_color_material(ctx,ctx->Current.Attrib[VERT_ATTRIB_COLOR0]);
+ _mesa_update_color_material(ctx,ctx->Current.Attrib[VERT_ATTRIB_COLOR]);
}
if (ctx->Driver.ColorMaterial)
ctx->Light._NeedVertices =
((ctx->Light._Flags & (LIGHT_POSITIONAL|LIGHT_SPOT)) ||
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
ctx->Light.Model.LocalViewer);
ctx->Light._NeedEyeCoords = ((ctx->Light._Flags & LIGHT_POSITIONAL) ||
ASSIGN_4V( lm->Ambient, 0.2F, 0.2F, 0.2F, 1.0F );
lm->LocalViewer = GL_FALSE;
lm->TwoSide = GL_FALSE;
- lm->ColorControl = GL_SINGLE_COLOR;
}
#define FEATURE_GL !FEATURE_ES
#endif
-#if defined(IN_DRI_DRIVER) || (FEATURE_GL + FEATURE_ES1 + FEATURE_ES2 > 1)
-#define FEATURE_remap_table 1
-#else
-#define FEATURE_remap_table 0
-#endif
-
#define FEATURE_dispatch 1
#define FEATURE_texgen 1
#define FEATURE_userclip 1
#define FEATURE_pixel_transfer FEATURE_GL
#define FEATURE_queryobj FEATURE_GL
#define FEATURE_rastpos FEATURE_GL
-#define FEATURE_texture_fxt1 FEATURE_GL
-#define FEATURE_texture_s3tc FEATURE_GL
#define FEATURE_extra_context_init FEATURE_ES
#define FEATURE_point_size_array FEATURE_ES
-#define FEATURE_es2_glsl FEATURE_ES2
-
#define FEATURE_ARB_fragment_program 1
#define FEATURE_ARB_vertex_program 1
#define FEATURE_ARB_vertex_shader 1
VERT_ATTRIB_POS = 0,
VERT_ATTRIB_WEIGHT = 1,
VERT_ATTRIB_NORMAL = 2,
- VERT_ATTRIB_COLOR0 = 3,
- VERT_ATTRIB_COLOR1 = 4,
- VERT_ATTRIB_FOG = 5,
- VERT_ATTRIB_COLOR_INDEX = 6,
- VERT_ATTRIB_EDGEFLAG = 7,
- VERT_ATTRIB_TEX = 8,
- VERT_ATTRIB_POINT_SIZE = 9,
- VERT_ATTRIB_MAX = 10
+ VERT_ATTRIB_COLOR = 3,
+ VERT_ATTRIB_FOG = 4,
+ VERT_ATTRIB_COLOR_INDEX = 5,
+ VERT_ATTRIB_EDGEFLAG = 6,
+ VERT_ATTRIB_TEX = 7,
+ VERT_ATTRIB_POINT_SIZE = 8,
+ VERT_ATTRIB_MAX = 9
} gl_vert_attrib;
/**
#define VERT_BIT_POS BITFIELD64_BIT(VERT_ATTRIB_POS)
#define VERT_BIT_WEIGHT BITFIELD64_BIT(VERT_ATTRIB_WEIGHT)
#define VERT_BIT_NORMAL BITFIELD64_BIT(VERT_ATTRIB_NORMAL)
-#define VERT_BIT_COLOR0 BITFIELD64_BIT(VERT_ATTRIB_COLOR0)
-#define VERT_BIT_COLOR1 BITFIELD64_BIT(VERT_ATTRIB_COLOR1)
+#define VERT_BIT_COLOR BITFIELD64_BIT(VERT_ATTRIB_COLOR)
#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)
typedef enum
{
FRAG_ATTRIB_WPOS = 0,
- FRAG_ATTRIB_COL0 = 1,
- FRAG_ATTRIB_COL1 = 2,
- FRAG_ATTRIB_FOGC = 3,
- 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
+ FRAG_ATTRIB_COL = 1,
+ FRAG_ATTRIB_FOGC = 2,
+ FRAG_ATTRIB_TEX = 3,
+ FRAG_ATTRIB_FACE = 4, /**< front/back face */
+ FRAG_ATTRIB_PNTC = 5, /**< sprite/point coord */
+ FRAG_ATTRIB_CLIP_DIST0 = 6,
+ FRAG_ATTRIB_CLIP_DIST1 = 7,
+ FRAG_ATTRIB_MAX = 8
} gl_frag_attrib;
-#define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0)
-#define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1)
+#define FRAG_BIT_COL (1 << FRAG_ATTRIB_COL)
#define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC)
#define FRAG_BIT_TEX (1 << FRAG_ATTRIB_TEX)
GLfloat Ambient[4]; /**< ambient color */
GLboolean LocalViewer; /**< Local (or infinite) view point? */
GLboolean TwoSide; /**< Two (or one) sided lighting? */
- GLenum ColorControl; /**< either GL_SINGLE_COLOR
- * or GL_SEPARATE_SPECULAR_COLOR */
};
* control, only on the fixed-pointness of the render target.
* The query does however depend on fragment color clamping.
*/
- GLfloat BlendColor[4]; /**< Blending color */
-
- 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. */
+
+ GLenum SrcFactor; /**< RGB blend source term */
+ GLenum DstFactor; /**< RGB blend dest term */
/*@}*/
/**
GLfloat RasterPos[4];
GLfloat RasterDistance;
GLfloat RasterColor[4];
- GLfloat RasterSecondaryColor[4];
GLfloat RasterTexCoords[4];
GLboolean RasterPosValid;
/*@}*/
GLfloat End; /**< End distance in eye coords */
GLfloat Index; /**< Fog index */
GLenum Mode; /**< Fog mode */
- GLboolean ColorSumEnabled;
GLenum FogCoordinateSource; /**< GL_EXT_fog_coord */
GLfloat _Scale; /**< (End == Start) ? 1.0 : 1.0 / (End - Start) */
GLenum FogDistanceMode; /**< GL_NV_fog_distance */
typedef enum
{
TEXTURE_CUBE_INDEX,
- TEXTURE_3D_INDEX,
TEXTURE_2D_INDEX,
TEXTURE_1D_INDEX,
NUM_TEXTURE_TARGETS
*/
/*@{*/
#define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX)
-#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX)
#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX)
#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX)
/*@}*/
};
-/**
- * Collection of vertex arrays. Defined by the GL_APPLE_vertex_array_object
- * extension, but a nice encapsulation in any case.
- */
-struct gl_array_object
-{
- /** Name of the array object as received from glGenVertexArrayAPPLE. */
- GLuint Name;
-
- GLint RefCount;
- _glthread_Mutex Mutex;
-
- /**
- * Does the VAO use ARB semantics or Apple semantics?
- *
- * There are several ways in which ARB_vertex_array_object and
- * APPLE_vertex_array_object VAOs have differing semantics. At the very
- * least,
- *
- * - ARB VAOs require that all array data be sourced from vertex buffer
- * objects, but Apple VAOs do not.
- *
- * - ARB VAOs require that names come from GenVertexArrays.
- *
- * This flag notes which behavior governs this VAO.
- */
- GLboolean ARBsemantics;
-
- /**
- * Has this array object been bound?
- */
- GLboolean _Used;
-
- /** Vertex attribute arrays */
- struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
-
- /** Mask of VERT_BIT_* values indicating which arrays are enabled */
- GLbitfield64 _Enabled;
-
- /**
- * Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
- * we can determine the max legal (in bounds) glDrawElements array index.
- */
- GLuint _MaxElement;
-
- struct gl_buffer_object *ElementArrayBufferObj;
-};
-
-
/**
* Vertex array state
*/
struct gl_array_attrib
{
- /** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
- struct gl_array_object *ArrayObj;
+ /** Vertex attribute arrays */
+ struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
- /** The default vertex array object */
- struct gl_array_object *DefaultArrayObj;
+ /** Mask of VERT_BIT_* values indicating which arrays are enabled */
+ GLbitfield64 _Enabled;
- /** Array objects (GL_ARB/APPLE_vertex_array_object) */
- struct _mesa_HashTable *Objects;
+ /**
+ * Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
+ * we can determine the max legal (in bounds) glDrawElements array index.
+ */
+ GLuint _MaxElement;
- GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
- GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
+ struct gl_buffer_object *ElementArrayBufferObj;
- GLbitfield64 NewState; /**< mask of VERT_BIT_* values */
- GLboolean RebindArrays; /**< whether the VBO module should rebind arrays */
+ GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
+ GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
- /* GL_ARB_vertex_buffer_object */
- struct gl_buffer_object *ArrayBufferObj;
+ GLbitfield64 NewState; /**< mask of VERT_BIT_* values */
+ GLboolean RebindArrays; /**< whether the VBO module should rebind arrays */
};
void (*Delete)(struct gl_framebuffer *fb);
};
-
-/**
- * Precision info for shader datatypes. See glGetShaderPrecisionFormat().
- */
-struct gl_precision
-{
- GLushort RangeMin; /**< min value exponent */
- GLushort RangeMax; /**< max value exponent */
- GLushort Precision; /**< number of mantissa bits */
-};
-
/**
* Constants which may be overridden by device driver during context creation
* but are never changed after that.
struct gl_constants
{
GLint MaxTextureMbytes; /**< Max memory per image, in MB */
- GLint MaxTextureLevels; /**< Max mipmap levels. */
- GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */
+ GLint MaxTextureLevels; /**< Max mipmap levels. */
GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */
GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
GLfloat MinLineWidthAA, MaxLineWidthAA; /**< antialiased */
GLfloat LineWidthGranularity;
- GLuint MaxColorTableSize;
-
GLuint MaxClipPlanes;
GLuint MaxLights;
GLfloat MaxShininess; /**< GL_NV_light_max_exponent */
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_half_float_pixel;
- GLboolean ARB_half_float_vertex;
GLboolean ARB_map_buffer_range;
GLboolean ARB_point_sprite;
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_non_power_of_two;
GLboolean ARB_texture_storage;
GLboolean ARB_transpose_matrix;
- GLboolean ARB_vertex_array_object;
GLboolean ARB_window_pos;
GLboolean EXT_blend_color;
GLboolean EXT_blend_equation_separate;
GLboolean EXT_secondary_color;
GLboolean EXT_separate_shader_objects;
GLboolean EXT_separate_specular_color;
- GLboolean EXT_texture3D;
GLboolean EXT_texture_env_dot3;
GLboolean EXT_texture_filter_anisotropic;
GLboolean EXT_texture_integer;
/* vendor extensions */
GLboolean APPLE_packed_pixels;
- GLboolean APPLE_vertex_array_object;
- GLboolean APPLE_object_purgeable;
GLboolean ATI_texture_env_combine3;
GLboolean IBM_rasterpos_clip;
GLboolean IBM_multimode_draw_arrays;
GLboolean NV_fog_distance;
GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
- GLboolean NV_texture_barrier;
GLboolean NV_texgen_reflection;
GLboolean NV_texture_env_combine4;
GLboolean extension_sentinel;
#define _NEW_BUFFERS (1 << 22) /**< gl_context::Visual, DrawBuffer, */
#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_BUFFER_OBJECT (1 << 26)
+#define _NEW_BUFFER_OBJECT (1 << 25)
#define _NEW_ALL ~0
/**
*/
/*@{*/
#define DD_FLATSHADE 0x1
-#define DD_SEPARATE_SPECULAR 0x2
-#define DD_TRI_CULL_FRONT_BACK 0x4 /* special case on some hw */
-#define DD_TRI_LIGHT_TWOSIDE 0x8
-#define DD_TRI_UNFILLED 0x10
-#define DD_TRI_SMOOTH 0x20
-#define DD_TRI_STIPPLE 0x40
-#define DD_TRI_OFFSET 0x80
-#define DD_LINE_SMOOTH 0x100
-#define DD_LINE_STIPPLE 0x200
-#define DD_POINT_SMOOTH 0x400
-#define DD_POINT_ATTEN 0x800
+#define DD_TRI_CULL_FRONT_BACK 0x2 /* special case on some hw */
+#define DD_TRI_LIGHT_TWOSIDE 0x4
+#define DD_TRI_UNFILLED 0x8
+#define DD_TRI_SMOOTH 0x10
+#define DD_TRI_STIPPLE 0x20
+#define DD_TRI_OFFSET 0x40
+#define DD_LINE_SMOOTH 0x80
+#define DD_LINE_STIPPLE 0x100
+#define DD_POINT_SMOOTH 0x200
+#define DD_POINT_ATTEN 0x400
/*@}*/
}
}
break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(luminance[i]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*3+2] = _mesa_float_to_half(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*3+2] = _mesa_float_to_half(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][ACOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
case GL_UNSIGNED_BYTE_3_3_2:
if (dstFormat == GL_RGB) {
GLubyte *dst = (GLubyte *) dstAddr;
}
}
break;
- case GL_HALF_FLOAT_ARB:
- {
- GLuint i;
- const GLhalfARB *s = (const GLhalfARB *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLhalfARB value = s[i];
- SWAP2BYTE(value);
- indexes[i] = (GLuint) _mesa_half_to_float(value);
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = (GLuint) _mesa_half_to_float(s[i]);
- }
- }
- break;
default:
_mesa_problem(NULL, "bad srcType in extract_uint_indexes");
PROCESS(bSrc, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
PROCESS(aSrc, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat));
break;
- case GL_HALF_FLOAT_ARB:
- PROCESS(rSrc, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(gSrc, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(bSrc, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(aSrc, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float);
- break;
case GL_UNSIGNED_BYTE_3_3_2:
{
const GLubyte *ubsrc = (const GLubyte *) src;
return f < 0.0F ? 0 : IROUND(f);
}
-
-static inline GLuint
-clamp_half_to_uint(GLhalfARB h)
-{
- GLfloat f = _mesa_half_to_float(h);
- return f < 0.0F ? 0 : IROUND(f);
-}
-
-
/**
* \sa extract_float_rgba()
*/
PROCESS(bSrc, BCOMP, 0, GLfloat, clamp_float_to_uint);
PROCESS(aSrc, ACOMP, 1, GLfloat, clamp_float_to_uint);
break;
- case GL_HALF_FLOAT_ARB:
- PROCESS(rSrc, RCOMP, 0, GLhalfARB, clamp_half_to_uint);
- PROCESS(gSrc, GCOMP, 0, GLhalfARB, clamp_half_to_uint);
- PROCESS(bSrc, BCOMP, 0, GLhalfARB, clamp_half_to_uint);
- PROCESS(aSrc, ACOMP, 1, GLhalfARB, clamp_half_to_uint);
- break;
case GL_UNSIGNED_BYTE_3_3_2:
{
const GLubyte *ubsrc = (const GLubyte *) src;
}
}
break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = _mesa_float_to_half((GLfloat) source[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
default:
_mesa_problem(ctx, "bad type in _mesa_pack_index_span");
}
}
}
break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = _mesa_float_to_half( (float) source[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
case GL_BITMAP:
if (dstPacking->LsbFirst) {
GLubyte *dst = (GLubyte *) dest;
DEPTH_VALUES(GLfloat, 1*);
needClamp = GL_TRUE;
break;
- case GL_HALF_FLOAT_ARB:
- {
- GLuint i;
- const GLhalfARB *src = (const GLhalfARB *) source;
- for (i = 0; i < n; i++) {
- GLhalfARB value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP2BYTE(value);
- }
- depthValues[i] = _mesa_half_to_float(value);
- }
- needClamp = GL_TRUE;
- }
- break;
default:
_mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()");
free(depthTemp);
}
}
break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = _mesa_float_to_half(depthSpan[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
default:
_mesa_problem(ctx, "bad type in _mesa_pack_depth_span");
}
#include "api_exec.h"
#include "api_loopback.h"
#include "api_validate.h"
-#include "arrayobj.h"
#include "attrib.h"
#include "blend.h"
#include "bufferobj.h"
#include "clear.h"
#include "clip.h"
#include "colormac.h"
-#include "colortab.h"
#include "compiler.h"
#include "context.h"
-#include "convolve.h"
#include "cpuinfo.h"
#include "depth.h"
#include "dispatch.h"
#include "texstate.h"
#include "texstorage.h"
#include "texstore.h"
-#include "texturebarrier.h"
#include "varray.h"
#include "version.h"
#include "viewport.h"
/* raster color = current color or index */
ctx->Current.RasterColor[0]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F);
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR][0], 0.0F, 1.0F);
ctx->Current.RasterColor[1]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F);
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR][1], 0.0F, 1.0F);
ctx->Current.RasterColor[2]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F);
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR][2], 0.0F, 1.0F);
ctx->Current.RasterColor[3]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[0]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[1]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[2]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F);
- ctx->Current.RasterSecondaryColor[3]
- = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
+ = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR][3], 0.0F, 1.0F);
/* raster texcoord = current texcoord */
COPY_4FV( ctx->Current.RasterTexCoords, ctx->Current.Attrib[VERT_ATTRIB_TEX] );
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 );
ASSIGN_4V( ctx->Current.RasterTexCoords, 0.0, 0.0, 0.0, 1.0 );
ctx->Current.RasterPosValid = GL_TRUE;
}
/* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */
static const GLenum targets[NUM_TEXTURE_TARGETS] = {
GL_TEXTURE_CUBE_MAP,
- GL_TEXTURE_3D,
GL_TEXTURE_2D,
GL_TEXTURE_1D
};
#include <precomp.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().
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.
*/
/* 0 */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) {
- min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_POS]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_POS].Enabled) {
+ min = update_min(min, &ctx->Array.VertexAttrib[VERT_ATTRIB_POS]);
}
/* 2 */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
- min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
+ min = update_min(min, &ctx->Array.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]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR].Enabled) {
+ min = update_min(min, &ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR]);
}
/* 5 */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
- min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_FOG]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
+ min = update_min(min, &ctx->Array.VertexAttrib[VERT_ATTRIB_FOG]);
}
/* 6 */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
- min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
+ min = update_min(min, &ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX]);
}
/* 8 */
- if (arrayObj->VertexAttrib[VERT_ATTRIB_TEX].Enabled) {
- min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_TEX]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_TEX].Enabled) {
+ min = update_min(min, &ctx->Array.VertexAttrib[VERT_ATTRIB_TEX]);
}
- if (arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
- min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG]);
+ if (ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
+ min = update_min(min, &ctx->Array.VertexAttrib[VERT_ATTRIB_EDGEFLAG]);
}
/* _MaxElement is one past the last legal array element */
- arrayObj->_MaxElement = min;
+ ctx->Array._MaxElement = min;
}
static void
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);
extern void
_mesa_update_state_locked(struct gl_context *ctx);
-
-/**
- * Is the secondary color needed?
- */
-static inline GLboolean
-_mesa_need_secondary_color(const struct gl_context *ctx)
-{
- if (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
- return GL_TRUE;
-
- if (ctx->Fog.ColorSumEnabled)
- return GL_TRUE;
-
- return GL_FALSE;
-}
-
#endif
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);
}
}
- 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:
case GL_SHORT:
case GL_INT:
case GL_FLOAT:
- case GL_HALF_FLOAT_ARB:
case GL_UNSIGNED_INT_10F_11F_11F_REV:
case GL_UNSIGNED_INT_5_9_9_9_REV:
return GL_FALSE;
case GL_TEXTURE_1D:
dimensions = 1;
break;
- case GL_TEXTURE_3D:
- dimensions = 3;
- break;
default:
dimensions = 2;
}
return GL_YCBCR_MESA;
}
- if (ctx->Extensions.ARB_texture_float) {
- switch (internalFormat) {
- case GL_ALPHA16F_ARB:
- case GL_ALPHA32F_ARB:
- return GL_ALPHA;
- case GL_RGBA16F_ARB:
- case GL_RGBA32F_ARB:
- return GL_RGBA;
- case GL_RGB16F_ARB:
- case GL_RGB32F_ARB:
- return GL_RGB;
- case GL_INTENSITY16F_ARB:
- case GL_INTENSITY32F_ARB:
- return GL_INTENSITY;
- case GL_LUMINANCE16F_ARB:
- case GL_LUMINANCE32F_ARB:
- return GL_LUMINANCE;
- case GL_LUMINANCE_ALPHA16F_ARB:
- case GL_LUMINANCE_ALPHA32F_ARB:
- return GL_LUMINANCE_ALPHA;
- default:
- ; /* fallthrough */
- }
- }
-
if (ctx->VersionMajor >= 3 ||
ctx->Extensions.EXT_texture_integer) {
switch (internalFormat) {
return (target == GL_PROXY_TEXTURE_1D ||
target == GL_PROXY_TEXTURE_2D ||
- target == GL_PROXY_TEXTURE_3D ||
target == GL_PROXY_TEXTURE_CUBE_MAP_ARB);
}
case GL_TEXTURE_2D:
case GL_PROXY_TEXTURE_2D:
return GL_PROXY_TEXTURE_2D;
- case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
- return GL_PROXY_TEXTURE_3D;
case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
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 ctx->Texture.Unit.CurrentTex[TEXTURE_3D_INDEX];
- case GL_PROXY_TEXTURE_3D:
- return ctx->Texture.ProxyTex[TEXTURE_3D_INDEX];
default:
_mesa_problem(NULL, "bad target in _mesa_select_tex_object()");
return NULL;
return NULL;
texIndex = TEXTURE_2D_INDEX;
break;
- case GL_PROXY_TEXTURE_3D:
- if (level >= ctx->Const.Max3DTextureLevels)
- return NULL;
- texIndex = TEXTURE_3D_INDEX;
- break;
case GL_PROXY_TEXTURE_CUBE_MAP:
if (level >= ctx->Const.MaxCubeTextureLevels)
return NULL;
case GL_TEXTURE_2D:
case GL_PROXY_TEXTURE_2D:
return ctx->Const.MaxTextureLevels;
- case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
- return ctx->Const.Max3DTextureLevels;
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_POSITIVE_Z:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
return 2;
- case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
- return 3;
default:
_mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()",
target);
img->Depth2 = 1;
img->DepthLog2 = 0;
break;
- case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
- img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */
- img->HeightLog2 = _mesa_logbase2(img->Height2);
- img->Depth2 = depth - 2 * border; /* == 1 << img->DepthLog2; */
- img->DepthLog2 = _mesa_logbase2(img->Depth2);
- break;
default:
_mesa_problem(NULL, "invalid target 0x%x in _mesa_init_teximage_fields()",
target);
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 (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
return GL_TRUE;
case GL_PROXY_TEXTURE_2D:
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;
-
- case GL_PROXY_TEXTURE_3D:
- maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
- if (width < 2 * border || width > 2 * border + maxSize)
- return GL_FALSE;
- if (height < 2 * border || height > 2 * border + maxSize)
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
return GL_FALSE;
- if (depth < 2 * border || depth > 2 * border + maxSize)
+ if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
return GL_FALSE;
- if (level >= ctx->Const.Max3DTextureLevels)
- 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;
- if (depth > 0 && !_mesa_is_pow_two(depth - 2 * border))
- return GL_FALSE;
- }
return GL_TRUE;
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
return GL_FALSE;
if (level >= ctx->Const.MaxCubeTextureLevels)
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;
- }
+ 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:
default:
return GL_FALSE;
}
- case 3:
- switch (target) {
- case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
default:
_mesa_problem(ctx, "invalid dims=%u in legal_teximage_target()", dims);
return GL_FALSE;
default:
return GL_FALSE;
}
- case 3:
- switch (target) {
- case GL_TEXTURE_3D:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
default:
_mesa_problem(ctx, "invalid dims=%u in legal_texsubimage_target()",
dims);
return GL_TRUE;
}
}
- if (dimensions > 2) {
- if (zoffset < -((GLint)destTex->Border)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset)");
- return GL_TRUE;
- }
- if (zoffset + depth > (GLint) (destTex->Depth + destTex->Border)) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset+depth)");
- return GL_TRUE;
- }
- }
if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) {
/* both source and dest must be integer-valued, or neither */
border, internalFormat, texFormat);
/* Give the texture to the driver. <pixels> may be null. */
- ASSERT(ctx->Driver.TexImage3D);
switch (dims) {
case 1:
ctx->Driver.TexImage1D(ctx, texImage, internalFormat,
width, height, border, format,
type, pixels, unpack);
break;
- case 3:
- ctx->Driver.TexImage3D(ctx, texImage, internalFormat,
- width, height, depth, border, format,
- type, pixels, unpack);
- break;
default:
_mesa_problem(ctx, "invalid dims=%u in teximage()", dims);
}
}
-/*
- * Called by the API or display list executor.
- * Note that width and height include the border.
- */
-void GLAPIENTRY
-_mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border, GLenum format, GLenum type,
- const GLvoid *pixels )
-{
- GET_CURRENT_CONTEXT(ctx);
- teximage(ctx, 3, target, level, internalFormat, width, height, depth,
- border, format, type, pixels);
-}
-
-
-void GLAPIENTRY
-_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border, GLenum format, GLenum type,
- const GLvoid *pixels )
-{
- _mesa_TexImage3D(target, level, (GLint) internalFormat, width, height,
- depth, border, format, type, pixels);
-}
-
-
/**
* Implement all the glTexSubImage1/2/3D() functions.
*/
xoffset, yoffset, width, height,
format, type, pixels, &ctx->Unpack);
break;
- case 3:
- ctx->Driver.TexSubImage3D(ctx, texImage,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, type, pixels, &ctx->Unpack);
- break;
default:
_mesa_problem(ctx, "unexpected dims in subteximage()");
}
-void GLAPIENTRY
-_mesa_TexSubImage3D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type,
- const GLvoid *pixels )
-{
- GET_CURRENT_CONTEXT(ctx);
- texsubimage(ctx, 3, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, type, pixels);
-}
-
-
-
/**
* For glCopyTexSubImage, return the source renderbuffer to copy texel data
* from. This depends on whether the texture contains color or depth values.
ctx->Driver.CopyTexSubImage2D(ctx, texImage, xoffset, yoffset,
srcRb, x, y, width, height);
break;
- case 3:
- ctx->Driver.CopyTexSubImage3D(ctx, texImage,
- xoffset, yoffset, zoffset,
- srcRb, x, y, width, height);
- break;
default:
_mesa_problem(ctx, "bad dims in copytexsubimage()");
}
copytexsubimage(ctx, 2, target, level, xoffset, yoffset, 0, x, y,
width, height);
}
-
-
-
-void GLAPIENTRY
-_mesa_CopyTexSubImage3D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint x, GLint y, GLsizei width, GLsizei height )
-{
- GET_CURRENT_CONTEXT(ctx);
- copytexsubimage(ctx, 3, target, level, xoffset, yoffset, zoffset,
- x, y, width, height);
-}
GLenum format, GLenum type, const GLvoid *pixels );
-extern void GLAPIENTRY
-_mesa_TexImage3D( GLenum target, GLint level, GLint internalformat,
- GLsizei width, GLsizei height, GLsizei depth, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels );
-
-
-extern void GLAPIENTRY
-_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border, GLenum format, GLenum type,
- const GLvoid *pixels );
-
extern void GLAPIENTRY
_mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset,
GLsizei width,
const GLvoid *pixels );
-extern void GLAPIENTRY
-_mesa_TexSubImage3D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type,
- const GLvoid *pixels );
-
-
extern void GLAPIENTRY
_mesa_CopyTexImage1D( GLenum target, GLint level, GLenum internalformat,
GLint x, GLint y, GLsizei width, GLint border );
GLint xoffset, GLint yoffset,
GLint x, GLint y, GLsizei width, GLsizei height );
-
-extern void GLAPIENTRY
-_mesa_CopyTexSubImage3D( GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint x, GLint y, GLsizei width, GLsizei height );
-
/*@}*/
#endif
case 0:
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
- case GL_TEXTURE_3D:
case GL_TEXTURE_CUBE_MAP_ARB:
return GL_TRUE;
case 0x99:
t->Image[0][baseLevel]->HeightLog2);
maxLevels = ctx->Const.MaxTextureLevels;
}
- else if (t->Target == GL_TEXTURE_3D) {
- GLint max = MAX2(t->Image[0][baseLevel]->WidthLog2,
- t->Image[0][baseLevel]->HeightLog2);
- maxLog2 = MAX2(max, (GLint)(t->Image[0][baseLevel]->DepthLog2));
- maxLevels = ctx->Const.Max3DTextureLevels;
- }
else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2,
t->Image[0][baseLevel]->HeightLog2);
}
}
}
- else if (t->Target == GL_TEXTURE_3D) {
- /* Test 3-D mipmaps */
- GLuint width = t->Image[0][baseLevel]->Width2;
- GLuint height = t->Image[0][baseLevel]->Height2;
- GLuint depth = t->Image[0][baseLevel]->Depth2;
- for (i = baseLevel + 1; i < maxLevels; i++) {
- if (width > 1) {
- width /= 2;
- }
- if (height > 1) {
- height /= 2;
- }
- if (depth > 1) {
- depth /= 2;
- }
- if (i >= minLevel && i <= maxLevel) {
- const struct gl_texture_image *img = t->Image[0][i];
- if (!img) {
- incomplete(t, "3D Image[%d] is missing", i);
- return;
- }
- if (img->_BaseFormat == GL_DEPTH_COMPONENT) {
- incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
- return;
- }
- if (img->Width2 != width) {
- incomplete(t, "3D Image[%d] bad width %u", i, img->Width2);
- return;
- }
- if (img->Height2 != height) {
- incomplete(t, "3D Image[%d] bad height %u", i, img->Height2);
- return;
- }
- if (img->Depth2 != depth) {
- incomplete(t, "3D Image[%d] bad depth %u", i, img->Depth2);
- return;
- }
- }
- if (width == 1 && height == 1 && depth == 1) {
- return; /* found smallest needed mipmap, all done! */
- }
- }
- }
else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
/* make sure 6 cube faces are consistant */
GLuint width = t->Image[0][baseLevel]->Width2;
return TEXTURE_1D_INDEX;
case GL_TEXTURE_2D:
return TEXTURE_2D_INDEX;
- case GL_TEXTURE_3D:
- return TEXTURE_3D_INDEX;
case GL_TEXTURE_CUBE_MAP_ARB:
return TEXTURE_CUBE_INDEX;
default:
return texUnit->CurrentTex[TEXTURE_1D_INDEX];
case GL_TEXTURE_2D:
return texUnit->CurrentTex[TEXTURE_2D_INDEX];
- case GL_TEXTURE_3D:
- return texUnit->CurrentTex[TEXTURE_3D_INDEX];
case GL_TEXTURE_CUBE_MAP:
if (ctx->Extensions.ARB_texture_cube_map) {
return texUnit->CurrentTex[TEXTURE_CUBE_INDEX];
case GL_TEXTURE_BORDER_COLOR:
flush(ctx);
- /* ARB_texture_float disables clamping */
- if (ctx->Extensions.ARB_texture_float) {
- texObj->Sampler.BorderColor.f[RCOMP] = params[0];
- texObj->Sampler.BorderColor.f[GCOMP] = params[1];
- texObj->Sampler.BorderColor.f[BCOMP] = params[2];
- texObj->Sampler.BorderColor.f[ACOMP] = params[3];
- } else {
- texObj->Sampler.BorderColor.f[RCOMP] = CLAMP(params[0], 0.0F, 1.0F);
- texObj->Sampler.BorderColor.f[GCOMP] = CLAMP(params[1], 0.0F, 1.0F);
- texObj->Sampler.BorderColor.f[BCOMP] = CLAMP(params[2], 0.0F, 1.0F);
- texObj->Sampler.BorderColor.f[ACOMP] = CLAMP(params[3], 0.0F, 1.0F);
- }
+ texObj->Sampler.BorderColor.f[RCOMP] = CLAMP(params[0], 0.0F, 1.0F);
+ texObj->Sampler.BorderColor.f[GCOMP] = CLAMP(params[1], 0.0F, 1.0F);
+ texObj->Sampler.BorderColor.f[BCOMP] = CLAMP(params[2], 0.0F, 1.0F);
+ texObj->Sampler.BorderColor.f[ACOMP] = CLAMP(params[3], 0.0F, 1.0F);
return GL_TRUE;
default:
}
break;
- /* GL_ARB_texture_float */
- case GL_TEXTURE_RED_TYPE_ARB:
- case GL_TEXTURE_GREEN_TYPE_ARB:
- case GL_TEXTURE_BLUE_TYPE_ARB:
- case GL_TEXTURE_ALPHA_TYPE_ARB:
- case GL_TEXTURE_LUMINANCE_TYPE_ARB:
- case GL_TEXTURE_INTENSITY_TYPE_ARB:
- case GL_TEXTURE_DEPTH_TYPE_ARB:
- if (!ctx->Extensions.ARB_texture_float)
- goto invalid_pname;
- if (_mesa_base_format_has_channel(img->_BaseFormat, pname))
- *params = _mesa_get_format_datatype(texFormat);
- else
- *params = GL_NONE;
- break;
-
default:
goto invalid_pname;
}
*/
static const GLenum targets[] = {
GL_TEXTURE_CUBE_MAP_ARB,
- GL_TEXTURE_3D,
GL_TEXTURE_2D,
GL_TEXTURE_1D,
};
default:
return GL_FALSE;
}
- case 3:
- switch (target) {
- case GL_TEXTURE_3D:
- case GL_PROXY_TEXTURE_3D:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
default:
_mesa_problem(ctx, "invalid dims=%u in legal_texobj_target()", dims);
return GL_FALSE;
* code:
* ctx->Driver.TexImage1D = _mesa_store_teximage1d;
* ctx->Driver.TexImage2D = _mesa_store_teximage2d;
- * ctx->Driver.TexImage3D = _mesa_store_teximage3d;
* etc...
*
* Texture image processing is actually kind of complicated. We have to do:
}
-/**
- * Store an image in any of the formats:
- * _mesa_texformat_rgba_float32
- * _mesa_texformat_rgb_float32
- * _mesa_texformat_alpha_float32
- * _mesa_texformat_luminance_float32
- * _mesa_texformat_luminance_alpha_float32
- * _mesa_texformat_intensity_float32
- */
-static GLboolean
-_mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
-{
- const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- const GLint components = _mesa_components_in_format(baseFormat);
-
- ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT32 ||
- dstFormat == MESA_FORMAT_RGB_FLOAT32 ||
- dstFormat == MESA_FORMAT_ALPHA_FLOAT32 ||
- dstFormat == MESA_FORMAT_LUMINANCE_FLOAT32 ||
- dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 ||
- dstFormat == MESA_FORMAT_INTENSITY_FLOAT32 ||
- dstFormat == MESA_FORMAT_R_FLOAT32 ||
- dstFormat == MESA_FORMAT_RG_FLOAT32);
- ASSERT(baseInternalFormat == GL_RGBA ||
- baseInternalFormat == GL_RGB ||
- baseInternalFormat == GL_ALPHA ||
- baseInternalFormat == GL_LUMINANCE ||
- baseInternalFormat == GL_LUMINANCE_ALPHA ||
- baseInternalFormat == GL_INTENSITY ||
- baseInternalFormat == GL_RED ||
- baseInternalFormat == GL_RG);
- ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLfloat));
-
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- baseInternalFormat == srcFormat &&
- baseInternalFormat == baseFormat &&
- srcType == GL_FLOAT) {
- /* 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 bytesPerRow;
- GLint img, row;
- if (!tempImage)
- return GL_FALSE;
- bytesPerRow = srcWidth * components * sizeof(GLfloat);
- for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[img];
- for (row = 0; row < srcHeight; row++) {
- memcpy(dstRow, srcRow, bytesPerRow);
- dstRow += dstRowStride;
- srcRow += srcWidth * components;
- }
- }
-
- free((void *) tempImage);
- }
- return GL_TRUE;
-}
-
-
-
-/**
- * As above, but store 16-bit floats.
- */
-static GLboolean
-_mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
-{
- const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
- const GLint components = _mesa_components_in_format(baseFormat);
-
- ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT16 ||
- dstFormat == MESA_FORMAT_RGB_FLOAT16 ||
- dstFormat == MESA_FORMAT_ALPHA_FLOAT16 ||
- dstFormat == MESA_FORMAT_LUMINANCE_FLOAT16 ||
- dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 ||
- dstFormat == MESA_FORMAT_INTENSITY_FLOAT16 ||
- dstFormat == MESA_FORMAT_R_FLOAT16 ||
- dstFormat == MESA_FORMAT_RG_FLOAT16);
- ASSERT(baseInternalFormat == GL_RGBA ||
- baseInternalFormat == GL_RGB ||
- baseInternalFormat == GL_ALPHA ||
- baseInternalFormat == GL_LUMINANCE ||
- baseInternalFormat == GL_LUMINANCE_ALPHA ||
- baseInternalFormat == GL_INTENSITY ||
- baseInternalFormat == GL_RED ||
- baseInternalFormat == GL_RG);
- ASSERT(_mesa_get_format_bytes(dstFormat) == components * sizeof(GLhalfARB));
-
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- baseInternalFormat == srcFormat &&
- baseInternalFormat == baseFormat &&
- srcType == GL_HALF_FLOAT_ARB) {
- /* 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;
- if (!tempImage)
- return GL_FALSE;
- for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = dstSlices[img];
- for (row = 0; row < srcHeight; row++) {
- GLhalfARB *dstTexel = (GLhalfARB *) dstRow;
- GLint i;
- for (i = 0; i < srcWidth * components; i++) {
- dstTexel[i] = _mesa_float_to_half(src[i]);
- }
- dstRow += dstRowStride;
- src += srcWidth * components;
- }
- }
-
- free((void *) tempImage);
- }
- return GL_TRUE;
-}
-
-
/* non-normalized, signed int8 */
static GLboolean
_mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
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_RGBA_FLOAT32] = _mesa_texstore_rgba_float32;
- table[MESA_FORMAT_RGBA_FLOAT16] = _mesa_texstore_rgba_float16;
- table[MESA_FORMAT_RGB_FLOAT32] = _mesa_texstore_rgba_float32;
- table[MESA_FORMAT_RGB_FLOAT16] = _mesa_texstore_rgba_float16;
- table[MESA_FORMAT_ALPHA_FLOAT32] = _mesa_texstore_rgba_float32;
- table[MESA_FORMAT_ALPHA_FLOAT16] = _mesa_texstore_rgba_float16;
- table[MESA_FORMAT_LUMINANCE_FLOAT32] = _mesa_texstore_rgba_float32;
- table[MESA_FORMAT_LUMINANCE_FLOAT16] = _mesa_texstore_rgba_float16;
- table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32] = _mesa_texstore_rgba_float32;
- 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_SIGNED_RGBA_16] = _mesa_texstore_signed_rgba_16;
table[MESA_FORMAT_RGBA_16] = _mesa_texstore_rgba_16;
case GL_TEXTURE_1D:
dims = 1;
break;
- case GL_TEXTURE_3D:
- dims = 3;
- break;
default:
dims = 2;
}
assert(yoffset == 0);
assert(zoffset == 0);
break;
- case GL_TEXTURE_3D:
- /* we'll store 3D images as a series of slices */
- numSlices = depth;
- sliceOffset = zoffset;
- srcImageStride = _mesa_image_image_stride(packing, width, height,
- format, type);
- break;
default:
_mesa_warning(ctx, "Unexpected target 0x%x in store_texsubimage()", target);
return;
-/**
- * This is the fallback for Driver.TexImage3D().
- */
-void
-_mesa_store_teximage3d(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint height, GLint depth, GLint border,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing)
-{
- if (width == 0 || height == 0 || depth == 0)
- return;
-
- /* allocate storage for texture data */
- if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat,
- width, height, depth)) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
- return;
- }
-
- store_texsubimage(ctx, texImage,
- 0, 0, 0, width, height, depth,
- format, type, pixels, packing, "glTexImage3D");
-}
-
-
-
/*
* This is the fallback for Driver.TexSubImage1D().
xoffset, yoffset, 0, width, height, 1,
format, type, pixels, packing, "glTexSubImage2D");
}
-
-
-/*
- * This is the fallback for Driver.TexSubImage3D().
- */
-void
-_mesa_store_texsubimage3d(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint width, GLint height, GLint depth,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing)
-{
- store_texsubimage(ctx, texImage,
- xoffset, yoffset, zoffset, width, height, depth,
- format, type, pixels, packing, "glTexSubImage3D");
-}
const struct gl_pixelstore_attrib *packing);
-extern void
-_mesa_store_teximage3d(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint height, GLint depth, GLint border,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
-
-
extern void
_mesa_store_texsubimage1d(struct gl_context *ctx,
struct gl_texture_image *texImage,
const struct gl_pixelstore_attrib *packing);
-extern void
-_mesa_store_texsubimage3d(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint width, GLint height, GLint depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing);
-
-
#endif
+++ /dev/null
-/*
- * Copyright © 2011 Marek Olšák <maraeo@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and 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 texturebarrier.c
- * Implementation of glTextureBarrierNV.
- *
- * \author Marek Olšák <maraeo@gmail.com>
- */
-
-#include <precomp.h>
-
-static void
-_mesa_texture_barrier(struct gl_context *ctx)
-{
- /* no-op */
-}
-
-void
-_mesa_init_texture_barrier_functions(struct dd_function_table *driver)
-{
- driver->TextureBarrier = _mesa_texture_barrier;
-}
-
-void GLAPIENTRY
-_mesa_TextureBarrierNV(void)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- ctx->Driver.TextureBarrier(ctx);
-}
+++ /dev/null
-/*
- * Copyright © 2011 Marek Olšák <maraeo@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and 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 texturebarrier.h
- * GL_NV_texture_barrier
- *
- * \author Marek Olšák <maraeo@gmail.com>
- */
-
-#ifndef TEXTUREBARRIER_H
-#define TEXTUREBARRIER_H
-
-#include "glheader.h"
-
-struct dd_function_table;
-
-extern void
-_mesa_init_texture_barrier_functions(struct dd_function_table *driver);
-
-extern void GLAPIENTRY
-_mesa_TextureBarrierNV(void);
-
-#endif /* TEXTUREBARRIER_H */
return INT_BIT;
case GL_UNSIGNED_INT:
return UNSIGNED_INT_BIT;
- case GL_HALF_FLOAT:
- if (ctx->Extensions.ARB_half_float_vertex)
- return HALF_BIT;
- else
- return 0x0;
case GL_FLOAT:
return FLOAT_BIT;
case GL_DOUBLE:
return;
}
- if (ctx->Array.ArrayObj->ARBsemantics &&
- !_mesa_is_bufferobj(ctx->Array.ArrayBufferObj)) {
- /* GL_ARB_vertex_array_object requires that all arrays reside in VBOs.
- * Generate GL_INVALID_OPERATION if that's not true.
- */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-VBO array)", func);
- return;
- }
-
elementSize = _mesa_sizeof_type(type) * size;
- array = &ctx->Array.ArrayObj->VertexAttrib[attrib];
+ array = &ctx->Array.VertexAttrib[attrib];
array->Size = size;
array->Type = type;
array->Stride = stride;
array->Ptr = (const GLubyte *) ptr;
array->_ElementSize = elementSize;
- _mesa_reference_buffer_object(ctx, &array->BufferObj,
- ctx->Array.ArrayBufferObj);
-
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= VERT_BIT(attrib);
}
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- update_array(ctx, "glColorPointer", VERT_ATTRIB_COLOR0,
+ update_array(ctx, "glColorPointer", VERT_ATTRIB_COLOR,
legalTypes, 3, 4,
size, type, stride, GL_TRUE, GL_FALSE, ptr);
}
}
-void GLAPIENTRY
-_mesa_SecondaryColorPointerEXT(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);
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
- update_array(ctx, "glSecondaryColorPointer", VERT_ATTRIB_COLOR1,
- legalTypes, 3, 4,
- size, type, stride, GL_TRUE, GL_FALSE, ptr);
-}
-
-
void GLAPIENTRY
_mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
dst->_MaxElement = src->_MaxElement;
}
-
-
-/**
- * Print vertex array's fields.
- */
static void
-print_array(const char *name, GLint index, const struct gl_client_array *array)
-{
- if (index >= 0)
- printf(" %s[%d]: ", name, index);
- else
- printf(" %s: ", name);
- printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %lu), MaxElem=%u\n",
- array->Ptr, array->Type, array->Size,
- array->_ElementSize, array->StrideB,
- array->BufferObj->Name, (unsigned long) array->BufferObj->Size,
- array->_MaxElement);
-}
-
-
-/**
- * Print current vertex object/array info. For debug.
- */
-void
-_mesa_print_arrays(struct gl_context *ctx)
+init_array(struct gl_context *ctx,
+ struct gl_client_array *array, GLint size, GLint type)
{
- struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
-
- _mesa_update_array_object_max_element(ctx, arrayObj);
-
- printf("Array Object %u\n", arrayObj->Name);
- if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled)
- print_array("Vertex", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_POS]);
- if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled)
- 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]);
- if (arrayObj->VertexAttrib[VERT_ATTRIB_TEX].Enabled)
- print_array("TexCoord", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_TEX]);
- printf(" _MaxElement = %u\n", arrayObj->_MaxElement);
+ array->Size = size;
+ array->Type = type;
+ array->Stride = 0;
+ array->StrideB = 0;
+ array->Ptr = NULL;
+ array->Enabled = GL_FALSE;
+ array->Normalized = GL_FALSE;
+ array->Integer = GL_FALSE;
+ array->_ElementSize = size * _mesa_sizeof_type(type);
+ /* Vertex array buffers */
+ _mesa_reference_buffer_object(ctx, &array->BufferObj,
+ ctx->Shared->NullBufferObj);
}
* Initialize vertex array state for given context.
*/
void
-_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.Objects = _mesa_NewHashTable();
-}
-
-
-/**
- * Callback for deleting an array object. Called by _mesa_HashDeleteAll().
- */
-static void
-delete_arrayobj_cb(GLuint id, void *data, void *userData)
+_mesa_init_varray(struct gl_context *ctx, struct gl_array_attrib *array)
{
- struct gl_array_object *arrayObj = (struct gl_array_object *) data;
- struct gl_context *ctx = (struct gl_context *) userData;
- _mesa_delete_array_object(ctx, arrayObj);
+ GLuint i;
+
+ /* Init the individual arrays */
+ for (i = 0; i < Elements(array->VertexAttrib); i++) {
+ switch (i) {
+ case VERT_ATTRIB_WEIGHT:
+ init_array(ctx, &array->VertexAttrib[VERT_ATTRIB_WEIGHT], 1, GL_FLOAT);
+ break;
+ case VERT_ATTRIB_NORMAL:
+ init_array(ctx, &array->VertexAttrib[VERT_ATTRIB_NORMAL], 3, GL_FLOAT);
+ break;
+ case VERT_ATTRIB_FOG:
+ init_array(ctx, &array->VertexAttrib[VERT_ATTRIB_FOG], 1, GL_FLOAT);
+ break;
+ case VERT_ATTRIB_COLOR_INDEX:
+ init_array(ctx, &array->VertexAttrib[VERT_ATTRIB_COLOR_INDEX], 1, GL_FLOAT);
+ break;
+ case VERT_ATTRIB_EDGEFLAG:
+ init_array(ctx, &array->VertexAttrib[VERT_ATTRIB_EDGEFLAG], 1, GL_BOOL);
+ break;
+ default:
+ init_array(ctx, &array->VertexAttrib[i], 4, GL_FLOAT);
+ break;
+ }
+ }
}
* Free vertex array state for given context.
*/
void
-_mesa_free_varray_data(struct gl_context *ctx)
+_mesa_free_varray_data(struct gl_context *ctx, struct gl_array_attrib* array)
{
- _mesa_HashDeleteAll(ctx->Array.Objects, delete_arrayobj_cb, ctx);
- _mesa_DeleteHashTable(ctx->Array.Objects);
+ GLuint i;
+
+ /* Uninit the individual arrays */
+ for (i = 0; i < Elements(array->VertexAttrib); i++)
+ {
+ _mesa_reference_buffer_object(ctx, &array->VertexAttrib[i].BufferObj, NULL);
+ memset(&array->VertexAttrib[i], 0, sizeof(struct gl_client_array));
+ }
}
_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr);
-extern void GLAPIENTRY
-_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
-
-
extern void GLAPIENTRY
_mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer);
_mesa_DrawElements(GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices);
-extern void GLAPIENTRY
-_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count,
- GLenum type, const GLvoid *indices);
-
extern void
_mesa_copy_client_array(struct gl_context *ctx,
struct gl_client_array *dst,
struct gl_client_array *src);
-
-extern void
-_mesa_print_arrays(struct gl_context *ctx);
-
extern void
-_mesa_init_varray( struct gl_context * ctx );
+_mesa_init_varray( struct gl_context * ctx, struct gl_array_attrib *array);
extern void
-_mesa_free_varray_data(struct gl_context *ctx);
+_mesa_free_varray_data(struct gl_context *ctx, struct gl_array_attrib *array);
#else
static void
compute_version(struct gl_context *ctx)
{
- GLuint major, minor;
- static const int max = 100;
+ /* report openGL 1.1 */
+ ctx->VersionMajor = 1;
+ ctx->VersionMinor = 1;
- 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);
+ override_version(ctx, &ctx->VersionMajor, &ctx->VersionMinor);
-
- 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
+ ctx->VersionString = (char *) malloc(20);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, 20,
+ "%u.%u Mesa " MESA_VERSION_STRING
#ifdef MESA_GIT_SHA1
- " (" MESA_GIT_SHA1 ")"
+ " (" MESA_GIT_SHA1 ")"
#endif
- ,
- ctx->VersionMajor, ctx->VersionMinor);
- }
+ ,
+ ctx->VersionMajor, ctx->VersionMinor);
+ }
}
/**
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_DrawArrays(tab, vfmt->DrawArrays);
SET_DrawElements(tab, vfmt->DrawElements);
- SET_DrawRangeElements(tab, vfmt->DrawRangeElements);
/* GL_NV_vertex_program */
SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV);
if(NOT MSVC)
allow_warnings(mesa_swrast)
endif()
+
+if(NOT MSVC)
+ add_target_compile_flags(mesa_swrast "-Wno-unused-variable")
+endif()
ASSERT(ctx->Line.SmoothFlag);
if (ctx->Texture._EnabledCoord
- || (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
- || ctx->Fog.ColorSumEnabled
|| swrast->_FogEnabled) {
swrast->Line = aa_general_rgba_line;
}
ASSERT(ctx->Polygon.SmoothFlag);
if (ctx->Texture._EnabledCoord
- || swrast->_FogEnabled
- || _mesa_need_secondary_color(ctx)) {
+ || swrast->_FogEnabled) {
SWRAST_CONTEXT(ctx)->Triangle = general_aa_tri;
}
else {
ALPHA_TEST(rgba[i][ACOMP], ;);
}
else {
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
const GLfloat ref = ctx->Color.AlphaRef;
ALPHA_TEST(rgba[i][ACOMP], ;);
}
-/**
- * Blend min function.
- * Any chanType ok.
- */
-static void _BLENDAPI
-blend_min(struct gl_context *ctx, GLuint n, const GLubyte mask[],
- GLvoid *src, const GLvoid *dst, GLenum chanType)
-{
- GLuint i;
- ASSERT(ctx->Color.EquationRGB == GL_MIN);
- ASSERT(ctx->Color.EquationA == GL_MIN);
- (void) ctx;
-
- if (chanType == GL_UNSIGNED_BYTE) {
- GLubyte (*rgba)[4] = (GLubyte (*)[4]) src;
- const GLubyte (*dest)[4] = (const GLubyte (*)[4]) dst;
- for (i=0;i<n;i++) {
- if (mask[i]) {
- rgba[i][RCOMP] = MIN2( rgba[i][RCOMP], dest[i][RCOMP] );
- rgba[i][GCOMP] = MIN2( rgba[i][GCOMP], dest[i][GCOMP] );
- rgba[i][BCOMP] = MIN2( rgba[i][BCOMP], dest[i][BCOMP] );
- rgba[i][ACOMP] = MIN2( rgba[i][ACOMP], dest[i][ACOMP] );
- }
- }
- }
- else if (chanType == GL_UNSIGNED_SHORT) {
- GLushort (*rgba)[4] = (GLushort (*)[4]) src;
- const GLushort (*dest)[4] = (const GLushort (*)[4]) dst;
- for (i=0;i<n;i++) {
- if (mask[i]) {
- rgba[i][RCOMP] = MIN2( rgba[i][RCOMP], dest[i][RCOMP] );
- rgba[i][GCOMP] = MIN2( rgba[i][GCOMP], dest[i][GCOMP] );
- rgba[i][BCOMP] = MIN2( rgba[i][BCOMP], dest[i][BCOMP] );
- rgba[i][ACOMP] = MIN2( rgba[i][ACOMP], dest[i][ACOMP] );
- }
- }
- }
- else {
- GLfloat (*rgba)[4] = (GLfloat (*)[4]) src;
- const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst;
- ASSERT(chanType == GL_FLOAT);
- for (i=0;i<n;i++) {
- if (mask[i]) {
- rgba[i][RCOMP] = MIN2( rgba[i][RCOMP], dest[i][RCOMP] );
- rgba[i][GCOMP] = MIN2( rgba[i][GCOMP], dest[i][GCOMP] );
- rgba[i][BCOMP] = MIN2( rgba[i][BCOMP], dest[i][BCOMP] );
- rgba[i][ACOMP] = MIN2( rgba[i][ACOMP], dest[i][ACOMP] );
- }
- }
- }
-}
-
-
-/**
- * Blend max function.
- * Any chanType ok.
- */
-static void _BLENDAPI
-blend_max(struct gl_context *ctx, GLuint n, const GLubyte mask[],
- GLvoid *src, const GLvoid *dst, GLenum chanType)
-{
- GLuint i;
- ASSERT(ctx->Color.EquationRGB == GL_MAX);
- ASSERT(ctx->Color.EquationA == GL_MAX);
- (void) ctx;
-
- if (chanType == GL_UNSIGNED_BYTE) {
- GLubyte (*rgba)[4] = (GLubyte (*)[4]) src;
- const GLubyte (*dest)[4] = (const GLubyte (*)[4]) dst;
- for (i=0;i<n;i++) {
- if (mask[i]) {
- rgba[i][RCOMP] = MAX2( rgba[i][RCOMP], dest[i][RCOMP] );
- rgba[i][GCOMP] = MAX2( rgba[i][GCOMP], dest[i][GCOMP] );
- rgba[i][BCOMP] = MAX2( rgba[i][BCOMP], dest[i][BCOMP] );
- rgba[i][ACOMP] = MAX2( rgba[i][ACOMP], dest[i][ACOMP] );
- }
- }
- }
- else if (chanType == GL_UNSIGNED_SHORT) {
- GLushort (*rgba)[4] = (GLushort (*)[4]) src;
- const GLushort (*dest)[4] = (const GLushort (*)[4]) dst;
- for (i=0;i<n;i++) {
- if (mask[i]) {
- rgba[i][RCOMP] = MAX2( rgba[i][RCOMP], dest[i][RCOMP] );
- rgba[i][GCOMP] = MAX2( rgba[i][GCOMP], dest[i][GCOMP] );
- rgba[i][BCOMP] = MAX2( rgba[i][BCOMP], dest[i][BCOMP] );
- rgba[i][ACOMP] = MAX2( rgba[i][ACOMP], dest[i][ACOMP] );
- }
- }
- }
- else {
- GLfloat (*rgba)[4] = (GLfloat (*)[4]) src;
- const GLfloat (*dest)[4] = (const GLfloat (*)[4]) dst;
- ASSERT(chanType == GL_FLOAT);
- for (i=0;i<n;i++) {
- if (mask[i]) {
- rgba[i][RCOMP] = MAX2( rgba[i][RCOMP], dest[i][RCOMP] );
- rgba[i][GCOMP] = MAX2( rgba[i][GCOMP], dest[i][GCOMP] );
- rgba[i][BCOMP] = MAX2( rgba[i][BCOMP], dest[i][BCOMP] );
- rgba[i][ACOMP] = MAX2( rgba[i][ACOMP], dest[i][ACOMP] );
- }
- }
- }
-}
-
-
-
/**
* Modulate: result = src * dest
* Any chanType ok.
*/
/* Source RGB factor */
- switch (ctx->Color.SrcRGB) {
+ switch (ctx->Color.SrcFactor) {
case GL_ZERO:
- sR = sG = sB = 0.0F;
+ sR = sG = sB = sA = 0.0F;
break;
case GL_ONE:
- sR = sG = sB = 1.0F;
+ sR = sG = sB = sA = 1.0F;
break;
case GL_DST_COLOR:
sR = Rd;
sG = Gd;
sB = Bd;
+ sA = Ad;
break;
case GL_ONE_MINUS_DST_COLOR:
sR = 1.0F - Rd;
sG = 1.0F - Gd;
sB = 1.0F - Bd;
+ sA = 1.0f - Ad;
break;
case GL_SRC_ALPHA:
- sR = sG = sB = As;
+ sR = sG = sB = sA = As;
break;
case GL_ONE_MINUS_SRC_ALPHA:
- sR = sG = sB = 1.0F - As;
+ sR = sG = sB = sA = 1.0F - As;
break;
case GL_DST_ALPHA:
- sR = sG = sB = Ad;
+ sR = sG = sB = sA = Ad;
break;
case GL_ONE_MINUS_DST_ALPHA:
- sR = sG = sB = 1.0F - Ad;
+ sR = sG = sB = sA = 1.0F - Ad;
break;
case GL_SRC_ALPHA_SATURATE:
if (As < 1.0F - Ad) {
- sR = sG = sB = As;
+ sR = sG = sB = sA = As;
}
else {
- sR = sG = sB = 1.0F - Ad;
+ sR = sG = sB = sA = 1.0F - Ad;
}
break;
- case GL_CONSTANT_COLOR:
- sR = ctx->Color.BlendColor[0];
- sG = ctx->Color.BlendColor[1];
- sB = ctx->Color.BlendColor[2];
- break;
- case GL_ONE_MINUS_CONSTANT_COLOR:
- sR = 1.0F - ctx->Color.BlendColor[0];
- sG = 1.0F - ctx->Color.BlendColor[1];
- sB = 1.0F - ctx->Color.BlendColor[2];
- break;
- case GL_CONSTANT_ALPHA:
- sR = sG = sB = ctx->Color.BlendColor[3];
- break;
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- sR = sG = sB = 1.0F - ctx->Color.BlendColor[3];
- break;
case GL_SRC_COLOR:
sR = Rs;
sG = Gs;
sB = Bs;
+ sA = As;
break;
case GL_ONE_MINUS_SRC_COLOR:
sR = 1.0F - Rs;
sG = 1.0F - Gs;
sB = 1.0F - Bs;
- break;
- default:
- /* this should never happen */
- _mesa_problem(ctx, "Bad blend source RGB factor in blend_general_float");
- return;
- }
-
- /* Source Alpha factor */
- switch (ctx->Color.SrcA) {
- case GL_ZERO:
- sA = 0.0F;
- break;
- case GL_ONE:
- sA = 1.0F;
- break;
- case GL_DST_COLOR:
- sA = Ad;
- break;
- case GL_ONE_MINUS_DST_COLOR:
- sA = 1.0F - Ad;
- break;
- case GL_SRC_ALPHA:
- sA = As;
- break;
- case GL_ONE_MINUS_SRC_ALPHA:
- sA = 1.0F - As;
- break;
- case GL_DST_ALPHA:
- sA = Ad;
- break;
- case GL_ONE_MINUS_DST_ALPHA:
- sA = 1.0F - Ad;
- break;
- case GL_SRC_ALPHA_SATURATE:
- sA = 1.0;
- break;
- case GL_CONSTANT_COLOR:
- sA = ctx->Color.BlendColor[3];
- break;
- case GL_ONE_MINUS_CONSTANT_COLOR:
- sA = 1.0F - ctx->Color.BlendColor[3];
- break;
- case GL_CONSTANT_ALPHA:
- sA = ctx->Color.BlendColor[3];
- break;
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- sA = 1.0F - ctx->Color.BlendColor[3];
- break;
- case GL_SRC_COLOR:
- sA = As;
- break;
- case GL_ONE_MINUS_SRC_COLOR:
sA = 1.0F - As;
break;
default:
/* this should never happen */
- sA = 0.0F;
- _mesa_problem(ctx, "Bad blend source A factor in blend_general_float");
+ _mesa_problem(ctx, "Bad blend source RGB factor in blend_general_float");
return;
}
- /* Dest RGB factor */
- switch (ctx->Color.DstRGB) {
+ /* Dest factor */
+ switch (ctx->Color.DstFactor) {
case GL_ZERO:
- dR = dG = dB = 0.0F;
+ dR = dG = dB = dA = 0.0F;
break;
case GL_ONE:
- dR = dG = dB = 1.0F;
+ dR = dG = dB = dA = 1.0F;
break;
case GL_SRC_COLOR:
dR = Rs;
dG = Gs;
dB = Bs;
+ dA = As;
break;
case GL_ONE_MINUS_SRC_COLOR:
dR = 1.0F - Rs;
dG = 1.0F - Gs;
dB = 1.0F - Bs;
+ dA = 1.0F - As;
break;
case GL_SRC_ALPHA:
- dR = dG = dB = As;
+ dR = dG = dB = dA = As;
break;
case GL_ONE_MINUS_SRC_ALPHA:
- dR = dG = dB = 1.0F - As;
+ dR = dG = dB = dA = 1.0F - As;
break;
case GL_DST_ALPHA:
- dR = dG = dB = Ad;
+ dR = dG = dB = dA = Ad;
break;
case GL_ONE_MINUS_DST_ALPHA:
- dR = dG = dB = 1.0F - Ad;
- break;
- case GL_CONSTANT_COLOR:
- dR = ctx->Color.BlendColor[0];
- dG = ctx->Color.BlendColor[1];
- dB = ctx->Color.BlendColor[2];
- break;
- case GL_ONE_MINUS_CONSTANT_COLOR:
- dR = 1.0F - ctx->Color.BlendColor[0];
- dG = 1.0F - ctx->Color.BlendColor[1];
- dB = 1.0F - ctx->Color.BlendColor[2];
- break;
- case GL_CONSTANT_ALPHA:
- dR = dG = dB = ctx->Color.BlendColor[3];
- break;
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- dR = dG = dB = 1.0F - ctx->Color.BlendColor[3];
+ dR = dG = dB = dA = 1.0F - Ad;
break;
case GL_DST_COLOR:
dR = Rd;
dG = Gd;
dB = Bd;
+ dA = Ad;
break;
case GL_ONE_MINUS_DST_COLOR:
dR = 1.0F - Rd;
dG = 1.0F - Gd;
dB = 1.0F - Bd;
- break;
- default:
- /* this should never happen */
- dR = dG = dB = 0.0F;
- _mesa_problem(ctx, "Bad blend dest RGB factor in blend_general_float");
- return;
- }
-
- /* Dest Alpha factor */
- switch (ctx->Color.DstA) {
- case GL_ZERO:
- dA = 0.0F;
- break;
- case GL_ONE:
- dA = 1.0F;
- break;
- case GL_SRC_COLOR:
- dA = As;
- break;
- case GL_ONE_MINUS_SRC_COLOR:
- dA = 1.0F - As;
- break;
- case GL_SRC_ALPHA:
- dA = As;
- break;
- case GL_ONE_MINUS_SRC_ALPHA:
- dA = 1.0F - As;
- break;
- case GL_DST_ALPHA:
- dA = Ad;
- break;
- case GL_ONE_MINUS_DST_ALPHA:
- dA = 1.0F - Ad;
- break;
- case GL_CONSTANT_COLOR:
- dA = ctx->Color.BlendColor[3];
- break;
- case GL_ONE_MINUS_CONSTANT_COLOR:
- dA = 1.0F - ctx->Color.BlendColor[3];
- break;
- case GL_CONSTANT_ALPHA:
- dA = ctx->Color.BlendColor[3];
- break;
- case GL_ONE_MINUS_CONSTANT_ALPHA:
- dA = 1.0F - ctx->Color.BlendColor[3];
- break;
- case GL_DST_COLOR:
- dA = Ad;
- break;
- case GL_ONE_MINUS_DST_COLOR:
dA = 1.0F - Ad;
break;
default:
/* this should never happen */
- dA = 0.0F;
- _mesa_problem(ctx, "Bad blend dest A factor in blend_general_float");
+ dR = dG = dB = dA = 0.0F;
+ _mesa_problem(ctx, "Bad blend dest factor in blend_general_float");
return;
}
- /* compute the blended RGB */
- switch (ctx->Color.EquationRGB) {
- case GL_FUNC_ADD:
- r = Rs * sR + Rd * dR;
- g = Gs * sG + Gd * dG;
- b = Bs * sB + Bd * dB;
- a = As * sA + Ad * dA;
- break;
- case GL_FUNC_SUBTRACT:
- r = Rs * sR - Rd * dR;
- g = Gs * sG - Gd * dG;
- b = Bs * sB - Bd * dB;
- a = As * sA - Ad * dA;
- break;
- case GL_FUNC_REVERSE_SUBTRACT:
- r = Rd * dR - Rs * sR;
- g = Gd * dG - Gs * sG;
- b = Bd * dB - Bs * sB;
- a = Ad * dA - As * sA;
- break;
- case GL_MIN:
- r = MIN2( Rd, Rs );
- g = MIN2( Gd, Gs );
- b = MIN2( Bd, Bs );
- break;
- case GL_MAX:
- r = MAX2( Rd, Rs );
- g = MAX2( Gd, Gs );
- b = MAX2( Bd, Bs );
- break;
- default:
- /* should never get here */
- r = g = b = 0.0F; /* silence uninitialized var warning */
- _mesa_problem(ctx, "unexpected BlendEquation in blend_general()");
- return;
- }
-
- /* compute the blended alpha */
- switch (ctx->Color.EquationA) {
- case GL_FUNC_ADD:
- a = As * sA + Ad * dA;
- break;
- case GL_FUNC_SUBTRACT:
- a = As * sA - Ad * dA;
- break;
- case GL_FUNC_REVERSE_SUBTRACT:
- a = Ad * dA - As * sA;
- break;
- case GL_MIN:
- a = MIN2( Ad, As );
- break;
- case GL_MAX:
- a = MAX2( Ad, As );
- break;
- default:
- /* should never get here */
- a = 0.0F; /* silence uninitialized var warning */
- _mesa_problem(ctx, "unexpected BlendEquation in blend_general()");
- return;
- }
+ /* compute the blended RGBA */
+ r = Rs * sR + Rd * dR;
+ g = Gs * sG + Gd * dG;
+ b = Bs * sB + Bd * dB;
+ a = As * sA + Ad * dA;
/* final clamping */
#if 0
_swrast_choose_blend_func(struct gl_context *ctx, GLenum chanType)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLenum eq = ctx->Color.EquationRGB;
- const GLenum srcRGB = ctx->Color.SrcRGB;
- const GLenum dstRGB = ctx->Color.DstRGB;
- const GLenum srcA = ctx->Color.SrcA;
- const GLenum dstA = ctx->Color.DstA;
+ const GLenum srcFactor = ctx->Color.SrcFactor;
+ const GLenum dstFactor = ctx->Color.DstFactor;
- if (ctx->Color.EquationRGB != ctx->Color.EquationA) {
- swrast->BlendFunc = blend_general;
- }
- else if (eq == GL_MIN) {
- /* Note: GL_MIN ignores the blending weight factors */
-#if defined(USE_MMX_ASM)
- if (cpu_has_mmx && chanType == GL_UNSIGNED_BYTE) {
- swrast->BlendFunc = _mesa_mmx_blend_min;
- }
- else
-#endif
- swrast->BlendFunc = blend_min;
- }
- else if (eq == GL_MAX) {
- /* Note: GL_MAX ignores the blending weight factors */
-#if defined(USE_MMX_ASM)
- if (cpu_has_mmx && chanType == GL_UNSIGNED_BYTE) {
- swrast->BlendFunc = _mesa_mmx_blend_max;
- }
- else
-#endif
- swrast->BlendFunc = blend_max;
- }
- else if (srcRGB != srcA || dstRGB != dstA) {
- swrast->BlendFunc = blend_general;
- }
- else if (eq == GL_FUNC_ADD && srcRGB == GL_SRC_ALPHA
- && dstRGB == GL_ONE_MINUS_SRC_ALPHA) {
+ if (srcFactor == GL_SRC_ALPHA && dstFactor == GL_ONE_MINUS_SRC_ALPHA) {
#if defined(USE_MMX_ASM)
if (cpu_has_mmx && chanType == GL_UNSIGNED_BYTE) {
swrast->BlendFunc = _mesa_mmx_blend_transparency;
swrast->BlendFunc = blend_transparency_float;
}
}
- else if (eq == GL_FUNC_ADD && srcRGB == GL_ONE && dstRGB == GL_ONE) {
+ else if (srcFactor == GL_ONE && dstFactor == GL_ONE) {
#if defined(USE_MMX_ASM)
if (cpu_has_mmx && chanType == GL_UNSIGNED_BYTE) {
swrast->BlendFunc = _mesa_mmx_blend_add;
#endif
swrast->BlendFunc = blend_add;
}
- else if (((eq == GL_FUNC_ADD || eq == GL_FUNC_REVERSE_SUBTRACT)
- && (srcRGB == GL_ZERO && dstRGB == GL_SRC_COLOR))
- ||
- ((eq == GL_FUNC_ADD || eq == GL_FUNC_SUBTRACT)
- && (srcRGB == GL_DST_COLOR && dstRGB == GL_ZERO))) {
+ else if ((srcFactor == GL_ZERO && dstFactor == GL_SRC_COLOR)
+ || (srcFactor == GL_DST_COLOR && dstFactor == GL_ZERO)) {
#if defined(USE_MMX_ASM)
if (cpu_has_mmx && chanType == GL_UNSIGNED_BYTE) {
swrast->BlendFunc = _mesa_mmx_blend_modulate;
#endif
swrast->BlendFunc = blend_modulate;
}
- else if (eq == GL_FUNC_ADD && srcRGB == GL_ZERO && dstRGB == GL_ONE) {
+ else if (srcFactor == GL_ZERO && dstFactor == GL_ONE) {
swrast->BlendFunc = blend_noop;
}
- else if (eq == GL_FUNC_ADD && srcRGB == GL_ONE && dstRGB == GL_ZERO) {
+ else if (srcFactor == GL_ONE && dstFactor == GL_ZERO) {
swrast->BlendFunc = blend_replace;
}
else {
}
-/**
- * See if we can do early diffuse+specular (primary+secondary) color
- * add per vertex instead of per-fragment.
- */
-static void
-_swrast_update_specular_vertex_add(struct gl_context *ctx)
-{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLboolean separateSpecular = ctx->Fog.ColorSumEnabled ||
- (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR);
-
- swrast->SpecularVertexAdd = (separateSpecular && !ctx->Texture._Enabled);
-}
-
-
#define _SWRAST_NEW_DERIVED (_SWRAST_NEW_RASTERMASK | \
_NEW_TEXTURE | \
_NEW_HINT | \
swrast->choose_triangle( ctx );
ASSERT(swrast->Triangle);
- if (swrast->SpecularVertexAdd) {
- /* separate specular color, but no texture */
- swrast->SpecTriangle = swrast->Triangle;
- swrast->Triangle = _swrast_add_spec_terms_triangle;
- }
-
swrast->Triangle( ctx, v0, v1, v2 );
}
swrast->choose_line( ctx );
ASSERT(swrast->Line);
- if (swrast->SpecularVertexAdd) {
- swrast->SpecLine = swrast->Line;
- swrast->Line = _swrast_add_spec_terms_line;
- }
-
swrast->Line( ctx, v0, v1 );
}
_swrast_validate_derived( ctx );
swrast->choose_point( ctx );
- if (swrast->SpecularVertexAdd) {
- swrast->SpecPoint = swrast->Point;
- swrast->Point = _swrast_add_spec_terms_point;
- }
-
swrast->Point( ctx, v0 );
}
attribsMask = 0x0;
#if CHAN_TYPE == GL_FLOAT
- attribsMask |= FRAG_BIT_COL0;
+ attribsMask |= FRAG_BIT_COL;
#endif
- if (ctx->Fog.ColorSumEnabled ||
- (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) {
- attribsMask |= FRAG_BIT_COL1;
- }
-
if (swrast->_FogEnabled)
attribsMask |= FRAG_BIT_FOGC;
if (attribsMask & BITFIELD64_BIT(i)) {
swrast->_ActiveAttribs[num++] = i;
/* how should this attribute be interpolated? */
- if (i == FRAG_ATTRIB_COL0 || i == FRAG_ATTRIB_COL1)
+ if (i == FRAG_ATTRIB_COL)
swrast->_InterpMode[i] = ctx->Light.ShadeModel;
else
swrast->_InterpMode[i] = GL_SMOOTH;
_NEW_TEXTURE))
_swrast_update_active_attribs(ctx);
- if (swrast->NewState & (_NEW_FOG |
- _NEW_LIGHT |
- _NEW_TEXTURE))
- _swrast_update_specular_vertex_add(ctx);
-
swrast->NewState = 0;
swrast->StateChanges = 0;
swrast->InvalidateState = _swrast_invalidate_state;
_mesa_debug(ctx, "color %d %d %d %d\n",
v->color[0], v->color[1], v->color[2], v->color[3]);
#endif
- _mesa_debug(ctx, "spec %g %g %g %g\n",
- v->attrib[FRAG_ATTRIB_COL1][0],
- v->attrib[FRAG_ATTRIB_COL1][1],
- v->attrib[FRAG_ATTRIB_COL1][2],
- v->attrib[FRAG_ATTRIB_COL1][3]);
_mesa_debug(ctx, "fog %f\n", v->attrib[FRAG_ATTRIB_FOGC][0]);
_mesa_debug(ctx, "index %f\n", v->attrib[FRAG_ATTRIB_CI][0]);
_mesa_debug(ctx, "pointsize %f\n", v->pointSize);
GLbitfield NewState;
GLuint StateChanges;
GLenum Primitive; /* current primitive being drawn (ala glBegin) */
- GLboolean SpecularVertexAdd; /**< Add specular/secondary color per vertex */
void (*InvalidateState)( struct gl_context *ctx, GLbitfield new_state );
INIT_SPAN(span, GL_BITMAP);
_swrast_span_default_attribs(ctx, &span);
span.arrayMask = SPAN_RGBA;
- span.arrayAttribs = FRAG_BIT_COL0; /* we'll fill in COL0 attrib values */
+ span.arrayAttribs = FRAG_BIT_COL; /* we'll fill in COL0 attrib values */
if (overlapping) {
tmpImage = (GLfloat *) malloc(width * height * sizeof(GLfloat) * 4);
ASSERT(width < MAX_WIDTH);
for (row = 0; row < height; row++, sy += stepy, dy += stepy) {
- GLvoid *rgba = span.array->attribs[FRAG_ATTRIB_COL0];
+ GLvoid *rgba = span.array->attribs[FRAG_ATTRIB_COL];
/* Get row/span of source pixels */
if (overlapping) {
INIT_SPAN(span, GL_BITMAP);
_swrast_span_default_attribs(ctx, &span);
span.arrayMask = SPAN_RGBA;
- span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */
+ span.arrayAttribs = FRAG_BIT_COL; /* we're fill in COL0 attrib values */
if (_mesa_get_format_datatype(ctx->DrawBuffer->_ColorDrawBuffer->Format) != GL_FLOAT) {
/* need to clamp colors before applying fragment ops */
= _mesa_image_row_stride(unpack, width, format, type);
GLint skipPixels = 0;
/* use span array for temp color storage */
- GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL];
/* if the span is wider than MAX_WIDTH we have to do it in chunks */
while (skipPixels < width) {
{
GLfloat win[4];
const GLfloat *vtc = v->attrib[FRAG_ATTRIB_TEX];
- const GLfloat *color = v->attrib[FRAG_ATTRIB_COL0];
+ const GLfloat *color = v->attrib[FRAG_ATTRIB_COL];
win[0] = v->attrib[FRAG_ATTRIB_WPOS][0];
win[1] = v->attrib[FRAG_ATTRIB_WPOS][1];
FOG_LOOP(GLushort, LINEAR_FOG);
}
else {
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
ASSERT(span->array->ChanType == GL_FLOAT);
FOG_LOOP(GLfloat, LINEAR_FOG);
}
FOG_LOOP(GLushort, EXP_FOG);
}
else {
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
ASSERT(span->array->ChanType == GL_FLOAT);
FOG_LOOP(GLfloat, EXP_FOG);
}
FOG_LOOP(GLushort, EXP2_FOG);
}
else {
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
ASSERT(span->array->ChanType == GL_FLOAT);
FOG_LOOP(GLfloat, EXP2_FOG);
}
FOG_LOOP(GLushort, BLEND_FOG);
}
else {
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
ASSERT(span->array->ChanType == GL_FLOAT);
FOG_LOOP(GLfloat, BLEND_FOG);
}
-void
-_swrast_add_spec_terms_line(struct gl_context *ctx,
- const SWvertex *v0, const SWvertex *v1)
-{
- SWvertex *ncv0 = (SWvertex *)v0;
- SWvertex *ncv1 = (SWvertex *)v1;
- GLfloat rSum, gSum, bSum;
- GLchan cSave[2][4];
-
- /* save original colors */
- COPY_CHAN4(cSave[0], ncv0->color);
- COPY_CHAN4(cSave[1], ncv1->color);
- /* sum v0 */
- rSum = CHAN_TO_FLOAT(ncv0->color[0]) + ncv0->attrib[FRAG_ATTRIB_COL1][0];
- gSum = CHAN_TO_FLOAT(ncv0->color[1]) + ncv0->attrib[FRAG_ATTRIB_COL1][1];
- bSum = CHAN_TO_FLOAT(ncv0->color[2]) + ncv0->attrib[FRAG_ATTRIB_COL1][2];
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[0], rSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[1], gSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[2], bSum);
- /* sum v1 */
- rSum = CHAN_TO_FLOAT(ncv1->color[0]) + ncv1->attrib[FRAG_ATTRIB_COL1][0];
- gSum = CHAN_TO_FLOAT(ncv1->color[1]) + ncv1->attrib[FRAG_ATTRIB_COL1][1];
- bSum = CHAN_TO_FLOAT(ncv1->color[2]) + ncv1->attrib[FRAG_ATTRIB_COL1][2];
- UNCLAMPED_FLOAT_TO_CHAN(ncv1->color[0], rSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv1->color[1], gSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv1->color[2], bSum);
- /* draw */
- SWRAST_CONTEXT(ctx)->SpecLine( ctx, ncv0, ncv1 );
- /* restore original colors */
- COPY_CHAN4( ncv0->attrib[FRAG_ATTRIB_COL0], cSave[0] );
- COPY_CHAN4( ncv1->attrib[FRAG_ATTRIB_COL0], cSave[1] );
-}
-
-
-
#ifdef DEBUG
/* record the current line function name */
_swrast_choose_line( struct gl_context *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLboolean specular = (ctx->Fog.ColorSumEnabled ||
- (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR));
if (ctx->RenderMode == GL_RENDER) {
if (ctx->Line.SmoothFlag) {
ASSERT(swrast->Line);
}
else if (ctx->Texture._EnabledCoord
- || swrast->_FogEnabled
- || specular) {
+ || swrast->_FogEnabled) {
USE(general_line);
}
else if (ctx->Depth.Test
if (dx == 0 && dy == 0)
return;
- /*
- printf("%s %d,%d %g %g %g %g %g %g %g %g\n", __FUNCTION__, dx, dy,
- vert0->attrib[FRAG_ATTRIB_COL1][0],
- vert0->attrib[FRAG_ATTRIB_COL1][1],
- vert0->attrib[FRAG_ATTRIB_COL1][2],
- vert0->attrib[FRAG_ATTRIB_COL1][3],
- vert1->attrib[FRAG_ATTRIB_COL1][0],
- vert1->attrib[FRAG_ATTRIB_COL1][1],
- vert1->attrib[FRAG_ATTRIB_COL1][2],
- vert1->attrib[FRAG_ATTRIB_COL1][3]);
- */
-
#ifdef DEPTH_TYPE
zPtr = (DEPTH_TYPE *) _swrast_pixel_address(zrb, x0, y0);
#endif
}
else {
logicop_uint4(ctx, 4 * span->end,
- (GLuint *) span->array->attribs[FRAG_ATTRIB_COL0],
+ (GLuint *) span->array->attribs[FRAG_ATTRIB_COL],
(const GLuint *) rbPixels, span->array->mask);
}
}
const GLuint bMask = ctx->Color.ColorMask[BCOMP] ? ~0x0 : 0x0;
const GLuint aMask = ctx->Color.ColorMask[ACOMP] ? ~0x0 : 0x0;
const GLuint (*dst)[4] = (const GLuint (*)[4]) rbPixels;
- GLuint (*src)[4] = (GLuint (*)[4]) span->array->attribs[FRAG_ATTRIB_COL0];
+ GLuint (*src)[4] = (GLuint (*)[4]) span->array->attribs[FRAG_ATTRIB_COL];
GLuint i;
for (i = 0; i < n; i++) {
src[i][RCOMP] = (src[i][RCOMP] & rMask) | (dst[i][RCOMP] & ~rMask);
}
-/**
- * Add specular color to primary color, draw point, restore original
- * primary color.
- */
-void
-_swrast_add_spec_terms_point(struct gl_context *ctx, const SWvertex *v0)
-{
- SWvertex *ncv0 = (SWvertex *) v0; /* cast away const */
- GLfloat rSum, gSum, bSum;
- GLchan cSave[4];
-
- /* save */
- COPY_CHAN4(cSave, ncv0->color);
- /* sum */
- rSum = CHAN_TO_FLOAT(ncv0->color[0]) + ncv0->attrib[FRAG_ATTRIB_COL1][0];
- gSum = CHAN_TO_FLOAT(ncv0->color[1]) + ncv0->attrib[FRAG_ATTRIB_COL1][1];
- bSum = CHAN_TO_FLOAT(ncv0->color[2]) + ncv0->attrib[FRAG_ATTRIB_COL1][2];
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[0], rSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[1], gSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[2], bSum);
- /* draw */
- SWRAST_CONTEXT(ctx)->SpecPoint(ctx, ncv0);
- /* restore */
- COPY_CHAN4(ncv0->color, cSave);
-}
-
-
/**
* Examine current state to determine which point drawing function to use.
*/
span->alphaStep = 0;
span->interpMask |= SPAN_RGBA;
- COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor);
- ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0);
- ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0);
-
- /* Secondary color */
- if (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled)
- {
- COPY_4V(span->attrStart[FRAG_ATTRIB_COL1], ctx->Current.RasterSecondaryColor);
- ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0);
- ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0);
- }
+ COPY_4V(span->attrStart[FRAG_ATTRIB_COL], ctx->Current.RasterColor);
+ ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL], 0.0, 0.0, 0.0, 0.0);
+ ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL], 0.0, 0.0, 0.0, 0.0);
/* fog */
{
break;
#endif
case GL_FLOAT:
- interpolate_active_attribs(ctx, span, FRAG_BIT_COL0);
+ interpolate_active_attribs(ctx, span, FRAG_BIT_COL);
break;
default:
_mesa_problem(ctx, "bad datatype 0x%x in interpolate_int_colors",
/**
- * Populate the FRAG_ATTRIB_COL0 array.
+ * Populate the FRAG_ATTRIB_COL array.
*/
static inline void
interpolate_float_colors(SWspan *span)
{
- GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL];
const GLuint n = span->end;
GLuint i;
}
}
- span->arrayAttribs |= FRAG_BIT_COL0;
+ span->arrayAttribs |= FRAG_BIT_COL;
span->array->ChanType = GL_FLOAT;
}
}
-/**
- * Add specular colors to primary colors.
- * Only called during fixed-function operation.
- * Result is float color array (FRAG_ATTRIB_COL0).
- */
-static inline void
-add_specular(struct gl_context *ctx, SWspan *span)
-{
- const SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLubyte *mask = span->array->mask;
- GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
- GLfloat (*col1)[4] = span->array->attribs[FRAG_ATTRIB_COL1];
- GLuint i;
-
- ASSERT(!_swrast_use_fragment_program(ctx));
- ASSERT(span->arrayMask & SPAN_RGBA);
- ASSERT(swrast->_ActiveAttribMask & FRAG_BIT_COL1);
- (void) swrast; /* silence warning */
-
- if (span->array->ChanType == GL_FLOAT) {
- if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) {
- interpolate_active_attribs(ctx, span, FRAG_BIT_COL0);
- }
- }
- else {
- /* need float colors */
- if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) {
- interpolate_float_colors(span);
- }
- }
-
- if ((span->arrayAttribs & FRAG_BIT_COL1) == 0) {
- /* XXX could avoid this and interpolate COL1 in the loop below */
- interpolate_active_attribs(ctx, span, FRAG_BIT_COL1);
- }
-
- ASSERT(span->arrayAttribs & FRAG_BIT_COL0);
- ASSERT(span->arrayAttribs & FRAG_BIT_COL1);
-
- for (i = 0; i < span->end; i++) {
- if (mask[i]) {
- col0[i][0] += col1[i][0];
- col0[i][1] += col1[i][1];
- col0[i][2] += col1[i][2];
- }
- }
-
- span->array->ChanType = GL_FLOAT;
-}
-
-
/**
* Apply antialiasing coverage value to alpha values.
*/
}
}
else {
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
for (i = 0; i < span->end; i++) {
rgba[i][ACOMP] = rgba[i][ACOMP] * coverage[i];
/* clamp later */
static inline void
clamp_colors(SWspan *span)
{
- GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0];
+ GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL];
GLuint i;
ASSERT(span->array->ChanType == GL_FLOAT);
for (i = 0; i < span->end; i++) {
GLvoid *src, *dst;
if (output > 0 || span->array->ChanType == GL_FLOAT) {
- src = span->array->attribs[FRAG_ATTRIB_COL0 + output];
+ src = span->array->attribs[FRAG_ATTRIB_COL + output];
span->array->ChanType = GL_FLOAT;
}
else if (span->array->ChanType == GL_UNSIGNED_BYTE) {
dst = span->array->rgba16;
}
else {
- dst = span->array->attribs[FRAG_ATTRIB_COL0];
+ dst = span->array->attribs[FRAG_ATTRIB_COL];
}
_mesa_convert_colors(span->array->ChanType, src,
ASSERT(span->arrayMask & SPAN_RGBA);
- if (span->primitive == GL_BITMAP || !swrast->SpecularVertexAdd) {
- /* Add primary and specular (diffuse + specular) colors */
- if (ctx->Fog.ColorSumEnabled ||
- (ctx->Light.Enabled &&
- ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) {
- add_specular(ctx, span);
- }
- }
-
/* Fog */
if (swrast->_FogEnabled) {
_swrast_fog_rgba_span(ctx, span);
span->array->rgba = span->array->rgba8;
}
else {
- span->array->rgba = (void *)span->array->attribs[FRAG_ATTRIB_COL0];
+ span->array->rgba = (void *)span->array->attribs[FRAG_ATTRIB_COL];
}
}
NULL,
NULL
},
- {
- MESA_FORMAT_RGBA_FLOAT32,
- fetch_texel_1d_f_rgba_f32,
- fetch_texel_2d_f_rgba_f32,
- fetch_texel_3d_f_rgba_f32
- },
- {
- MESA_FORMAT_RGBA_FLOAT16,
- fetch_texel_1d_f_rgba_f16,
- fetch_texel_2d_f_rgba_f16,
- fetch_texel_3d_f_rgba_f16
- },
- {
- MESA_FORMAT_RGB_FLOAT32,
- fetch_texel_1d_f_rgb_f32,
- fetch_texel_2d_f_rgb_f32,
- fetch_texel_3d_f_rgb_f32
- },
- {
- MESA_FORMAT_RGB_FLOAT16,
- fetch_texel_1d_f_rgb_f16,
- fetch_texel_2d_f_rgb_f16,
- fetch_texel_3d_f_rgb_f16
- },
- {
- MESA_FORMAT_ALPHA_FLOAT32,
- fetch_texel_1d_f_alpha_f32,
- fetch_texel_2d_f_alpha_f32,
- fetch_texel_3d_f_alpha_f32
- },
- {
- MESA_FORMAT_ALPHA_FLOAT16,
- fetch_texel_1d_f_alpha_f16,
- fetch_texel_2d_f_alpha_f16,
- fetch_texel_3d_f_alpha_f16
- },
- {
- MESA_FORMAT_LUMINANCE_FLOAT32,
- fetch_texel_1d_f_luminance_f32,
- fetch_texel_2d_f_luminance_f32,
- fetch_texel_3d_f_luminance_f32
- },
- {
- MESA_FORMAT_LUMINANCE_FLOAT16,
- fetch_texel_1d_f_luminance_f16,
- fetch_texel_2d_f_luminance_f16,
- fetch_texel_3d_f_luminance_f16
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32,
- fetch_texel_1d_f_luminance_alpha_f32,
- fetch_texel_2d_f_luminance_alpha_f32,
- fetch_texel_3d_f_luminance_alpha_f32
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16,
- fetch_texel_1d_f_luminance_alpha_f16,
- fetch_texel_2d_f_luminance_alpha_f16,
- fetch_texel_3d_f_luminance_alpha_f16
- },
- {
- MESA_FORMAT_INTENSITY_FLOAT32,
- fetch_texel_1d_f_intensity_f32,
- fetch_texel_2d_f_intensity_f32,
- fetch_texel_3d_f_intensity_f32
- },
- {
- MESA_FORMAT_INTENSITY_FLOAT16,
- fetch_texel_1d_f_intensity_f16,
- fetch_texel_2d_f_intensity_f16,
- fetch_texel_3d_f_intensity_f16
- },
-
{
MESA_FORMAT_ALPHA_UINT8,
NULL,
-/* MESA_FORMAT_RGBA_F32 ******************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT32 texture, returning 4 GLfloats.
- */
-static void FETCH(f_rgba_f32)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 4);
- texel[RCOMP] = src[0];
- texel[GCOMP] = src[1];
- texel[BCOMP] = src[2];
- texel[ACOMP] = src[3];
-}
-
-
-
-
-/* MESA_FORMAT_RGBA_F16 ******************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT16 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_rgba_f16)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 4);
- texel[RCOMP] = _mesa_half_to_float(src[0]);
- texel[GCOMP] = _mesa_half_to_float(src[1]);
- texel[BCOMP] = _mesa_half_to_float(src[2]);
- texel[ACOMP] = _mesa_half_to_float(src[3]);
-}
-
-
-
-/* MESA_FORMAT_RGB_F32 *******************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGB_FLOAT32 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_rgb_f32)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 3);
- texel[RCOMP] = src[0];
- texel[GCOMP] = src[1];
- texel[BCOMP] = src[2];
- texel[ACOMP] = 1.0F;
-}
-
-
-
-
-/* MESA_FORMAT_RGB_F16 *******************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGB_FLOAT16 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_rgb_f16)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 3);
- texel[RCOMP] = _mesa_half_to_float(src[0]);
- texel[GCOMP] = _mesa_half_to_float(src[1]);
- texel[BCOMP] = _mesa_half_to_float(src[2]);
- texel[ACOMP] = 1.0F;
-}
-
-
-
-
-/* MESA_FORMAT_ALPHA_F32 *****************************************************/
-
-/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT32 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_alpha_f32)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = 0.0F;
- texel[ACOMP] = src[0];
-}
-
-
-
-
-/* MESA_FORMAT_ALPHA_F32 *****************************************************/
-
-/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT16 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_alpha_f16)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = 0.0F;
- texel[ACOMP] = _mesa_half_to_float(src[0]);
-}
-
-
-
-
-/* MESA_FORMAT_LUMINANCE_F32 *************************************************/
-
-/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT32 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_luminance_f32)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = src[0];
- texel[ACOMP] = 1.0F;
-}
-
-
-
-
-/* MESA_FORMAT_LUMINANCE_F16 *************************************************/
-
-/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT16 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_luminance_f16)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = _mesa_half_to_float(src[0]);
- texel[ACOMP] = 1.0F;
-}
-
-
-
-
-/* MESA_FORMAT_LUMINANCE_ALPHA_F32 *******************************************/
-
-/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT32 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_luminance_alpha_f32)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = src[0];
- texel[ACOMP] = src[1];
-}
-
-
-
-
-/* MESA_FORMAT_LUMINANCE_ALPHA_F16 *******************************************/
-
-/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT16 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_luminance_alpha_f16)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 2);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = _mesa_half_to_float(src[0]);
- texel[ACOMP] = _mesa_half_to_float(src[1]);
-}
-
-
-
-
-/* MESA_FORMAT_INTENSITY_F32 *************************************************/
-
-/* Fetch texel from 1D, 2D or 3D INTENSITY_FLOAT32 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_intensity_f32)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] =
- texel[ACOMP] = src[0];
-}
-
-
-
-
-/* MESA_FORMAT_INTENSITY_F16 *************************************************/
-
-/* Fetch texel from 1D, 2D or 3D INTENSITY_FLOAT16 texture,
- * returning 4 GLfloats.
- */
-static void FETCH(f_intensity_f16)( const struct swrast_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] =
- texel[ACOMP] = _mesa_half_to_float(src[0]);
-}
-
-
-
/*
* Begin Hardware formats
*/
}
-
-/**********************************************************************/
-/* 3-D Texture Sampling Functions */
-/**********************************************************************/
-
-/**
- * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter.
- */
-static inline void
-sample_3d_nearest(struct gl_context *ctx,
- const struct gl_texture_object *tObj,
- const struct gl_texture_image *img,
- const GLfloat texcoord[4],
- GLfloat rgba[4])
-{
- const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
- const GLint width = img->Width2; /* without border, power of two */
- const GLint height = img->Height2; /* without border, power of two */
- const GLint depth = img->Depth2; /* without border, power of two */
- GLint i, j, k;
- (void) ctx;
-
- i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]);
- j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]);
- k = nearest_texel_location(tObj->Sampler.WrapR, img, depth, texcoord[2]);
-
- if (i < 0 || i >= (GLint) img->Width ||
- j < 0 || j >= (GLint) img->Height ||
- k < 0 || k >= (GLint) img->Depth) {
- /* Need this test for GL_CLAMP_TO_BORDER mode */
- get_border_color(tObj, img, rgba);
- }
- else {
- swImg->FetchTexel(swImg, i, j, k, rgba);
- }
-}
-
-
-/**
- * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter.
- */
-static void
-sample_3d_linear(struct gl_context *ctx,
- const struct gl_texture_object *tObj,
- const struct gl_texture_image *img,
- const GLfloat texcoord[4],
- GLfloat rgba[4])
-{
- const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
- const GLint width = img->Width2;
- const GLint height = img->Height2;
- const GLint depth = img->Depth2;
- GLint i0, j0, k0, i1, j1, k1;
- GLbitfield useBorderColor = 0x0;
- GLfloat a, b, c;
- GLfloat t000[4], t010[4], t001[4], t011[4];
- GLfloat t100[4], t110[4], t101[4], t111[4];
-
- linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a);
- linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b);
- linear_texel_locations(tObj->Sampler.WrapR, img, depth, texcoord[2], &k0, &k1, &c);
-
- if (img->Border) {
- i0 += img->Border;
- i1 += img->Border;
- j0 += img->Border;
- j1 += img->Border;
- k0 += img->Border;
- k1 += img->Border;
- }
- else {
- /* check if sampling texture border color */
- if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT;
- if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT;
- if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT;
- if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT;
- if (k0 < 0 || k0 >= depth) useBorderColor |= K0BIT;
- if (k1 < 0 || k1 >= depth) useBorderColor |= K1BIT;
- }
-
- /* Fetch texels */
- if (useBorderColor & (I0BIT | J0BIT | K0BIT)) {
- get_border_color(tObj, img, t000);
- }
- else {
- swImg->FetchTexel(swImg, i0, j0, k0, t000);
- }
- if (useBorderColor & (I1BIT | J0BIT | K0BIT)) {
- get_border_color(tObj, img, t100);
- }
- else {
- swImg->FetchTexel(swImg, i1, j0, k0, t100);
- }
- if (useBorderColor & (I0BIT | J1BIT | K0BIT)) {
- get_border_color(tObj, img, t010);
- }
- else {
- swImg->FetchTexel(swImg, i0, j1, k0, t010);
- }
- if (useBorderColor & (I1BIT | J1BIT | K0BIT)) {
- get_border_color(tObj, img, t110);
- }
- else {
- swImg->FetchTexel(swImg, i1, j1, k0, t110);
- }
-
- if (useBorderColor & (I0BIT | J0BIT | K1BIT)) {
- get_border_color(tObj, img, t001);
- }
- else {
- swImg->FetchTexel(swImg, i0, j0, k1, t001);
- }
- if (useBorderColor & (I1BIT | J0BIT | K1BIT)) {
- get_border_color(tObj, img, t101);
- }
- else {
- swImg->FetchTexel(swImg, i1, j0, k1, t101);
- }
- if (useBorderColor & (I0BIT | J1BIT | K1BIT)) {
- get_border_color(tObj, img, t011);
- }
- else {
- swImg->FetchTexel(swImg, i0, j1, k1, t011);
- }
- if (useBorderColor & (I1BIT | J1BIT | K1BIT)) {
- get_border_color(tObj, img, t111);
- }
- else {
- swImg->FetchTexel(swImg, i1, j1, k1, t111);
- }
-
- /* trilinear interpolation of samples */
- lerp_rgba_3d(rgba, a, b, c, t000, t100, t010, t110, t001, t101, t011, t111);
-}
-
-
-static void
-sample_3d_nearest_mipmap_nearest(struct gl_context *ctx,
- const struct gl_texture_object *tObj,
- GLuint n, const GLfloat texcoord[][4],
- const GLfloat lambda[], GLfloat rgba[][4] )
-{
- GLuint i;
- for (i = 0; i < n; i++) {
- GLint level = nearest_mipmap_level(tObj, lambda[i]);
- sample_3d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]);
- }
-}
-
-
-static void
-sample_3d_linear_mipmap_nearest(struct gl_context *ctx,
- const struct gl_texture_object *tObj,
- GLuint n, const GLfloat texcoord[][4],
- const GLfloat lambda[], GLfloat rgba[][4])
-{
- GLuint i;
- ASSERT(lambda != NULL);
- for (i = 0; i < n; i++) {
- GLint level = nearest_mipmap_level(tObj, lambda[i]);
- sample_3d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]);
- }
-}
-
-
-static void
-sample_3d_nearest_mipmap_linear(struct gl_context *ctx,
- const struct gl_texture_object *tObj,
- GLuint n, const GLfloat texcoord[][4],
- const GLfloat lambda[], GLfloat rgba[][4])
-{
- GLuint i;
- ASSERT(lambda != NULL);
- for (i = 0; i < n; i++) {
- GLint level = linear_mipmap_level(tObj, lambda[i]);
- if (level >= tObj->_MaxLevel) {
- sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel],
- texcoord[i], rgba[i]);
- }
- else {
- GLfloat t0[4], t1[4]; /* texels */
- const GLfloat f = FRAC(lambda[i]);
- sample_3d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0);
- sample_3d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1);
- lerp_rgba(rgba[i], f, t0, t1);
- }
- }
-}
-
-
-static void
-sample_3d_linear_mipmap_linear(struct gl_context *ctx,
- const struct gl_texture_object *tObj,
- GLuint n, const GLfloat texcoord[][4],
- const GLfloat lambda[], GLfloat rgba[][4])
-{
- GLuint i;
- ASSERT(lambda != NULL);
- for (i = 0; i < n; i++) {
- GLint level = linear_mipmap_level(tObj, lambda[i]);
- if (level >= tObj->_MaxLevel) {
- sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel],
- texcoord[i], rgba[i]);
- }
- else {
- GLfloat t0[4], t1[4]; /* texels */
- const GLfloat f = FRAC(lambda[i]);
- sample_3d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0);
- sample_3d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1);
- lerp_rgba(rgba[i], f, t0, t1);
- }
- }
-}
-
-
-/** Sample 3D texture, nearest filtering for both min/magnification */
-static void
-sample_nearest_3d(struct gl_context *ctx,
- const struct gl_texture_object *tObj, GLuint n,
- const GLfloat texcoords[][4], const GLfloat lambda[],
- GLfloat rgba[][4])
-{
- GLuint i;
- struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
- (void) lambda;
- for (i = 0; i < n; i++) {
- sample_3d_nearest(ctx, tObj, image, texcoords[i], rgba[i]);
- }
-}
-
-
-/** Sample 3D texture, linear filtering for both min/magnification */
-static void
-sample_linear_3d(struct gl_context *ctx,
- const struct gl_texture_object *tObj, GLuint n,
- const GLfloat texcoords[][4],
- const GLfloat lambda[], GLfloat rgba[][4])
-{
- GLuint i;
- struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel];
- (void) lambda;
- for (i = 0; i < n; i++) {
- sample_3d_linear(ctx, tObj, image, texcoords[i], rgba[i]);
- }
-}
-
-
-/** Sample 3D texture, using lambda to choose between min/magnification */
-static void
-sample_lambda_3d(struct gl_context *ctx,
- const struct gl_texture_object *tObj, GLuint n,
- const GLfloat texcoords[][4], const GLfloat lambda[],
- GLfloat rgba[][4])
-{
- GLuint minStart, minEnd; /* texels with minification */
- GLuint magStart, magEnd; /* texels with magnification */
- GLuint i;
-
- ASSERT(lambda != NULL);
- compute_min_mag_ranges(tObj, n, lambda,
- &minStart, &minEnd, &magStart, &magEnd);
-
- if (minStart < minEnd) {
- /* do the minified texels */
- GLuint m = minEnd - minStart;
- switch (tObj->Sampler.MinFilter) {
- case GL_NEAREST:
- for (i = minStart; i < minEnd; i++)
- sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel],
- texcoords[i], rgba[i]);
- break;
- case GL_LINEAR:
- for (i = minStart; i < minEnd; i++)
- sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel],
- texcoords[i], rgba[i]);
- break;
- case GL_NEAREST_MIPMAP_NEAREST:
- sample_3d_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart,
- lambda + minStart, rgba + minStart);
- break;
- case GL_LINEAR_MIPMAP_NEAREST:
- sample_3d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart,
- lambda + minStart, rgba + minStart);
- break;
- case GL_NEAREST_MIPMAP_LINEAR:
- sample_3d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart,
- lambda + minStart, rgba + minStart);
- break;
- case GL_LINEAR_MIPMAP_LINEAR:
- sample_3d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart,
- lambda + minStart, rgba + minStart);
- break;
- default:
- _mesa_problem(ctx, "Bad min filter in sample_3d_texture");
- return;
- }
- }
-
- if (magStart < magEnd) {
- /* do the magnified texels */
- switch (tObj->Sampler.MagFilter) {
- case GL_NEAREST:
- for (i = magStart; i < magEnd; i++)
- sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel],
- texcoords[i], rgba[i]);
- break;
- case GL_LINEAR:
- for (i = magStart; i < magEnd; i++)
- sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel],
- texcoords[i], rgba[i]);
- break;
- default:
- _mesa_problem(ctx, "Bad mag filter in sample_3d_texture");
- return;
- }
- }
-}
-
-
/**********************************************************************/
/* Texture Cube Map Sampling Functions */
/**********************************************************************/
return func;
}
- case GL_TEXTURE_3D:
- if (needLambda) {
- return &sample_lambda_3d;
- }
- else if (t->Sampler.MinFilter == GL_LINEAR) {
- return &sample_linear_3d;
- }
- else {
- ASSERT(t->Sampler.MinFilter == GL_NEAREST);
- return &sample_nearest_3d;
- }
case GL_TEXTURE_CUBE_MAP:
if (needLambda) {
return &sample_lambda_cube;
map = swImage->Buffer;
- if (texImage->TexObject->Target == GL_TEXTURE_3D) {
- GLuint sliceSize = _mesa_format_image_size(texImage->TexFormat,
- texImage->Width,
- texImage->Height,
- 1);
- assert(slice < texImage->Depth);
- map += slice * sliceSize;
- }
-
/* apply x/y offset to map address */
map += stride * (y / bh) + texelSize * (x / bw);
}
-/*
- * This is used when separate specular color is enabled, but not
- * texturing. We add the specular color to the primary color,
- * draw the triangle, then restore the original primary color.
- * Inefficient, but seldom needed.
- */
-void
-_swrast_add_spec_terms_triangle(struct gl_context *ctx, const SWvertex *v0,
- const SWvertex *v1, const SWvertex *v2)
-{
- SWvertex *ncv0 = (SWvertex *)v0; /* drop const qualifier */
- SWvertex *ncv1 = (SWvertex *)v1;
- SWvertex *ncv2 = (SWvertex *)v2;
- GLfloat rSum, gSum, bSum;
- GLchan cSave[3][4];
-
- /* save original colors */
- COPY_CHAN4( cSave[0], ncv0->color );
- COPY_CHAN4( cSave[1], ncv1->color );
- COPY_CHAN4( cSave[2], ncv2->color );
- /* sum v0 */
- rSum = CHAN_TO_FLOAT(ncv0->color[0]) + ncv0->attrib[FRAG_ATTRIB_COL1][0];
- gSum = CHAN_TO_FLOAT(ncv0->color[1]) + ncv0->attrib[FRAG_ATTRIB_COL1][1];
- bSum = CHAN_TO_FLOAT(ncv0->color[2]) + ncv0->attrib[FRAG_ATTRIB_COL1][2];
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[0], rSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[1], gSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[2], bSum);
- /* sum v1 */
- rSum = CHAN_TO_FLOAT(ncv1->color[0]) + ncv1->attrib[FRAG_ATTRIB_COL1][0];
- gSum = CHAN_TO_FLOAT(ncv1->color[1]) + ncv1->attrib[FRAG_ATTRIB_COL1][1];
- bSum = CHAN_TO_FLOAT(ncv1->color[2]) + ncv1->attrib[FRAG_ATTRIB_COL1][2];
- UNCLAMPED_FLOAT_TO_CHAN(ncv1->color[0], rSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv1->color[1], gSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv1->color[2], bSum);
- /* sum v2 */
- rSum = CHAN_TO_FLOAT(ncv2->color[0]) + ncv2->attrib[FRAG_ATTRIB_COL1][0];
- gSum = CHAN_TO_FLOAT(ncv2->color[1]) + ncv2->attrib[FRAG_ATTRIB_COL1][1];
- bSum = CHAN_TO_FLOAT(ncv2->color[2]) + ncv2->attrib[FRAG_ATTRIB_COL1][2];
- UNCLAMPED_FLOAT_TO_CHAN(ncv2->color[0], rSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv2->color[1], gSum);
- UNCLAMPED_FLOAT_TO_CHAN(ncv2->color[2], bSum);
- /* draw */
- SWRAST_CONTEXT(ctx)->SpecTriangle( ctx, ncv0, ncv1, ncv2 );
- /* restore original colors */
- COPY_CHAN4( ncv0->color, cSave[0] );
- COPY_CHAN4( ncv1->color, cSave[1] );
- COPY_CHAN4( ncv2->color, cSave[2] );
-}
-
-
#ifdef DEBUG
* needs to be interpolated.
*/
if (ctx->Texture._EnabledCoord ||
- _mesa_need_secondary_color(ctx) ||
swrast->_FogEnabled) {
/* Ugh, we do a _lot_ of tests to pick the best textured tri func */
const struct gl_texture_object *texObj2D;
&& texImg->Width == swImg->RowStride
&& (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888)
&& minFilter == magFilter
- && ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
&& !swrast->_FogEnabled
&& ctx->Texture.Unit.EnvMode != GL_COMBINE_EXT
&& ctx->Texture.Unit.EnvMode != GL_COMBINE4_NV) {
GLfloat eMaj_da = (GLfloat) (vMax->color[ACOMP] - vMin->color[ACOMP]);
GLfloat eBot_da = (GLfloat) (vMid->color[ACOMP] - vMin->color[ACOMP]);
# endif
- span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr);
- span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx);
- span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg);
- span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx);
- span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db);
- span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx);
- span.redStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][0]);
- span.greenStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][1]);
- span.blueStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][2]);
+ span.attrStepX[FRAG_ATTRIB_COL][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr);
+ span.attrStepY[FRAG_ATTRIB_COL][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx);
+ span.attrStepX[FRAG_ATTRIB_COL][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg);
+ span.attrStepY[FRAG_ATTRIB_COL][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx);
+ span.attrStepX[FRAG_ATTRIB_COL][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db);
+ span.attrStepY[FRAG_ATTRIB_COL][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx);
+ span.redStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL][0]);
+ span.greenStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL][1]);
+ span.blueStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL][2]);
# ifdef INTERP_ALPHA
- span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da);
- span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx);
- span.alphaStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL0][3]);
+ span.attrStepX[FRAG_ATTRIB_COL][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da);
+ span.attrStepY[FRAG_ATTRIB_COL][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx);
+ span.alphaStep = SignedFloatToFixed(span.attrStepX[FRAG_ATTRIB_COL][3]);
# endif /* INTERP_ALPHA */
}
else {
ASSERT(ctx->Light.ShadeModel == GL_FLAT);
span.interpMask |= SPAN_FLAT;
- span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F;
- span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F;
- span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F;
+ span.attrStepX[FRAG_ATTRIB_COL][0] = span.attrStepY[FRAG_ATTRIB_COL][0] = 0.0F;
+ span.attrStepX[FRAG_ATTRIB_COL][1] = span.attrStepY[FRAG_ATTRIB_COL][1] = 0.0F;
+ span.attrStepX[FRAG_ATTRIB_COL][2] = span.attrStepY[FRAG_ATTRIB_COL][2] = 0.0F;
span.redStep = 0;
span.greenStep = 0;
span.blueStep = 0;
# ifdef INTERP_ALPHA
- span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F;
+ span.attrStepX[FRAG_ATTRIB_COL][3] = span.attrStepY[FRAG_ATTRIB_COL][3] = 0.0F;
span.alphaStep = 0;
# endif
}
#ifdef INTERP_RGB
if (ctx->Light.ShadeModel == GL_SMOOTH) {
rLeft = (GLint)(ChanToFixed(vLower->color[RCOMP])
- + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx
- + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + FIXED_HALF;
+ + span.attrStepX[FRAG_ATTRIB_COL][0] * adjx
+ + span.attrStepY[FRAG_ATTRIB_COL][0] * adjy) + FIXED_HALF;
gLeft = (GLint)(ChanToFixed(vLower->color[GCOMP])
- + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx
- + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + FIXED_HALF;
+ + span.attrStepX[FRAG_ATTRIB_COL][1] * adjx
+ + span.attrStepY[FRAG_ATTRIB_COL][1] * adjy) + FIXED_HALF;
bLeft = (GLint)(ChanToFixed(vLower->color[BCOMP])
- + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx
- + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + FIXED_HALF;
- fdrOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][0]
- + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]);
- fdgOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][1]
- + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]);
- fdbOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][2]
- + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]);
+ + span.attrStepX[FRAG_ATTRIB_COL][2] * adjx
+ + span.attrStepY[FRAG_ATTRIB_COL][2] * adjy) + FIXED_HALF;
+ fdrOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL][0]
+ + dxOuter * span.attrStepX[FRAG_ATTRIB_COL][0]);
+ fdgOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL][1]
+ + dxOuter * span.attrStepX[FRAG_ATTRIB_COL][1]);
+ fdbOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL][2]
+ + dxOuter * span.attrStepX[FRAG_ATTRIB_COL][2]);
# ifdef INTERP_ALPHA
aLeft = (GLint)(ChanToFixed(vLower->color[ACOMP])
- + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx
- + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + FIXED_HALF;
- fdaOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL0][3]
- + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]);
+ + span.attrStepX[FRAG_ATTRIB_COL][3] * adjx
+ + span.attrStepY[FRAG_ATTRIB_COL][3] * adjy) + FIXED_HALF;
+ fdaOuter = SignedFloatToFixed(span.attrStepY[FRAG_ATTRIB_COL][3]
+ + dxOuter * span.attrStepX[FRAG_ATTRIB_COL][3]);
# endif
}
else {
else if (zoomed.array->ChanType == GL_UNSIGNED_SHORT)
zoomed.array->rgba = (GLchan (*)[4]) zoomed.array->rgba16;
else
- zoomed.array->rgba = (GLchan (*)[4]) zoomed.array->attribs[FRAG_ATTRIB_COL0];
+ zoomed.array->rgba = (GLchan (*)[4]) zoomed.array->attribs[FRAG_ATTRIB_COL];
COPY_4V(zoomed.attrStart[FRAG_ATTRIB_WPOS], span->attrStart[FRAG_ATTRIB_WPOS]);
COPY_4V(zoomed.attrStepX[FRAG_ATTRIB_WPOS], span->attrStepX[FRAG_ATTRIB_WPOS]);
/* we'll generate an array of colorss */
zoomed.interpMask = span->interpMask & ~SPAN_RGBA;
zoomed.arrayMask |= SPAN_RGBA;
- zoomed.arrayAttribs |= FRAG_BIT_COL0; /* we'll produce these values */
+ zoomed.arrayAttribs |= FRAG_BIT_COL; /* we'll produce these values */
ASSERT(span->arrayMask & SPAN_RGBA);
}
else if (format == GL_DEPTH_COMPONENT) {
GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x;
ASSERT(j >= 0);
ASSERT(j < span->end);
- COPY_4V(zoomed.array->attribs[FRAG_ATTRIB_COL0][i], rgba[j]);
+ COPY_4V(zoomed.array->attribs[FRAG_ATTRIB_COL][i], rgba[j]);
}
}
}
GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x;
ASSERT(j >= 0);
ASSERT(j < span->end);
- zoomed.array->attribs[FRAG_ATTRIB_COL0][i][0] = rgb[j][0];
- zoomed.array->attribs[FRAG_ATTRIB_COL0][i][1] = rgb[j][1];
- zoomed.array->attribs[FRAG_ATTRIB_COL0][i][2] = rgb[j][2];
- zoomed.array->attribs[FRAG_ATTRIB_COL0][i][3] = 1.0F;
+ zoomed.array->attribs[FRAG_ATTRIB_COL][i][0] = rgb[j][0];
+ zoomed.array->attribs[FRAG_ATTRIB_COL][i][1] = rgb[j][1];
+ zoomed.array->attribs[FRAG_ATTRIB_COL][i][2] = rgb[j][2];
+ zoomed.array->attribs[FRAG_ATTRIB_COL][i][3] = 1.0F;
}
}
}
* primitives unaccelerated), hook in swrast_setup instead.
*/
typedef struct {
- GLfloat attrib[32][4];
+ GLfloat attrib[FRAG_ATTRIB_MAX][4];
GLchan color[4]; /** integer color */
GLfloat pointSize;
} SWvertex;
-#define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0
+#define FRAG_ATTRIB_CI FRAG_ATTRIB_COL
struct swrast_device_driver;
EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, attrib[FRAG_ATTRIB_WPOS] );
- if (index_bitset & BITFIELD64_BIT(_TNL_ATTRIB_COLOR0)) {
+ if (index_bitset & BITFIELD64_BIT(_TNL_ATTRIB_COLOR)) {
if (swsetup->intColors)
- EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4CHAN_4F_RGBA, color );
+ EMIT_ATTR( _TNL_ATTRIB_COLOR, EMIT_4CHAN_4F_RGBA, color );
else
- EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4F, attrib[FRAG_ATTRIB_COL0]);
- }
-
- if (index_bitset & BITFIELD64_BIT(_TNL_ATTRIB_COLOR1)) {
- EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_4F, attrib[FRAG_ATTRIB_COL1]);
+ EMIT_ATTR( _TNL_ATTRIB_COLOR, EMIT_4F, attrib[FRAG_ATTRIB_COL]);
}
if (index_bitset & BITFIELD64_BIT(_TNL_ATTRIB_FOG)) {
if (ctx->Light.ShadeModel == GL_FLAT) {
GLchan c[2][4];
- GLfloat s[2][4];
/* save colors/indexes for v0, v1 vertices */
COPY_CHAN4(c[0], v0->color);
COPY_CHAN4(c[1], v1->color);
- COPY_4V(s[0], v0->attrib[FRAG_ATTRIB_COL1]);
- COPY_4V(s[1], v1->attrib[FRAG_ATTRIB_COL1]);
/* copy v2 color/indexes to v0, v1 indexes */
COPY_CHAN4(v0->color, v2->color);
COPY_CHAN4(v1->color, v2->color);
- COPY_4V(v0->attrib[FRAG_ATTRIB_COL1], v2->attrib[FRAG_ATTRIB_COL1]);
- COPY_4V(v1->attrib[FRAG_ATTRIB_COL1], v2->attrib[FRAG_ATTRIB_COL1]);
-
render(ctx, ef, e0, e1, e2, v0, v1, v2);
COPY_CHAN4(v0->color, c[0]);
COPY_CHAN4(v1->color, c[1]);
- COPY_4V(v0->attrib[FRAG_ATTRIB_COL1], s[0]);
- COPY_4V(v1->attrib[FRAG_ATTRIB_COL1], s[1]);
}
else {
render(ctx, ef, e0, e1, e2, v0, v1, v2);
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
GLchan saved_color[3][4] = { { 0 } };
GLfloat saved_col0[3][4] = { { 0 } };
- GLfloat saved_spec[3][4] = { { 0 } };
#endif
SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
SWvertex *v[3];
COPY_CHAN4(saved_color[2], v[2]->color);
}
else {
- COPY_4V(saved_col0[0], v[0]->attrib[FRAG_ATTRIB_COL0]);
- COPY_4V(saved_col0[1], v[1]->attrib[FRAG_ATTRIB_COL0]);
- COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL0]);
+ COPY_4V(saved_col0[0], v[0]->attrib[FRAG_ATTRIB_COL]);
+ COPY_4V(saved_col0[1], v[1]->attrib[FRAG_ATTRIB_COL]);
+ COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL]);
}
if (VB->BackfaceColorPtr->stride) {
SS_COLOR(v[2]->color, vbcolor[e2]);
}
else {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[e0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[e1]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[e2]);
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL], vbcolor[e0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL], vbcolor[e1]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL], vbcolor[e2]);
}
}
else {
SS_COLOR(v[2]->color, vbcolor[0]);
}
else {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]);
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL], vbcolor[0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL], vbcolor[0]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL], vbcolor[0]);
}
}
}
-
- if (VB->BackfaceSecondaryColorPtr) {
- GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
-
- COPY_4V(saved_spec[0], v[0]->attrib[FRAG_ATTRIB_COL1]);
- COPY_4V(saved_spec[1], v[1]->attrib[FRAG_ATTRIB_COL1]);
- COPY_4V(saved_spec[2], v[2]->attrib[FRAG_ATTRIB_COL1]);
-
- if (VB->BackfaceSecondaryColorPtr->stride) {
- SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[e0]);
- SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[e1]);
- SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[e2]);
- }
- else {
- SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
- SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
- SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[0]);
- }
- }
}
#endif
}
COPY_CHAN4(v[2]->color, saved_color[2]);
}
else {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], saved_col0[0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], saved_col0[1]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], saved_col0[2]);
+ COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL], saved_col0[0]);
+ COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL], saved_col0[1]);
+ COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL], saved_col0[2]);
}
}
-
- if (VB->BackfaceSecondaryColorPtr) {
- COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL1], saved_spec[0]);
- COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL1], saved_spec[1]);
- COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL1], saved_spec[2]);
- }
}
}
#endif
*/
tnl->render_inputs_bitset = BITFIELD64_BIT(_TNL_ATTRIB_POS);
- tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR0);
-
- if (_mesa_need_secondary_color(ctx))
- tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR1);
+ tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_COLOR);
if (ctx->Texture._EnabledCoord) {
tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_TEX);
_TNL_ATTRIB_POS = 0,
_TNL_ATTRIB_WEIGHT = 1,
_TNL_ATTRIB_NORMAL = 2,
- _TNL_ATTRIB_COLOR0 = 3,
- _TNL_ATTRIB_COLOR1 = 4,
- _TNL_ATTRIB_FOG = 5,
- _TNL_ATTRIB_COLOR_INDEX = 6,
- _TNL_ATTRIB_EDGEFLAG = 7,
- _TNL_ATTRIB_TEX = 8,
+ _TNL_ATTRIB_COLOR = 3,
+ _TNL_ATTRIB_FOG = 4,
+ _TNL_ATTRIB_COLOR_INDEX = 5,
+ _TNL_ATTRIB_EDGEFLAG = 6,
+ _TNL_ATTRIB_TEX = 7,
+ /* This is really a VERT_RESULT, not an attrib. Need to fix
+ * tnl to understand the difference.
+ */
+ _TNL_ATTRIB_POINTSIZE = 8,
/* These alias with the generics, but they are not active
* concurrently, so it's not a problem. The TNL module
* generic attribute in order to pick up per-vertex material
* data.
*/
- _TNL_ATTRIB_MAT_FRONT_AMBIENT = 10,
- _TNL_ATTRIB_MAT_BACK_AMBIENT = 11,
- _TNL_ATTRIB_MAT_FRONT_DIFFUSE = 12,
- _TNL_ATTRIB_MAT_BACK_DIFFUSE = 13,
- _TNL_ATTRIB_MAT_FRONT_SPECULAR = 14,
- _TNL_ATTRIB_MAT_BACK_SPECULAR = 15,
- _TNL_ATTRIB_MAT_FRONT_EMISSION = 16,
- _TNL_ATTRIB_MAT_BACK_EMISSION = 17,
- _TNL_ATTRIB_MAT_FRONT_SHININESS = 18,
- _TNL_ATTRIB_MAT_BACK_SHININESS = 19,
- _TNL_ATTRIB_MAT_FRONT_INDEXES = 20,
- _TNL_ATTRIB_MAT_BACK_INDEXES = 21,
-
- /* This is really a VERT_RESULT, not an attrib. Need to fix
- * tnl to understand the difference.
- */
- _TNL_ATTRIB_POINTSIZE = 9,
-
- _TNL_ATTRIB_MAX = 22
+ _TNL_ATTRIB_MAT_FRONT_AMBIENT = 9,
+ _TNL_ATTRIB_MAT_BACK_AMBIENT = 10,
+ _TNL_ATTRIB_MAT_FRONT_DIFFUSE = 11,
+ _TNL_ATTRIB_MAT_BACK_DIFFUSE = 12,
+ _TNL_ATTRIB_MAT_FRONT_SPECULAR = 13,
+ _TNL_ATTRIB_MAT_BACK_SPECULAR = 14,
+ _TNL_ATTRIB_MAT_FRONT_EMISSION = 15,
+ _TNL_ATTRIB_MAT_BACK_EMISSION = 16,
+ _TNL_ATTRIB_MAT_FRONT_SHININESS = 17,
+ _TNL_ATTRIB_MAT_BACK_SHININESS = 18,
+ _TNL_ATTRIB_MAT_FRONT_INDEXES = 29,
+ _TNL_ATTRIB_MAT_BACK_INDEXES = 20,
+
+ _TNL_ATTRIB_MAX = 21
} ;
-#define _TNL_ATTRIB_GENERIC(n) (_TNL_ATTRIB_GENERIC0 + (n))
-
-/* special index used for handing invalid glVertexAttribute() indices */
-#define _TNL_ATTRIB_ERROR (_TNL_ATTRIB_GENERIC15 + 1)
-
/**
* Handy attribute ranges:
*/
-#define _TNL_FIRST_PROG _TNL_ATTRIB_WEIGHT
-#define _TNL_LAST_PROG _TNL_ATTRIB_TEX
#define _TNL_FIRST_MAT _TNL_ATTRIB_MAT_FRONT_AMBIENT
#define _TNL_LAST_MAT _TNL_ATTRIB_MAT_BACK_INDEXES
-/* Number of available texture attributes */
-#define _TNL_NUM_TEX 8
-
-/* Number of available generic attributes */
-#define _TNL_NUM_GENERIC 16
-
-/* Number of attributes used for evaluators */
-#define _TNL_NUM_EVAL 16
-
#define PRIM_BEGIN 0x10
#define PRIM_END 0x20
GLboolean *EdgeFlag; /* _TNL_BIT_EDGEFLAG */
GLvector4f *BackfaceIndexPtr;
GLvector4f *BackfaceColorPtr;
- GLvector4f *BackfaceSecondaryColorPtr;
const struct _mesa_prim *Primitive;
GLuint PrimitiveCount;
} \
} while (0)
-
-static void
-convert_half_to_float(const struct gl_client_array *input,
- const GLubyte *ptr, GLfloat *fptr,
- GLuint count, GLuint sz)
-{
- GLuint i, j;
-
- for (i = 0; i < count; i++) {
- GLhalfARB *in = (GLhalfARB *)ptr;
-
- for (j = 0; j < sz; j++) {
- *fptr++ = _mesa_half_to_float(in[j]);
- }
- ptr += input->StrideB;
- }
-}
-
/**
* \brief Convert fixed-point to floating-point.
*
case GL_DOUBLE:
CONVERT(GLdouble, (GLfloat));
break;
- case GL_HALF_FLOAT:
- convert_half_to_float(input, ptr, fptr, count, sz);
- break;
case GL_FIXED:
convert_fixed_to_float(input, ptr, fptr, count);
break;
/* These should perhaps be part of _TNL_ATTRIB_* */
VB->BackfaceColorPtr = NULL;
VB->BackfaceIndexPtr = NULL;
- VB->BackfaceSecondaryColorPtr = NULL;
/* Clipping and drawing code still requires this to be a packed
* array of ubytes which can be written into. TODO: Fix and
shade_rastpos(struct gl_context *ctx,
const GLfloat vertex[4],
const GLfloat normal[3],
- GLfloat Rcolor[4],
- GLfloat Rspec[4])
+ GLfloat Rcolor[4])
{
/*const*/ GLfloat (*base)[3] = ctx->Light._BaseColor;
const struct gl_light *light;
GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec_coef );
if (spec_coef > 1.0e-10) {
- if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) {
- ACC_SCALE_SCALAR_3V( specularContrib, spec_coef,
+ ACC_SCALE_SCALAR_3V( diffuseContrib, spec_coef,
light->_MatSpecular[0]);
- }
- else {
- ACC_SCALE_SCALAR_3V( diffuseContrib, spec_coef,
- light->_MatSpecular[0]);
- }
}
}
}
Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F);
Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F);
Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F);
- Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F);
- Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F);
- Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F);
- Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F);
}
if (ctx->Light.Enabled) {
/* lighting */
shade_rastpos( ctx, vObj, norm,
- ctx->Current.RasterColor,
- ctx->Current.RasterSecondaryColor );
+ ctx->Current.RasterColor );
}
else {
/* use current color */
COPY_4FV(ctx->Current.RasterColor,
- ctx->Current.Attrib[VERT_ATTRIB_COLOR0]);
- COPY_4FV(ctx->Current.RasterSecondaryColor,
- ctx->Current.Attrib[VERT_ATTRIB_COLOR1]);
+ ctx->Current.Attrib[VERT_ATTRIB_COLOR]);
}
/* texture coords */
struct light_stage_data {
GLvector4f Input;
GLvector4f LitColor[2];
- GLvector4f LitSecondary[2];
light_func *light_func_tab;
struct material_cursor mat[MAT_ATTRIB_MAX];
const GLuint bitmask = ctx->Light.ColorMaterialBitmask;
for (i = 0 ; i < MAT_ATTRIB_MAX ; i++)
if (bitmask & (1<<i))
- VB->AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
+ VB->AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->AttribPtr[_TNL_ATTRIB_COLOR];
}
/* Now, for each material attribute that's tracking vertex color, save
return;
if (ctx->Light._NeedVertices) {
- if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
- tab = _tnl_light_spec_tab;
- else
tab = _tnl_light_tab;
}
else {
_mesa_vector4f_alloc( &store->Input, 0, size, 32 );
_mesa_vector4f_alloc( &store->LitColor[0], 0, size, 32 );
_mesa_vector4f_alloc( &store->LitColor[1], 0, size, 32 );
- _mesa_vector4f_alloc( &store->LitSecondary[0], 0, size, 32 );
- _mesa_vector4f_alloc( &store->LitSecondary[1], 0, size, 32 );
store->LitColor[0].size = 4;
store->LitColor[1].size = 4;
- store->LitSecondary[0].size = 3;
- store->LitSecondary[1].size = 3;
return GL_TRUE;
}
_mesa_vector4f_free( &store->Input );
_mesa_vector4f_free( &store->LitColor[0] );
_mesa_vector4f_free( &store->LitColor[1] );
- _mesa_vector4f_free( &store->LitSecondary[0] );
- _mesa_vector4f_free( &store->LitSecondary[1] );
FREE( store );
stage->privatePtr = NULL;
}
*/
-#if IDX & LIGHT_TWOSIDE
-# define NR_SIDES 2
-#else
-# define NR_SIDES 1
-#endif
-
-
/* define TRACE to trace lighting code */
/* #define TRACE 1 */
const GLfloat *normal = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data;
GLfloat (*Fcolor)[4] = (GLfloat (*)[4]) store->LitColor[0].data;
- GLfloat (*Fspec)[4] = (GLfloat (*)[4]) store->LitSecondary[0].data;
#if IDX & LIGHT_TWOSIDE
GLfloat (*Bcolor)[4] = (GLfloat (*)[4]) store->LitColor[1].data;
- GLfloat (*Bspec)[4] = (GLfloat (*)[4]) store->LitSecondary[1].data;
#endif
const GLuint nr = VB->Count;
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
- VB->AttribPtr[_TNL_ATTRIB_COLOR1] = &store->LitSecondary[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR] = &store->LitColor[0];
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
VB->BackfaceColorPtr = &store->LitColor[1];
- VB->BackfaceSecondaryColorPtr = &store->LitSecondary[1];
sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
#endif
} /*loop over lights*/
COPY_3V( Fcolor[j], sum[0] );
- COPY_3V( Fspec[j], spec[0] );
Fcolor[j][3] = sumA[0];
#if IDX & LIGHT_TWOSIDE
COPY_3V( Bcolor[j], sum[1] );
- COPY_3V( Bspec[j], spec[1] );
Bcolor[j][3] = sumA[1];
#endif
}
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR] = &store->LitColor[0];
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
(void) input; /* doesn't refer to Eye or Obj */
- VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR] = &store->LitColor[0];
#if IDX & LIGHT_TWOSIDE
VB->BackfaceColorPtr = &store->LitColor[1];
#endif
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
- VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR] = &store->LitColor[0];
#if IDX & LIGHT_TWOSIDE
VB->BackfaceColorPtr = &store->LitColor[1];
#endif
#undef TAG
#undef IDX
-#undef NR_SIDES
GLuint j;
for (j = 0; j < attr_count; j++) {
- if (a[j].attrib == VERT_ATTRIB_COLOR0 ||
- a[j].attrib == VERT_ATTRIB_COLOR1) {
+ if (a[j].attrib == VERT_ATTRIB_COLOR) {
memcpy( vdst + a[j].vertoffset,
vsrc + a[j].vertoffset,
VB->BackfaceColorPtr->data[out],
VB->BackfaceColorPtr->data[in] );
}
-
- if (VB->BackfaceSecondaryColorPtr) {
- assert(VB->BackfaceSecondaryColorPtr->stride == 4 * sizeof(GLfloat));
-
- INTERP_3F( t,
- VB->BackfaceSecondaryColorPtr->data[dst],
- VB->BackfaceSecondaryColorPtr->data[out],
- VB->BackfaceSecondaryColorPtr->data[in] );
- }
if (VB->BackfaceIndexPtr) {
VB->BackfaceIndexPtr->data[dst][0] = LINTERP( t,
VB->BackfaceColorPtr->data[src] );
}
- if (VB->BackfaceSecondaryColorPtr) {
- COPY_4FV( VB->BackfaceSecondaryColorPtr->data[dst],
- VB->BackfaceSecondaryColorPtr->data[src] );
- }
-
if (VB->BackfaceIndexPtr) {
VB->BackfaceIndexPtr->data[dst][0] = VB->BackfaceIndexPtr->data[src][0];
}
VBO_ATTRIB_POS = 0,
VBO_ATTRIB_WEIGHT = 1,
VBO_ATTRIB_NORMAL = 2,
- VBO_ATTRIB_COLOR0 = 3,
- VBO_ATTRIB_COLOR1 = 4,
- VBO_ATTRIB_FOG = 5,
- VBO_ATTRIB_INDEX = 6,
- VBO_ATTRIB_EDGEFLAG = 7,
- VBO_ATTRIB_TEX = 8,
- VBO_ATTRIB_POINT_SIZE = 9,
+ VBO_ATTRIB_COLOR = 3,
+ VBO_ATTRIB_FOG = 4,
+ VBO_ATTRIB_INDEX = 5,
+ VBO_ATTRIB_EDGEFLAG = 6,
+ VBO_ATTRIB_TEX = 7,
+ VBO_ATTRIB_POINT_SIZE = 8,
- VBO_ATTRIB_MAT_FRONT_AMBIENT = 10,
- VBO_ATTRIB_MAT_BACK_AMBIENT = 11,
- VBO_ATTRIB_MAT_FRONT_DIFFUSE = 12,
- VBO_ATTRIB_MAT_BACK_DIFFUSE = 13,
- VBO_ATTRIB_MAT_FRONT_SPECULAR = 14,
- VBO_ATTRIB_MAT_BACK_SPECULAR = 15,
- VBO_ATTRIB_MAT_FRONT_EMISSION = 16,
- VBO_ATTRIB_MAT_BACK_EMISSION = 17,
- VBO_ATTRIB_MAT_FRONT_SHININESS = 18,
- VBO_ATTRIB_MAT_BACK_SHININESS = 19,
- VBO_ATTRIB_MAT_FRONT_INDEXES = 20,
- VBO_ATTRIB_MAT_BACK_INDEXES = 21,
+ VBO_ATTRIB_MAT_FRONT_AMBIENT = 9,
+ VBO_ATTRIB_MAT_BACK_AMBIENT = 10,
+ VBO_ATTRIB_MAT_FRONT_DIFFUSE = 11,
+ VBO_ATTRIB_MAT_BACK_DIFFUSE = 12,
+ VBO_ATTRIB_MAT_FRONT_SPECULAR = 13,
+ VBO_ATTRIB_MAT_BACK_SPECULAR = 14,
+ VBO_ATTRIB_MAT_FRONT_EMISSION = 15,
+ VBO_ATTRIB_MAT_BACK_EMISSION = 16,
+ VBO_ATTRIB_MAT_FRONT_SHININESS = 17,
+ VBO_ATTRIB_MAT_BACK_SHININESS = 18,
+ VBO_ATTRIB_MAT_FRONT_INDEXES = 19,
+ VBO_ATTRIB_MAT_BACK_INDEXES = 20,
- VBO_ATTRIB_MAX = 22
+ VBO_ATTRIB_MAX = 21
};
#define VBO_ATTRIB_FIRST_MATERIAL VBO_ATTRIB_MAT_FRONT_AMBIENT
TAG(Color3f)(GLfloat x, GLfloat y, GLfloat z)
{
GET_CURRENT_CONTEXT(ctx);
- ATTR3F(VBO_ATTRIB_COLOR0, x, y, z);
+ ATTR3F(VBO_ATTRIB_COLOR, x, y, z);
}
static void GLAPIENTRY
TAG(Color3fv)(const GLfloat * v)
{
GET_CURRENT_CONTEXT(ctx);
- ATTR3FV(VBO_ATTRIB_COLOR0, v);
+ ATTR3FV(VBO_ATTRIB_COLOR, v);
}
static void GLAPIENTRY
TAG(Color4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GET_CURRENT_CONTEXT(ctx);
- ATTR4F(VBO_ATTRIB_COLOR0, x, y, z, w);
+ ATTR4F(VBO_ATTRIB_COLOR, x, y, z, w);
}
static void GLAPIENTRY
TAG(Color4fv)(const GLfloat * v)
{
GET_CURRENT_CONTEXT(ctx);
- ATTR4FV(VBO_ATTRIB_COLOR0, v);
-}
-
-
-
-static void GLAPIENTRY
-TAG(SecondaryColor3fEXT)(GLfloat x, GLfloat y, GLfloat z)
-{
- GET_CURRENT_CONTEXT(ctx);
- ATTR3F(VBO_ATTRIB_COLOR1, x, y, z);
-}
-
-static void GLAPIENTRY
-TAG(SecondaryColor3fvEXT)(const GLfloat * v)
-{
- GET_CURRENT_CONTEXT(ctx);
- ATTR3FV(VBO_ATTRIB_COLOR1, v);
+ ATTR4FV(VBO_ATTRIB_COLOR, v);
}
/* Colormaterial -- this kindof sucks.
*/
if (ctx->Light.ColorMaterialEnabled &&
- exec->vtx.attrsz[VBO_ATTRIB_COLOR0]) {
+ exec->vtx.attrsz[VBO_ATTRIB_COLOR]) {
_mesa_update_color_material(ctx,
- ctx->Current.Attrib[VBO_ATTRIB_COLOR0]);
+ ctx->Current.Attrib[VBO_ATTRIB_COLOR]);
}
}
vfmt->FogCoordfvEXT = vbo_FogCoordfvEXT;
vfmt->Normal3f = vbo_Normal3f;
vfmt->Normal3fv = vbo_Normal3fv;
- vfmt->SecondaryColor3fEXT = vbo_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = vbo_SecondaryColor3fvEXT;
vfmt->TexCoord1f = vbo_TexCoord1f;
vfmt->TexCoord1fv = vbo_TexCoord1fv;
vfmt->TexCoord2f = vbo_TexCoord2f;
(void) vbo_MultiTexCoord4fv;
(void) vbo_Normal3f;
(void) vbo_Normal3fv;
- (void) vbo_SecondaryColor3fEXT;
- (void) vbo_SecondaryColor3fvEXT;
(void) vbo_TexCoord1f;
(void) vbo_TexCoord1fv;
(void) vbo_TexCoord2f;
}
exec->vtx.vertex_size = 0;
-}
\ No newline at end of file
+}
}
-/**
- * Check that element 'j' of the array has reasonable data.
- * Map VBO if needed.
- * For debugging purposes; not normally used.
- */
-static void
-check_array_data(struct gl_context *ctx, struct gl_client_array *array,
- GLuint attrib, GLuint j)
-{
- if (array->Enabled) {
- const void *data = array->Ptr;
- if (_mesa_is_bufferobj(array->BufferObj)) {
- if (!array->BufferObj->Pointer) {
- /* need to map now */
- array->BufferObj->Pointer =
- ctx->Driver.MapBufferRange(ctx, 0, array->BufferObj->Size,
- GL_MAP_READ_BIT, array->BufferObj);
- }
- data = ADD_POINTERS(data, array->BufferObj->Pointer);
- }
- switch (array->Type) {
- case GL_FLOAT:
- {
- GLfloat *f = (GLfloat *) ((GLubyte *) data + array->StrideB * j);
- GLint k;
- for (k = 0; k < array->Size; k++) {
- if (IS_INF_OR_NAN(f[k]) ||
- f[k] >= 1.0e20 || f[k] <= -1.0e10) {
- printf("Bad array data:\n");
- printf(" Element[%u].%u = %f\n", j, k, f[k]);
- printf(" Array %u at %p\n", attrib, (void* ) array);
- printf(" Type 0x%x, Size %d, Stride %d\n",
- array->Type, array->Size, array->Stride);
- printf(" Address/offset %p in Buffer Object %u\n",
- array->Ptr, array->BufferObj->Name);
- f[k] = 1.0; /* XXX replace the bad value! */
- }
- /*assert(!IS_INF_OR_NAN(f[k]));*/
- }
- }
- break;
- default:
- ;
- }
- }
-}
-
-
-/**
- * Unmap the buffer object referenced by given array, if mapped.
- */
-static void
-unmap_array_buffer(struct gl_context *ctx, struct gl_client_array *array)
-{
- if (array->Enabled &&
- _mesa_is_bufferobj(array->BufferObj) &&
- _mesa_bufferobj_mapped(array->BufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, array->BufferObj);
- }
-}
-
-
-/**
- * Examine the array's data for NaNs, etc.
- * For debug purposes; not normally used.
- */
-static void
-check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType,
- const void *elements, GLint basevertex)
-{
- struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
- const void *elemMap;
- GLint i, k;
-
- if (_mesa_is_bufferobj(ctx->Array.ArrayObj->ElementArrayBufferObj)) {
- elemMap = ctx->Driver.MapBufferRange(ctx, 0,
- ctx->Array.ArrayObj->ElementArrayBufferObj->Size,
- GL_MAP_READ_BIT,
- ctx->Array.ArrayObj->ElementArrayBufferObj);
- elements = ADD_POINTERS(elements, elemMap);
- }
-
- for (i = 0; i < count; i++) {
- GLuint j;
-
- /* j = element[i] */
- switch (elemType) {
- case GL_UNSIGNED_BYTE:
- j = ((const GLubyte *) elements)[i];
- break;
- case GL_UNSIGNED_SHORT:
- j = ((const GLushort *) elements)[i];
- break;
- case GL_UNSIGNED_INT:
- j = ((const GLuint *) elements)[i];
- break;
- default:
- assert(0);
- }
-
- /* check element j of each enabled array */
- for (k = 0; k < Elements(arrayObj->VertexAttrib); k++) {
- check_array_data(ctx, &arrayObj->VertexAttrib[k], k, j);
- }
- }
-
- if (_mesa_is_bufferobj(arrayObj->ElementArrayBufferObj)) {
- ctx->Driver.UnmapBuffer(ctx, ctx->Array.ArrayObj->ElementArrayBufferObj);
- }
-
- for (k = 0; k < Elements(arrayObj->VertexAttrib); k++) {
- unmap_array_buffer(ctx, &arrayObj->VertexAttrib[k]);
- }
-}
-
-
/**
* Check array data, looking for NaNs, etc.
*/
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
- struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
int i;
printf("vbo_exec_DrawArrays(mode 0x%x, start %d, count %d):\n",
exec->array.inputs[i]->Size,
stride,
/*exec->array.inputs[i]->Enabled,*/
- arrayObj->VertexAttrib[VERT_ATTRIB(i)].Enabled,
+ ctx->Array.VertexAttrib[VERT_ATTRIB(i)].Enabled,
exec->array.inputs[i]->Ptr,
bufName);
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
- struct gl_client_array *vertexAttrib = ctx->Array.ArrayObj->VertexAttrib;
+ struct gl_client_array *vertexAttrib = ctx->Array.VertexAttrib;
const struct gl_client_array **inputs = &exec->array.inputs[0];
GLbitfield64 const_inputs = 0x0;
GLuint i;
ib.count = count;
ib.type = type;
- ib.obj = ctx->Array.ArrayObj->ElementArrayBufferObj;
+ ib.obj = ctx->Array.ElementArrayBufferObj;
ib.ptr = indices;
prim[0].begin = 1;
index_bounds_valid, start, end );
}
-/**
- * Called by glDrawRangeElements() in immediate mode.
- */
-static void GLAPIENTRY
-vbo_exec_DrawRangeElements(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid *indices)
-{
- static GLuint warnCount = 0;
- GLboolean index_bounds_valid = GL_TRUE;
- GET_CURRENT_CONTEXT(ctx);
-
- if (MESA_VERBOSE & VERBOSE_DRAW)
- _mesa_debug(ctx,
- "glDrawRangeElements(%s, %u, %u, %d, %s, %p)\n",
- _mesa_lookup_enum_by_nr(mode), start, end, count,
- _mesa_lookup_enum_by_nr(type), indices);
-
- if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
- type, indices ))
- return;
-
- if (end < start ||
- end >= ctx->Array.ArrayObj->_MaxElement) {
- /* The application requested we draw using a range of indices that's
- * outside the bounds of the current VBO. This is invalid and appears
- * to give undefined results. The safest thing to do is to simply
- * ignore the range, in case the application botched their range tracking
- * but did provide valid indices. Also issue a warning indicating that
- * the application is broken.
- */
- if (warnCount++ < 10) {
- _mesa_warning(ctx, "glDrawRangeElements(start %u, end %u, "
- "count %d, type 0x%x, indices=%p):\n"
- "\trange is outside VBO bounds (max=%u); ignoring.\n"
- "\tThis should be fixed in the application.",
- start, end, count, type, indices,
- ctx->Array.ArrayObj->_MaxElement - 1);
- }
- index_bounds_valid = GL_FALSE;
- }
-
- /* NOTE: It's important that 'end' is a reasonable value.
- * in _tnl_draw_prims(), we use end to determine how many vertices
- * to transform. If it's too large, we can unnecessarily split prims
- * or we can read/write out of memory in several different places!
- */
-
- /* Catch/fix some potential user errors */
- if (type == GL_UNSIGNED_BYTE) {
- start = MIN2(start, 0xff);
- end = MIN2(end, 0xff);
- }
- else if (type == GL_UNSIGNED_SHORT) {
- start = MIN2(start, 0xffff);
- end = MIN2(end, 0xffff);
- }
-
- if (0) {
- printf("glDraw[Range]Elements"
- "(start %u, end %u, type 0x%x, count %d) ElemBuf %u\n",
- start, end, type, count,
- ctx->Array.ArrayObj->ElementArrayBufferObj->Name);
- }
-
-#if 0
- check_draw_elements_data(ctx, count, type, indices);
-#else
- (void) check_draw_elements_data;
-#endif
-
- vbo_validated_drawrangeelements(ctx, mode, index_bounds_valid, start, end,
- count, type, indices, 1);
-}
-
/**
* Called by glDrawElements() in immediate mode.
{
exec->vtxfmt.DrawArrays = vbo_exec_DrawArrays;
exec->vtxfmt.DrawElements = vbo_exec_DrawElements;
- exec->vtxfmt.DrawRangeElements = vbo_exec_DrawRangeElements;
}
vbo_exec_DrawElements(mode, count, type, indices);
}
-
-void GLAPIENTRY
-_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count,
- GLenum type, const GLvoid *indices)
-{
- vbo_exec_DrawRangeElements(mode, start, end, count, type, indices);
-}
-
}
if (ctx->Eval.Map1Color4)
- set_active_eval1( exec, VBO_ATTRIB_COLOR0, 4, &ctx->EvalMap.Map1Color4 );
+ set_active_eval1( exec, VBO_ATTRIB_COLOR, 4, &ctx->EvalMap.Map1Color4 );
if (ctx->Eval.Map2Color4)
- set_active_eval2( exec, VBO_ATTRIB_COLOR0, 4, &ctx->EvalMap.Map2Color4 );
+ set_active_eval2( exec, VBO_ATTRIB_COLOR, 4, &ctx->EvalMap.Map2Color4 );
if (ctx->Eval.Map1TextureCoord4)
set_active_eval1( exec, VBO_ATTRIB_TEX, 4, &ctx->EvalMap.Map1Texture4 );
{
}
-static void GLAPIENTRY
-_mesa_noop_SecondaryColor3fEXT(GLfloat a, GLfloat b, GLfloat c)
-{
-}
-
-static void GLAPIENTRY
-_mesa_noop_SecondaryColor3fvEXT(const GLfloat * v)
-{
-}
-
static void GLAPIENTRY
_mesa_noop_TexCoord1f(GLfloat a)
{
{
}
-
-static void GLAPIENTRY
-_mesa_noop_DrawRangeElements(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid * indices)
-{
-}
-
static void GLAPIENTRY
_mesa_noop_EvalMesh1(GLenum mode, GLint i1, GLint i2)
{
vfmt->Materialfv = _mesa_noop_Materialfv;
vfmt->Normal3f = _mesa_noop_Normal3f;
vfmt->Normal3fv = _mesa_noop_Normal3fv;
- vfmt->SecondaryColor3fEXT = _mesa_noop_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = _mesa_noop_SecondaryColor3fvEXT;
vfmt->TexCoord1f = _mesa_noop_TexCoord1f;
vfmt->TexCoord1fv = _mesa_noop_TexCoord1fv;
vfmt->TexCoord2f = _mesa_noop_TexCoord2f;
vfmt->DrawArrays = _mesa_noop_DrawArrays;
vfmt->DrawElements = _mesa_noop_DrawElements;
- vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements;
}
}
-static void GLAPIENTRY
-_save_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
- GLsizei count, GLenum type, const GLvoid * indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) end;
- (void) count;
- (void) type;
- (void) indices;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements");
-}
-
-
static void GLAPIENTRY
_save_DrawArrays(GLenum mode, GLint start, GLsizei count)
{
_ae_map_vbos(ctx);
- if (_mesa_is_bufferobj(ctx->Array.ArrayObj->ElementArrayBufferObj))
- indices =
- ADD_POINTERS(ctx->Array.ArrayObj->ElementArrayBufferObj->Pointer, indices);
+ if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj))
+ indices = ADD_POINTERS(ctx->Array.ElementArrayBufferObj->Pointer, indices);
vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK |
VBO_SAVE_PRIM_NO_CURRENT_UPDATE));
}
-static void GLAPIENTRY
-_save_OBE_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid * indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- struct vbo_save_context *save = &vbo_context(ctx)->save;
-
- if (!_mesa_validate_DrawRangeElements(ctx, mode,
- start, end, count, type, indices))
- return;
-
- if (save->out_of_memory)
- return;
-
- _save_OBE_DrawElements(mode, count, type, indices);
-}
-
-
static void
_save_vtxfmt_init(struct gl_context *ctx)
{
vfmt->Materialfv = _save_Materialfv;
vfmt->Normal3f = _save_Normal3f;
vfmt->Normal3fv = _save_Normal3fv;
- vfmt->SecondaryColor3fEXT = _save_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = _save_SecondaryColor3fvEXT;
vfmt->TexCoord1f = _save_TexCoord1f;
vfmt->TexCoord1fv = _save_TexCoord1fv;
vfmt->TexCoord2f = _save_TexCoord2f;
vfmt->Rectf = _save_Rectf;
vfmt->DrawArrays = _save_DrawArrays;
vfmt->DrawElements = _save_DrawElements;
- vfmt->DrawRangeElements = _save_DrawRangeElements;
}
ctx->ListState.ListVtxfmt.Rectf = _save_OBE_Rectf;
ctx->ListState.ListVtxfmt.DrawArrays = _save_OBE_DrawArrays;
ctx->ListState.ListVtxfmt.DrawElements = _save_OBE_DrawElements;
- ctx->ListState.ListVtxfmt.DrawRangeElements = _save_OBE_DrawRangeElements;
_mesa_install_save_vtxfmt(ctx, &ctx->ListState.ListVtxfmt);
}
/* Colormaterial -- this kindof sucks.
*/
if (ctx->Light.ColorMaterialEnabled) {
- _mesa_update_color_material(ctx, ctx->Current.Attrib[VBO_ATTRIB_COLOR0]);
+ _mesa_update_color_material(ctx, ctx->Current.Attrib[VBO_ATTRIB_COLOR]);
}
/* CurrentExecPrimitive
OFFSET( "LIGHT_MODEL_AMBIENT ", struct gl_lightmodel, Ambient );
OFFSET( "LIGHT_MODEL_LOCAL_VIEWER ", struct gl_lightmodel, LocalViewer );
OFFSET( "LIGHT_MODEL_TWO_SIDE ", struct gl_lightmodel, TwoSide );
- OFFSET( "LIGHT_MODEL_COLOR_CONTROL ", struct gl_lightmodel, ColorControl );
printf( "\n" );
GLvoid *rgba, const GLvoid *dest,
GLenum chanType );
-extern void _ASMAPI
-_mesa_mmx_blend_min( struct gl_context *ctx, GLuint n, const GLubyte mask[],
- GLvoid *rgba, const GLvoid *dest,
- GLenum chanType );
-
-extern void _ASMAPI
-_mesa_mmx_blend_max( struct gl_context *ctx, GLuint n, const GLubyte mask[],
- GLvoid *rgba, const GLvoid *dest,
- GLenum chanType );
-
extern void _ASMAPI
_mesa_mmx_blend_modulate( struct gl_context *ctx, GLuint n, const GLubyte mask[],
GLvoid *rgba, const GLvoid *dest,
#include "mmx_blendtmp.h"
-/* Blend min function
- */
-
-#define TAG(x) CONCAT(x,_min)
-#define LLTAG(x) LLBL2(x,_min)
-
-/* Kevin F. Quinn 2nd July 2006
- * Replace data segment constants with text-segment instructions
-#define INIT \
- MOVQ ( CONTENT(const_80), MM7 )
- */
-#define INIT \
- PUSH_L ( CONST(const_80_h) ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ ;\
- PUSH_L ( CONST(const_80_l) ) ;\
- MOVQ ( REGIND(ESP), MM7 ) ;\
- ADD_L ( CONST(8), ESP)
-
-#define MAIN( rgba, dest ) \
- GMB_LOAD( rgba, dest, MM1, MM2 ) ;\
- MOVQ ( MM1, MM3 ) ;\
- MOVQ ( MM2, MM4 ) ;\
- PXOR ( MM7, MM3 ) /* unsigned -> signed */ ;\
- PXOR ( MM7, MM4 ) /* unsigned -> signed */ ;\
- PCMPGTB ( MM3, MM4 ) /* q > p ? 0xff : 0x00 */ ;\
- PAND ( MM4, MM1 ) /* q > p ? p : 0 */ ;\
- PANDN ( MM2, MM4 ) /* q > p ? 0 : q */ ;\
- POR ( MM1, MM4 ) /* q > p ? p : q */ ;\
- GMB_STORE( rgba, MM4 )
-
-#include "mmx_blendtmp.h"
-
-
-/* Blend max function
- */
-
-#define TAG(x) CONCAT(x,_max)
-#define LLTAG(x) LLBL2(x,_max)
-
-/* Kevin F. Quinn 2nd July 2006
- * Replace data segment constants with text-segment instructions
-#define INIT \
- MOVQ ( CONTENT(const_80), MM7 )
- */
-#define INIT \
- PUSH_L ( CONST(const_80_l) ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ ;\
- PUSH_L ( CONST(const_80_h) ) ;\
- MOVQ ( REGIND(ESP), MM7 ) ;\
- ADD_L ( CONST(8), ESP)
-
-#define MAIN( rgba, dest ) \
- GMB_LOAD( rgba, dest, MM1, MM2 ) ;\
- MOVQ ( MM1, MM3 ) ;\
- MOVQ ( MM2, MM4 ) ;\
- PXOR ( MM7, MM3 ) /* unsigned -> signed */ ;\
- PXOR ( MM7, MM4 ) /* unsigned -> signed */ ;\
- PCMPGTB ( MM3, MM4 ) /* q > p ? 0xff : 0x00 */ ;\
- PAND ( MM4, MM2 ) /* q > p ? q : 0 */ ;\
- PANDN ( MM1, MM4 ) /* q > p ? 0 : p */ ;\
- POR ( MM2, MM4 ) /* q > p ? p : q */ ;\
- GMB_STORE( rgba, MM4 )
-
-#include "mmx_blendtmp.h"
-
-
/* Blend modulate function
*/
{ MESA_FORMAT_RGB888, 24, 8, 0, 0x00000000, 8, 8, 0x00000000, 8, 16, 0x00000000, 0, 0, 0x00000000, 16, 16, 8, BI_RGB },
// { MESA_FORMAT_BGR888, 24, 8, 16, 8, 8, 8, 0, 0, 0, 16, 32, 8 },
// { MESA_FORMAT_BGR888, 24, 8, 16, 8, 8, 8, 0, 0, 0, 16, 16, 8 },
- { MESA_FORMAT_RGB565, 16, 5, 0, 0x00000000, 6, 5, 0x00000000, 5, 11, 0x00000000, 0, 0, 0x00000000, 16, 32, 8, BI_BITFIELDS },
+ { MESA_FORMAT_RGB565, 16, 5, 0, 0x0000F800, 6, 5, 0x000007E0, 5, 11, 0x0000001F, 0, 0, 0x00000000, 16, 32, 8, BI_BITFIELDS },
{ MESA_FORMAT_RGB565, 16, 5, 0, 0x0000F800, 6, 5, 0x000007E0, 5, 11, 0x0000001F, 0, 0, 0x00000000, 16, 16, 8, BI_BITFIELDS },
};
INT nb_win_compat = 0, start_win_compat = 0;
INT ret = sizeof(pixel_formats)/sizeof(pixel_formats[0]);
- if(GetObjectType(hdc) == OBJ_DC)
+ if (GetObjectType(hdc) == OBJ_DC)
{
/* Find the window compatible formats */
INT bpp = GetDeviceCaps(hdc, BITSPIXEL);
- for(index = 0; index<sizeof(pixel_formats)/sizeof(pixel_formats[0]); index++)
+ for (index = 0; index < sizeof(pixel_formats)/sizeof(pixel_formats[0]); index++)
{
- if(pixel_formats[index].color_bits == bpp)
+ if (pixel_formats[index].color_bits == bpp)
{
- if(!start_win_compat)
+ if (!start_win_compat)
start_win_compat = index+1;
nb_win_compat++;
}
TRACE("OpenGL software implementation START!\n");
/* allocate our structure */
- fb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(struct sw_framebuffer, bmi.bmiColors[2]));
+ fb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(struct sw_framebuffer, bmi.bmiColors[3]));
if(!fb)
+ {
+ ERR("HeapAlloc FAILED!\n");
return FALSE;
+ }
/* Get the format index */
fb->format_index = index_from_format(dc_data, format, &doubleBuffered);
+ TRACE("Using format %u - double buffered: %x.\n", fb->format_index, doubleBuffered);
fb->flags = doubleBuffered ? SW_FB_DOUBLEBUFFERED : 0;
/* Set the bitmap info describing the framebuffer */
fb->bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
* of the client area via GetClientRect. */
RECT client_rect;
UINT width, height;
+
+ TRACE("Got WM_WINDOWPOSCHANGED\n");
+
GetClientRect(pParams->hwnd, &client_rect);
width = client_rect.right - client_rect.left;
height = client_rect.bottom - client_rect.top;
+@ stub I_ScGetCurrentGroupStateW
@ stdcall A_SHAFinal(ptr ptr)
@ stdcall A_SHAInit(ptr)
@ stdcall A_SHAUpdate(ptr ptr long)
@ stdcall AddAuditAccessAce(ptr long long ptr long long)
@ stdcall AddAuditAccessAceEx(ptr long long long ptr long long)
@ stdcall AddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long)
-;@ stdcall AddMandatoryAce(ptr long long long ptr)
@ stdcall AddUsersToEncryptedFile(wstr ptr)
@ stdcall AdjustTokenGroups(long long ptr long ptr ptr)
@ stdcall AdjustTokenPrivileges(long long ptr long ptr ptr)
@ stdcall CommandLineFromMsiDescriptor(wstr ptr ptr)
@ stub ComputeAccessTokenFromCodeAuthzLevel
@ stdcall ControlService(long long ptr)
-@ stdcall ControlServiceEx(ptr long long ptr)
@ stdcall ControlTraceA(double str ptr long)
@ stdcall ControlTraceW(double wstr ptr long)
@ stub ConvertAccessToSecurityDescriptorA
@ stdcall CreatePrivateObjectSecurityEx(ptr ptr ptr ptr long long ptr ptr)
@ stdcall CreatePrivateObjectSecurityWithMultipleInheritance(ptr ptr ptr ptr long long long ptr ptr)
@ stdcall CreateProcessAsUserA(long str str ptr ptr long long ptr str ptr ptr)
-# @ stub CreateProcessAsUserSecure
@ stdcall CreateProcessAsUserW(long str str ptr ptr long long ptr str ptr ptr)
@ stdcall CreateProcessWithLogonW(wstr wstr wstr long wstr wstr long ptr wstr ptr ptr)
@ stdcall CreateProcessWithTokenW(ptr long wstr wstr long ptr wstr ptr ptr)
@ stub ElfClearEventLogFileW
@ stub ElfCloseEventLog
@ stub ElfDeregisterEventSource
-@ stub ElfDeregisterEventSourceW
@ stub ElfFlushEventLog
@ stub ElfNumberOfRecords
@ stub ElfOldestRecord
@ stub ElfRegisterEventSourceA
@ stub ElfRegisterEventSourceW
@ stub ElfReportEventA
+# ElfReportEventAndSourceW
@ stub ElfReportEventW
@ stdcall EnableTrace(long long long ptr double)
@ stdcall EncryptFileA(str)
@ stdcall EncryptionDisable(wstr long)
@ stdcall EnumDependentServicesA(long long ptr long ptr ptr)
@ stdcall EnumDependentServicesW(long long ptr long ptr ptr)
-@ stub EnumServiceGroupA
@ stdcall EnumServiceGroupW(ptr long long ptr long ptr ptr ptr wstr)
@ stdcall EnumServicesStatusA(long long long ptr long ptr ptr ptr)
@ stdcall EnumServicesStatusExA(long long long long ptr long ptr ptr ptr str)
@ stub GetLocalManagedApplications
@ stub GetManagedApplicationCategories
@ stub GetManagedApplications
-@ stub GetMangledSiteSid
@ stdcall GetMultipleTrusteeA(ptr)
@ stdcall GetMultipleTrusteeOperationA(ptr)
@ stdcall GetMultipleTrusteeOperationW(ptr)
@ stdcall GetSidLengthRequired(long)
@ stdcall GetSidSubAuthority(ptr long)
@ stdcall GetSidSubAuthorityCount(ptr)
-@ stdcall GetSiteSidFromToken(ptr)
@ stdcall GetTokenInformation(long long ptr long ptr)
@ stdcall GetTraceEnableFlags(double)
@ stdcall GetTraceEnableLevel(double)
@ stdcall GetUserNameA(ptr ptr)
@ stdcall GetUserNameW(ptr ptr)
@ stdcall GetWindowsAccountDomainSid(ptr ptr ptr)
-@ stub I_ScGetCurrentGroupStateW
+# I_QueryTagInformation
@ stub I_ScIsSecurityProcess
@ stub I_ScPnPGetServiceName
@ stub I_ScSendTSMessage
-@ stub I_ScSetServiceBit
@ stdcall I_ScSetServiceBitsA(ptr long long long str)
@ stdcall I_ScSetServiceBitsW(ptr long long long wstr)
@ stub IdentifyCodeAuthzLevelW
@ stdcall InitiateSystemShutdownExW(wstr wstr long long long long)
@ stdcall InitiateSystemShutdownW(str str long long long)
@ stub InstallApplication
-@ stub IsProcessRestricted
@ stdcall IsTextUnicode(ptr long ptr) ntdll.RtlIsTextUnicode
@ stdcall IsTokenRestricted(long)
@ stub IsTokenUntrusted
@ stub LsaICLookupNamesWithCreds
@ stub LsaICLookupSids
@ stub LsaICLookupSidsWithCreds
-@ stdcall LsaLookupNames(ptr long ptr ptr ptr)
@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
+@ stdcall LsaLookupNames(ptr long ptr ptr ptr)
@ stdcall LsaLookupPrivilegeDisplayName(ptr ptr ptr ptr)
@ stdcall LsaLookupPrivilegeName(ptr ptr ptr)
@ stdcall LsaLookupPrivilegeValue(ptr ptr ptr)
@ stdcall MD5Final(ptr)
@ stdcall MD5Init(ptr)
@ stdcall MD5Update(ptr ptr long)
-@ stub MSChapSrvChangePassword
@ stub MSChapSrvChangePassword2
-@ stdcall MakeAbsoluteSD(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
+@ stub MSChapSrvChangePassword
@ stdcall MakeAbsoluteSD2(ptr ptr)
+@ stdcall MakeAbsoluteSD(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall MakeSelfRelativeSD(ptr ptr ptr)
@ stdcall MapGenericMask(ptr ptr) ntdll.RtlMapGenericMask
@ stdcall NotifyBootConfigStatus(long)
@ stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long)
@ stub ProcessIdleTasks
@ stub ProcessTrace
-@ stub ProvAccessRightsToNTAccessMask # ?
@ stdcall QueryAllTracesA(ptr long ptr)
@ stdcall QueryAllTracesW(ptr long ptr)
@ stdcall QueryRecoveryAgentsOnEncryptedFile(wstr ptr)
-@ stdcall QuerySecurityAccessMask(long ptr)
@ stdcall QueryServiceConfig2A(long long ptr long ptr)
@ stdcall QueryServiceConfig2W(long long ptr long ptr)
@ stdcall QueryServiceConfigA(long ptr long ptr)
@ stub QueryTraceA
@ stub QueryTraceW
@ stdcall QueryUsersOnEncryptedFile(wstr ptr)
-@ stdcall QueryWindows31FilesMigration(long)
@ stub ReadEncryptedFileRaw
@ stdcall ReadEventLogA(long long long ptr long ptr ptr)
@ stdcall ReadEventLogW(long long long ptr long ptr ptr)
@ stdcall RegCloseKey(long)
@ stdcall RegConnectRegistryA(str long ptr)
+# RegConnectRegistryExA
+# RegConnectRegistryExW
@ stdcall RegConnectRegistryW(wstr long ptr)
-@ stdcall RegCopyTreeA(ptr str ptr)
-@ stdcall RegCopyTreeW(ptr wstr ptr)
@ stdcall RegCreateKeyA(long str ptr)
@ stdcall RegCreateKeyExA(long str long ptr long long ptr ptr ptr)
@ stdcall RegCreateKeyExW(long wstr long ptr long long ptr ptr ptr)
@ stdcall RegDeleteKeyExA(long str long long)
@ stdcall RegDeleteKeyExW(long wstr long long)
@ stdcall RegDeleteKeyW(long wstr)
-@ stdcall RegDeleteKeyValueA(ptr str str)
-@ stdcall RegDeleteKeyValueW(ptr wstr wstr)
-@ stdcall RegDeleteTreeA(long str)
-@ stdcall RegDeleteTreeW(long wstr)
@ stdcall RegDeleteValueA(long str)
@ stdcall RegDeleteValueW(long wstr)
@ stdcall RegDisablePredefinedCache()
-@ stdcall RegDisablePredefinedCacheEx()
@ stdcall RegDisableReflectionKey(ptr)
@ stdcall RegEnableReflectionKey(ptr)
@ stdcall RegEnumKeyA(long long ptr long)
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr)
@ stdcall RegLoadKeyA(long str str)
@ stdcall RegLoadKeyW(long wstr wstr)
-@ stdcall RegLoadMUIStringA(long str str long ptr long str)
-@ stdcall RegLoadMUIStringW(long wstr wstr long ptr long wstr)
@ stdcall RegNotifyChangeKeyValue(long long long long long)
@ stdcall RegOpenCurrentUser(long ptr)
@ stdcall RegOpenKeyA(long str ptr)
@ stdcall RegQueryValueExA(long str ptr ptr ptr ptr)
@ stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr)
@ stdcall RegQueryValueW(long wstr ptr ptr)
-@ stub RegRemapPreDefKey
@ stdcall RegReplaceKeyA(long str str str)
@ stdcall RegReplaceKeyW(long wstr wstr wstr)
@ stdcall RegRestoreKeyA(long str long)
@ stdcall RegSaveKeyExW(long str ptr long)
@ stdcall RegSaveKeyW(long ptr ptr)
@ stdcall RegSetKeySecurity(long long ptr)
-@ stdcall RegSetKeyValueA(long str str long ptr long)
-@ stdcall RegSetKeyValueW(long wstr wstr long ptr long)
@ stdcall RegSetValueA(long str long ptr long)
@ stdcall RegSetValueExA(long str long long ptr long)
@ stdcall RegSetValueExW(long wstr long long ptr long)
@ stdcall SetNamedSecurityInfoW(wstr long ptr ptr ptr ptr ptr)
@ stdcall SetPrivateObjectSecurity(long ptr ptr ptr long)
@ stub SetPrivateObjectSecurityEx
-@ stdcall SetSecurityAccessMask(long ptr)
@ stdcall SetSecurityDescriptorControl(ptr long long)
@ stdcall SetSecurityDescriptorDacl(ptr long ptr long)
@ stdcall SetSecurityDescriptorGroup(ptr ptr long)
@ stdcall StartTraceW(ptr wstr ptr)
@ stub StopTraceA
@ stub StopTraceW
-@ stdcall SynchronizeWindows31FilesAndWindowsNTRegistry(long long long long)
@ stdcall SystemFunction001(ptr ptr ptr)
@ stdcall SystemFunction002(ptr ptr ptr)
@ stdcall SystemFunction003(ptr ptr)
NTSTATUS Status;
ULONG Timeout_ms;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(Timeout_ms);
+
/* Convert to milliseconds so we can use the value later on */
Timeout_ms = dwTimeout * 1000;
/******************************************************************************
* InitiateShutdownW [ADVAPI32.@]
- *
+ *
* @unimplamented
*/
DWORD WINAPI
/******************************************************************************
* InitiateShutdownA [ADVAPI32.@]
- *
+ *
* see InitiateShutdownW
*/
DWORD WINAPI
do
{
/* Get each byte from the pseudo random number and store it in the buffer */
- *pBuffer = (BYTE)(uPseudoRandom >> 8 * (dwLen % 4) & 0xFF);
+ *pBuffer = (BYTE)(uPseudoRandom >> 8 * (dwLen % 3) & 0xFF);
++pBuffer;
- } while(--dwLen % 4);
+ } while(--dwLen % 3);
} while(dwLen);
return TRUE;
-D__WINESRC__
-D_ATL_VER=_ATL_VER_30)
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(atl.dll atl.spec ADD_IMPORTLIB)
add_library(atl SHARED ${SOURCE} rsrc.rc)
set_module_type(atl win32dll)
target_link_libraries(atl uuid wine)
-add_importlibs(atl oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(atl oleaut32 ole32 user32 gdi32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_pch(atl precomp.h SOURCE)
add_cd_file(TARGET atl DESTINATION reactos/system32 FOR all)
#include <precomp.h>
+#define NO_SHLWAPI_PATH
+#define NO_SHLWAPI_STRFCNS
+#define NO_SHLWAPI_GDI
+#define NO_SHLWAPI_STREAM
+#include <shlwapi.h>
+
/**************************************************************
* ATLRegistrar implementation
*/
strbuf_write(buf->str, &name, -1);
}else if(key_type == DO_DELETE) {
TRACE("Deleting %s\n", debugstr_w(buf->str));
- RegDeleteTreeW(parent_key, buf->str);
+ SHDeleteKeyW(parent_key, buf->str);
}else {
if(key_type == FORCE_REMOVE)
- RegDeleteTreeW(parent_key, buf->str);
+ SHDeleteKeyW(parent_key, buf->str);
lres = RegCreateKeyW(parent_key, buf->str, &hkey);
if(lres != ERROR_SUCCESS) {
WARN("Could not create(open) key: %08x\n", lres);
-D__WINESRC__
-D_ATL_VER=_ATL_VER_100)
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(atl100.dll atl100.spec ADD_IMPORTLIB)
set_module_type(atl100 win32dll)
target_link_libraries(atl100 uuid wine)
-add_importlibs(atl100 ole32 oleaut32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(atl100 ole32 oleaut32 user32 gdi32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_pch(atl100 precomp.h SOURCE)
add_cd_file(TARGET atl100 DESTINATION reactos/system32 FOR all)
-D__WINESRC__
-D_ATL_VER=_ATL_VER_80)
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
spec2def(atl80.dll atl80.spec ADD_IMPORTLIB)
list(APPEND SOURCE
add_library(atl80 SHARED ${SOURCE})
set_module_type(atl80 win32dll)
target_link_libraries(atl80 uuid wine)
-add_importlibs(atl80 oleaut32 user32 ole32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(atl80 oleaut32 user32 ole32 gdi32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_pch(atl80 precomp.h SOURCE)
add_cd_file(TARGET atl80 DESTINATION reactos/system32 FOR all)
add_pch(browseui precomp.h SOURCE)
add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
+if(NOT MSVC)
+ add_target_compile_flags(browseui "-Wno-unused-but-set-variable")
+endif()
+
add_custom_command(TARGET browseui POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:browseui>"
-D_WINE
-D_CRYPT32_)
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(crypt32.dll crypt32.spec ADD_IMPORTLIB)
set_module_type(crypt32 win32dll)
target_link_libraries(crypt32 wine ${PSEH_LIB} oldnames)
-add_importlibs(crypt32 user32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(crypt32 user32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_delay_importlibs(crypt32 cryptnet)
add_pch(crypt32 crypt32_private.h SOURCE)
add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all)
#include "crypt32_private.h"
+#include <shlwapi.h>
+
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
typedef struct _WINE_HASH_TO_DELETE
if (dwFlags & CERT_STORE_DELETE_FLAG)
{
- DWORD rc = RegDeleteTreeW((HKEY)pvPara, CertsW);
+ DWORD rc = SHDeleteKeyW((HKEY)pvPara, CertsW);
if (rc == ERROR_SUCCESS || rc == ERROR_NO_MORE_ITEMS)
- rc = RegDeleteTreeW((HKEY)pvPara, CRLsW);
+ rc = SHDeleteKeyW((HKEY)pvPara, CRLsW);
if (rc == ERROR_SUCCESS || rc == ERROR_NO_MORE_ITEMS)
- rc = RegDeleteTreeW((HKEY)pvPara, CTLsW);
+ rc = SHDeleteKeyW((HKEY)pvPara, CTLsW);
if (rc == ERROR_NO_MORE_ITEMS)
rc = ERROR_SUCCESS;
SetLastError(rc);
return errCode;
}
-
-/*
- * @implemented
- */
BOOL
-WINAPI
-CopyFileExW (
- LPCWSTR lpExistingFileName,
- LPCWSTR lpNewFileName,
- LPPROGRESS_ROUTINE lpProgressRoutine,
- LPVOID lpData,
- BOOL *pbCancel,
- DWORD dwCopyFlags
-)
+BasepCopyFileExW(IN LPCWSTR lpExistingFileName,
+ IN LPCWSTR lpNewFileName,
+ IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL,
+ IN LPVOID lpData OPTIONAL,
+ IN LPBOOL pbCancel OPTIONAL,
+ IN DWORD dwCopyFlags,
+ IN DWORD dwBasepFlags,
+ OUT LPHANDLE lpExistingHandle,
+ OUT LPHANDLE lpNewHandle)
{
NTSTATUS errCode;
HANDLE FileHandleSource, FileHandleDest;
return RC;
}
+/*
+ * @implemented
+ */
+BOOL
+WINAPI
+CopyFileExW(IN LPCWSTR lpExistingFileName,
+ IN LPCWSTR lpNewFileName,
+ IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL,
+ IN LPVOID lpData OPTIONAL,
+ IN LPBOOL pbCancel OPTIONAL,
+ IN DWORD dwCopyFlags)
+{
+ BOOL Ret;
+ HANDLE ExistingHandle, NewHandle;
+
+ ExistingHandle = INVALID_HANDLE_VALUE;
+ NewHandle = INVALID_HANDLE_VALUE;
+
+ _SEH2_TRY
+ {
+ Ret = BasepCopyFileExW(lpExistingFileName,
+ lpNewFileName,
+ lpProgressRoutine,
+ lpData,
+ pbCancel,
+ dwCopyFlags,
+ 0,
+ &ExistingHandle,
+ &NewHandle);
+ }
+ _SEH2_FINALLY
+ {
+ if (ExistingHandle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(ExistingHandle);
+ }
+
+ if (NewHandle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(NewHandle);
+ }
+ }
+ _SEH2_END;
+
+ return Ret;
+}
+
/*
* @implemented
*/
BOOL
WINAPI
-PrivCopyFileExW (
- LPCWSTR lpExistingFileName,
- LPCWSTR lpNewFileName,
- LPPROGRESS_ROUTINE lpProgressRoutine,
- LPVOID lpData,
- BOOL *pbCancel,
- DWORD dwCopyFlags
-)
+PrivCopyFileExW(IN LPCWSTR lpExistingFileName,
+ IN LPCWSTR lpNewFileName,
+ IN LPPROGRESS_ROUTINE lpProgressRoutine,
+ IN LPVOID lpData,
+ IN LPBOOL pbCancel,
+ IN DWORD dwCopyFlags)
{
- UNIMPLEMENTED;
- return FALSE;
+ BOOL Ret;
+ HANDLE ExistingHandle, NewHandle;
+
+ ExistingHandle = INVALID_HANDLE_VALUE;
+ NewHandle = INVALID_HANDLE_VALUE;
+
+ /* Check for incompatible flags */
+ if (dwCopyFlags & COPY_FILE_FAIL_IF_EXISTS && dwCopyFlags & BASEP_COPY_REPLACE)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ _SEH2_TRY
+ {
+ Ret = BasepCopyFileExW(lpExistingFileName,
+ lpNewFileName,
+ lpProgressRoutine,
+ lpData,
+ pbCancel,
+ dwCopyFlags & BASEP_COPY_PUBLIC_MASK,
+ dwCopyFlags & BASEP_COPY_BASEP_MASK,
+ &ExistingHandle,
+ &NewHandle);
+ }
+ _SEH2_FINALLY
+ {
+ if (ExistingHandle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(ExistingHandle);
+ }
+
+ if (NewHandle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(NewHandle);
+ }
+ }
+ _SEH2_END;
+
+ return Ret;
}
/* EOF */
extern WaitForInputIdleType UserWaitForInputIdleRoutine;
+/* Flags for PrivCopyFileExW && BasepCopyFileExW */
+#define BASEP_COPY_METADATA 0x10
+#define BASEP_COPY_SACL 0x20
+#define BASEP_COPY_OWNER_AND_GROUP 0x40
+#define BASEP_COPY_DIRECTORY 0x80
+#define BASEP_COPY_BACKUP_SEMANTICS 0x100
+#define BASEP_COPY_REPLACE 0x200
+#define BASEP_COPY_SKIP_DACL 0x400
+#define BASEP_COPY_PUBLIC_MASK 0xF
+#define BASEP_COPY_BASEP_MASK 0xFFFFFFF0
+
/* GLOBAL VARIABLES **********************************************************/
extern BOOL bIsFileApiAnsi;
IN ULONG FileAttributes
);
+BOOL
+BasepCopyFileExW(
+ IN LPCWSTR lpExistingFileName,
+ IN LPCWSTR lpNewFileName,
+ IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL,
+ IN LPVOID lpData OPTIONAL,
+ IN LPBOOL pbCancel OPTIONAL,
+ IN DWORD dwCopyFlags,
+ IN DWORD dwBasepFlags,
+ OUT LPHANDLE lpExistingHandle,
+ OUT LPHANDLE lpNewHandle
+);
/* FIXME: This is EXPORTED! It should go in an external kernel32.h header */
VOID
-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(localspl.dll localspl.spec)
set_module_type(localspl win32dll)
target_link_libraries(localspl wine)
-add_importlibs(localspl spoolss user32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(localspl spoolss user32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_pch(localspl localspl_private.h SOURCE)
add_cd_file(TARGET localspl DESTINATION reactos/system32 FOR all)
#include "localspl_private.h"
+#include <shlwapi.h>
#include <ddk/winddiui.h>
/* ############################### */
return FALSE;
}
- if(RegDeleteTreeW(hroot, pMonitorName) == ERROR_SUCCESS) {
+ if(SHDeleteKeyW(hroot, pMonitorName) == ERROR_SUCCESS) {
TRACE("%s deleted\n", debugstr_w(pMonitorName));
RegCloseKey(hroot);
return TRUE;
add_cd_file(TARGET mciseq DESTINATION reactos/system32 FOR all)
if(NOT MSVC)
- add_target_compile_flags(mciseq "-Wno-error=overflow")
+ add_target_compile_flags(mciseq "-Wno-overflow")
endif()
wmw->nUseCount++;
- wmw->wInput = wmw->wOutput = WAVE_MAPPER;
+ wmw->wInput = wmw->wOutput = (WORD)WAVE_MAPPER;
wmw->fInput = FALSE;
wmw->hWave = 0;
wmw->dwStatus = MCI_MODE_NOT_READY;
TRACE("MCI_WAVE_SET_ANYINPUT\n");
if (wmw->wInput != (WORD)lpParms->wInput)
WAVE_mciStop(wDevID, MCI_WAIT, NULL);
- wmw->wInput = WAVE_MAPPER;
+ wmw->wInput = (WORD)WAVE_MAPPER;
}
if (dwFlags & MCI_WAVE_SET_ANYOUTPUT) {
TRACE("MCI_WAVE_SET_ANYOUTPUT\n");
if (wmw->wOutput != (WORD)lpParms->wOutput)
WAVE_mciStop(wDevID, MCI_WAIT, NULL);
- wmw->wOutput = WAVE_MAPPER;
+ wmw->wOutput = (WORD)WAVE_MAPPER;
}
/* Set wave format parameters is refused after Open or Record.*/
if (dwFlags & MCI_WAVE_SET_FORMATTAG) {
-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(msctf.dll msctf.spec)
set_module_type(msctf win32dll)
target_link_libraries(msctf uuid wine)
-add_importlibs(msctf ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(msctf ole32 oleaut32 user32 advapi32 shlwapi msvcrt kernel32 ntdll)
add_pch(msctf msctf_internal.h SOURCE)
add_cd_file(TARGET msctf DESTINATION reactos/system32 FOR all)
sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2);
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
- RegDeleteTreeW(tipkey, fullkey);
+ SHDeleteKeyW(tipkey, fullkey);
sprintfW(fullkey,fmt2,ctg,itm,buf2,buf);
- RegDeleteTreeW(tipkey, fullkey);
+ SHDeleteKeyW(tipkey, fullkey);
RegCloseKey(tipkey);
return S_OK;
StringFromGUID2(rclsid, buf, 39);
sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf);
- RegDeleteTreeW(HKEY_LOCAL_MACHINE, fullkey);
- RegDeleteTreeW(HKEY_CURRENT_USER, fullkey);
+ SHDeleteKeyW(HKEY_LOCAL_MACHINE, fullkey);
+ SHDeleteKeyW(HKEY_CURRENT_USER, fullkey);
return S_OK;
}
#include <objbase.h>
#include <olectl.h>
#include <msctf.h>
+#include <shlwapi.h>
#include <wine/list.h>
#include <wine/unicode.h>
IDS_PASSWORDEXPIRED "Twoje hasło wygasło i musi zostać zmienione."
END
-/* Shutdown Dialog Strings */STRINGTABLE
+/* Shutdown Dialog Strings */
+STRINGTABLE
BEGIN
IDS_SHUTDOWN_LOGOFF "Wyloguj ""%s"""
IDS_SHUTDOWN_SHUTDOWN "Wyłącz"
HKEY hkey;
if (!(hkey = open_key( root, path, FALSE ))) return;
- res = RegDeleteTreeW( hkey, NULL );
+ res = SHDeleteKeyW( hkey, NULL );
if (res) TRACE("failed to delete subtree of %s (%d)\n", debugstr_w(path), res);
delete_key( root, path );
RegCloseKey( hkey );
cls->action = INSTALLSTATE_ABSENT;
- res = RegDeleteTreeW( hkey, cls->clsid );
+ res = SHDeleteKeyW( hkey, cls->clsid );
if (res != ERROR_SUCCESS)
WARN("Failed to delete class key %d\n", res);
{
strcpyW( filetype, szFileType );
strcatW( filetype, cls->clsid );
- res = RegDeleteTreeW( HKEY_CLASSES_ROOT, filetype );
+ res = SHDeleteKeyW( HKEY_CLASSES_ROOT, filetype );
msi_free( filetype );
if (res != ERROR_SUCCESS)
}
TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
- res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid->ProgID );
+ res = SHDeleteKeyW( HKEY_CLASSES_ROOT, progid->ProgID );
if (res != ERROR_SUCCESS)
TRACE("Failed to delete progid key %d\n", res);
{
extension[0] = '.';
strcpyW( extension + 1, ext->Extension );
- res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
+ res = SHDeleteKeyW( HKEY_CLASSES_ROOT, extension );
msi_free( extension );
if (res != ERROR_SUCCESS)
WARN("Failed to delete extension key %d\n", res);
{
strcpyW( progid_shell, progid );
strcatW( progid_shell, shellW );
- res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
+ res = SHDeleteKeyW( HKEY_CLASSES_ROOT, progid_shell );
msi_free( progid_shell );
if (res != ERROR_SUCCESS)
WARN("Failed to delete shell key %d\n", res);
strcpyW(keypath, szUninstall);
strcatW(keypath, product);
}
- return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
+ return SHDeleteKeyW(HKEY_LOCAL_MACHINE, keypath);
}
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
strcpyW(keypath, szUserProducts);
strcatW(keypath, squished_pc);
- return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
+ return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
}
UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
strcpyW(keypath, szUserFeatures);
strcatW(keypath, squished_pc);
- return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
+ return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
}
static UINT MSIREG_OpenInstallerFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
sprintfW(keypath, szUserDataComponents_fmt, szUserSid);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, comp);
+ r = SHDeleteKeyW(hkey, comp);
RegCloseKey(hkey);
return r;
}
LocalFree(usersid);
}
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, squished_patch);
+ r = SHDeleteKeyW(hkey, squished_patch);
RegCloseKey(hkey);
return r;
}
LocalFree(usersid);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, squished_pc);
+ r = SHDeleteKeyW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
TRACE("%s squished %s\n", debugstr_w(szProduct), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_Products, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, squished_pc);
+ r = SHDeleteKeyW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
strcpyW(keypath, szInstaller_UserUpgradeCodes);
strcatW(keypath, squished_pc);
- return RegDeleteTreeW(HKEY_CURRENT_USER, keypath);
+ return SHDeleteKeyW(HKEY_CURRENT_USER, keypath);
}
UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode)
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesProducts, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, squished_pc);
+ r = SHDeleteKeyW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
TRACE("%s squished %s\n", debugstr_w(szProductCode), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_LocalClassesFeatures, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, squished_pc);
+ r = SHDeleteKeyW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
TRACE("%s squished %s\n", debugstr_w(szUpgradeCode), debugstr_w(squished_pc));
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, szInstaller_ClassesUpgradeCodes, 0, access, &hkey)) return ERROR_SUCCESS;
- r = RegDeleteTreeW(hkey, squished_pc);
+ r = SHDeleteKeyW(hkey, squished_pc);
RegCloseKey(hkey);
return r;
}
# Functions not exported in native dll:
@ cdecl -arch=i386 -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
-# Gecko
-@ cdecl _controlfp_s(ptr long long)
-@ varargs _snwprintf_s(ptr long long ptr)
-@ cdecl _vsnprintf_s(ptr long long str ptr)
-@ cdecl _vsnwprintf_s(ptr long long wstr ptr)
-@ cdecl _wcslwr_s(wstr long)
-@ cdecl _wfopen_s(ptr wstr wstr)
-@ cdecl fopen_s(ptr str str)
-@ cdecl strtok_s(ptr str ptr)
-@ varargs swprintf_s(ptr long wstr)
BOOL WINAPI
ClientSideInstallW(
IN HWND hWndOwner,
- IN DWORD dwUnknownFlags,
- IN LPWSTR lpNamedPipeName)
+ IN HINSTANCE hInstance,
+ IN LPWSTR lpNamedPipeName,
+ IN INT Show)
{
BOOL ReturnValue = FALSE;
BOOL ShowWizard;
-@ stdcall ClientSideInstallW(ptr long wstr)
+@ stdcall ClientSideInstallW(ptr ptr wstr long)
@ stdcall DevInstallW(ptr ptr wstr long)
@ stub InstallDevInst
@ stub InstallDevInstEx
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
psp.hInstance = hDllInstance;
psp.lParam = (LPARAM)DevInstData;
- psp.pfnDlgProc = (DLGPROC) WelcomeDlgProc;
+ psp.pfnDlgProc = WelcomeDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE);
ahpsp[IDD_WELCOMEPAGE] = CreatePropertySheetPage(&psp);
/* Create the Select Source page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
- psp.pfnDlgProc = (DLGPROC) CHSourceDlgProc;
+ psp.pfnDlgProc = CHSourceDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_CHSOURCE);
ahpsp[IDD_CHSOURCE] = CreatePropertySheetPage(&psp);
/* Create the Search driver page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
- psp.pfnDlgProc = (DLGPROC) SearchDrvDlgProc;
+ psp.pfnDlgProc = SearchDrvDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_SEARCHDRV);
ahpsp[IDD_SEARCHDRV] = CreatePropertySheetPage(&psp);
/* Create the Install driver page */
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
- psp.pfnDlgProc = (DLGPROC) InstallDrvDlgProc;
+ psp.pfnDlgProc = InstallDrvDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV);
ahpsp[IDD_INSTALLDRV] = CreatePropertySheetPage(&psp);
/* Create the No driver page */
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
- psp.pfnDlgProc = (DLGPROC) NoDriverDlgProc;
+ psp.pfnDlgProc = NoDriverDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER);
ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp);
/* Create the Install failed page */
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
- psp.pfnDlgProc = (DLGPROC) InstallFailedDlgProc;
+ psp.pfnDlgProc = InstallFailedDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED);
ahpsp[IDD_INSTALLFAILED] = CreatePropertySheetPage(&psp);
/* Create the Need reboot page */
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
- psp.pfnDlgProc = (DLGPROC) NeedRebootDlgProc;
+ psp.pfnDlgProc = NeedRebootDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_NEEDREBOOT);
ahpsp[IDD_NEEDREBOOT] = CreatePropertySheetPage(&psp);
/* Create the Finish page */
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
- psp.pfnDlgProc = (DLGPROC) FinishDlgProc;
+ psp.pfnDlgProc = FinishDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
ahpsp[IDD_FINISHPAGE] = CreatePropertySheetPage(&psp);
-
add_definitions(-D__WINESRC__)
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-
spec2def(ntmarta.dll ntmarta.spec)
list(APPEND SOURCE
* UPDATE HISTORY:
* 07/26/2005 Created
*/
+
#include "ntmarta.h"
#define NDEBUG
HINSTANCE hDllInstance;
+/* FIXME: Vista+ API */
+VOID
+WINAPI
+SetSecurityAccessMask(IN SECURITY_INFORMATION SecurityInformation,
+ OUT LPDWORD DesiredAccess)
+{
+ *DesiredAccess = 0;
+
+ if (SecurityInformation & (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION))
+ *DesiredAccess |= WRITE_OWNER;
+
+ if (SecurityInformation & DACL_SECURITY_INFORMATION)
+ *DesiredAccess |= WRITE_DAC;
+
+ if (SecurityInformation & SACL_SECURITY_INFORMATION)
+ *DesiredAccess |= ACCESS_SYSTEM_SECURITY;
+}
+
+/* FIXME: Vista+ API */
+VOID
+WINAPI
+QuerySecurityAccessMask(IN SECURITY_INFORMATION SecurityInformation,
+ OUT LPDWORD DesiredAccess)
+{
+ *DesiredAccess = 0;
+
+ if (SecurityInformation & (OWNER_SECURITY_INFORMATION |
+ GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION))
+ {
+ *DesiredAccess |= READ_CONTROL;
+ }
+
+ if (SecurityInformation & SACL_SECURITY_INFORMATION)
+ *DesiredAccess |= ACCESS_SYSTEM_SECURITY;
+}
+
static ACCESS_MODE
AccpGetAceAccessMode(IN PACE_HEADER AceHeader)
{
+# CoVrfCheckThreadState
+# CoVrfGetThreadState
+# CoVrfReleaseThreadState
+# PropVariantChangeType
@ stdcall BindMoniker(ptr long ptr ptr)
@ stdcall CLIPFORMAT_UserFree(ptr ptr)
@ stdcall CLIPFORMAT_UserMarshal(ptr ptr ptr)
@ stdcall CLIPFORMAT_UserSize(ptr long ptr)
@ stdcall CLIPFORMAT_UserUnmarshal(ptr ptr ptr)
+# CLSIDFromOle1Class
@ stdcall CLSIDFromProgID(wstr ptr)
@ stdcall CLSIDFromProgIDEx(wstr ptr)
@ stdcall CLSIDFromString(wstr ptr)
@ stdcall CoAddRefServerProcess()
@ stdcall CoAllowSetForegroundWindow(ptr ptr)
@ stdcall CoBuildVersion()
+# CoCancelCall
@ stdcall CoCopyProxy(ptr ptr)
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr)
@ stdcall CoCreateGuid(ptr)
@ stdcall CoCreateInstance(ptr ptr long ptr ptr)
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr)
+# CoCreateObjectInContext
+# CoDeactivateObject
+# CoDisableCallCancellation
@ stdcall CoDisconnectObject(ptr long)
@ stdcall CoDosDateTimeToFileTime(long long ptr) kernel32.DosDateTimeToFileTime
+# CoEnableCallCancellation
@ stdcall CoFileTimeNow(ptr)
@ stdcall CoFileTimeToDosDateTime(ptr ptr ptr) kernel32.FileTimeToDosDateTime
@ stdcall CoFreeAllLibraries()
@ stdcall CoFreeLibrary(long)
@ stdcall CoFreeUnusedLibraries()
@ stdcall CoFreeUnusedLibrariesEx(long long)
+# CoGetApartmentID
@ stdcall CoGetCallContext(ptr ptr)
@ stdcall CoGetCallerTID(ptr)
+# CoGetCancelObject
@ stdcall CoGetClassObject(ptr long ptr ptr ptr)
+# CoGetClassVersion
+# CoGetComCatalog
@ stdcall CoGetContextToken(ptr)
@ stdcall CoGetCurrentLogicalThreadId(ptr)
@ stdcall CoGetCurrentProcess()
@ stdcall CoGetDefaultContext(long ptr ptr)
@ stdcall CoGetInstanceFromFile(ptr ptr ptr long long wstr long ptr)
@ stdcall CoGetInstanceFromIStorage(ptr ptr ptr long ptr long ptr)
+# CoGetInterceptor
+# CoGetInterceptorFromTypeInfo
@ stdcall CoGetInterfaceAndReleaseStream(ptr ptr ptr)
@ stdcall CoGetMalloc(long ptr)
@ stdcall CoGetMarshalSizeMax(ptr ptr ptr long ptr long)
+# CoGetModuleType
@ stdcall CoGetObject(wstr ptr ptr ptr)
@ stdcall CoGetObjectContext(ptr ptr)
@ stdcall CoGetPSClsid(ptr ptr)
+# CoGetProcessIdentifier
@ stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr)
@ stdcall CoGetState(ptr)
-@ stub CoGetTIDFromIPID
+# CoGetStdMarshalEx
+# CoGetSystemSecurityPermissions
@ stdcall CoGetTreatAsClass(ptr ptr)
@ stdcall CoImpersonateClient()
@ stdcall CoInitialize(ptr)
@ stdcall CoInitializeEx(ptr long)
@ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr)
@ stdcall CoInitializeWOW(long long)
+# CoInstall
+# CoInvalidateRemoteMachineBindings
@ stdcall CoIsHandlerConnected(ptr)
@ stdcall CoIsOle1Class (ptr)
@ stdcall CoLoadLibrary(wstr long)
@ stdcall CoMarshalHresult(ptr long)
@ stdcall CoMarshalInterThreadInterfaceInStream(ptr ptr ptr)
@ stdcall CoMarshalInterface(ptr ptr ptr long ptr long)
+# CoPopServiceDomain
+# CoPushServiceDomain
@ stub CoQueryAuthenticationServices
@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr)
@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr)
@ stub CoQueryReleaseObject
+# CoReactivateObject
@ stdcall CoRegisterChannelHook(ptr ptr)
@ stdcall CoRegisterClassObject(ptr ptr long long ptr)
@ stdcall CoRegisterInitializeSpy(ptr ptr)
@ stdcall CoReleaseMarshalData(ptr)
@ stdcall CoReleaseServerProcess()
@ stdcall CoResumeClassObjects()
+# CoRetireServer
@ stdcall CoRevertToSelf()
@ stdcall CoRevokeClassObject(long)
@ stdcall CoRevokeInitializeSpy(int64)
@ stdcall CoRevokeMallocSpy()
+# CoSetCancelObject
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long)
@ stdcall CoSetState(ptr)
@ stdcall CoSuspendClassObjects()
@ stdcall CoTaskMemAlloc(long)
@ stdcall CoTaskMemFree(ptr)
@ stdcall CoTaskMemRealloc(ptr long)
+# CoTestCancel
@ stdcall CoTreatAsClass(ptr ptr)
@ stdcall CoUninitialize()
@ stub CoUnloadingWOW
@ stdcall CoUnmarshalHresult(ptr ptr)
@ stdcall CoUnmarshalInterface(ptr ptr ptr)
@ stdcall CoWaitForMultipleHandles(long long long ptr ptr)
+# ComPs_NdrDllCanUnloadNow
+# ComPs_NdrDllGetClassObject
+# ComPs_NdrDllRegisterProxy
+# ComPs_NdrDllUnregisterProxy
@ stdcall CreateAntiMoniker(ptr)
@ stdcall CreateBindCtx(long ptr)
@ stdcall CreateClassMoniker(ptr ptr)
@ stub CreateObjrefMoniker
@ stdcall CreateOleAdviseHolder(ptr)
@ stdcall CreatePointerMoniker(ptr ptr)
+# CreateStdProgressIndicator
@ stdcall CreateStreamOnHGlobal(ptr long ptr)
+# DcomChannelSetHResult
@ stdcall DllDebugObjectRPCHook(long ptr)
-@ stdcall DllGetClassObject (ptr ptr ptr)
+@ stdcall DllGetClassObject(ptr ptr ptr)
@ stub DllGetClassObjectWOW
@ stdcall -private DllRegisterServer()
-@ stdcall -private DllUnregisterServer()
@ stdcall DoDragDrop(ptr ptr long ptr)
@ stub EnableHookObject
@ stdcall FmtIdToPropStgName(ptr wstr)
@ stdcall HWND_UserMarshal(ptr ptr ptr)
@ stdcall HWND_UserSize(ptr long ptr)
@ stdcall HWND_UserUnmarshal(ptr ptr ptr)
+# HkOleRegisterObject
@ stdcall IIDFromString(wstr ptr)
-@ stub I_RemoteMain
@ stdcall IsAccelerator(long long ptr long)
@ stdcall IsEqualGUID(ptr ptr)
@ stub IsValidIid
@ stdcall StgCreateDocfile(wstr long long ptr)
@ stdcall StgCreateDocfileOnILockBytes(ptr long long ptr)
@ stdcall StgCreatePropSetStg(ptr long ptr)
+# StgCreatePropStg
@ stdcall StgCreateStorageEx(wstr long long long ptr ptr ptr ptr)
@ stub StgGetIFillLockBytesOnFile
@ stub StgGetIFillLockBytesOnILockBytes
@ stdcall StgIsStorageFile(wstr)
@ stdcall StgIsStorageILockBytes(ptr)
@ stub StgOpenAsyncDocfileOnIFillLockBytes
+# StgOpenPropStg
@ stdcall StgOpenStorage(wstr ptr long ptr long ptr)
@ stdcall StgOpenStorageEx(wstr long long long ptr ptr ptr ptr)
+# StgOpenStorageOnHandle
@ stdcall StgOpenStorageOnILockBytes(ptr ptr long long long ptr)
+# StgPropertyLengthAsVariant
@ stdcall StgSetTimes(wstr ptr ptr ptr )
@ stdcall StringFromCLSID(ptr ptr)
@ stdcall StringFromGUID2(ptr ptr long)
141 stdcall VarAdd(ptr ptr ptr)
142 stdcall VarAnd(ptr ptr ptr)
143 stdcall VarDiv(ptr ptr ptr)
-144 stub OACreateTypeLib2
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
146 stdcall DispCallFunc(ptr long long long long ptr ptr ptr)
147 stdcall VariantChangeTypeEx(ptr ptr long long long)
148 stdcall SafeArrayPtrOfIndex(ptr ptr ptr)
149 stdcall SysStringByteLen(ptr)
150 stdcall SysAllocStringByteLen(ptr long)
+@ stdcall -private DllRegisterServer()
152 stdcall VarEqv(ptr ptr ptr)
153 stdcall VarIdiv(ptr ptr ptr)
154 stdcall VarImp(ptr ptr ptr)
297 stub LPSAFEARRAY_Unmarshal
298 stdcall VarDecCmpR8(ptr double)
299 stdcall VarCyAdd(int64 int64 ptr)
+@ stdcall -private DllUnregisterServer()
+301 stub OACreateTypeLib2
303 stdcall VarCyMul(int64 int64 ptr)
304 stdcall VarCyMulI4(int64 long ptr)
305 stdcall VarCySub(int64 int64 ptr)
377 stdcall VarI1FromUI8(int64 ptr)
378 stdcall VarUI2FromI8(int64 ptr)
379 stdcall VarUI2FromUI8(int64 ptr)
-380 stub UserHWND_from_local
-381 stub UserHWND_to_local
-382 stub UserHWND_free_inst
-383 stub UserHWND_free_local
-384 stub UserBSTR_from_local
-385 stub UserBSTR_to_local
-386 stub UserBSTR_free_inst
-387 stub UserBSTR_free_local
-388 stub UserVARIANT_from_local
-389 stub UserVARIANT_to_local
-390 stub UserVARIANT_free_inst
-391 stub UserVARIANT_free_local
-392 stub UserEXCEPINFO_from_local
-393 stub UserEXCEPINFO_to_local
-394 stub UserEXCEPINFO_free_inst
-395 stub UserEXCEPINFO_free_local
-396 stub UserMSG_from_local
-397 stub UserMSG_to_local
-398 stub UserMSG_free_inst
-399 stub UserMSG_free_local
401 stdcall OleLoadPictureEx(ptr long long long long long long ptr)
402 stub OleLoadPictureFileEx
411 stdcall SafeArrayCreateVector(long long long)
441 stdcall VarUI8FromDec(long ptr)
442 stdcall RegisterTypeLibForUser(ptr wstr wstr)
443 stdcall UnRegisterTypeLibForUser(ptr long long long long)
-
-@ stdcall -private DllCanUnloadNow()
-@ stdcall -private DllGetClassObject(ptr ptr ptr)
-@ stdcall -private DllRegisterServer()
-@ stdcall -private DllUnregisterServer()
target_link_libraries(rpcrt4 wine uuid ${PSEH_LIB})
add_delay_importlibs(rpcrt4 iphlpapi wininet secur32 user32)
-add_importlibs(rpcrt4 msvcrt advapi32 ws2_32 kernel32 ntdll)
+add_importlibs(rpcrt4 advapi32 ws2_32 shlwapi msvcrt kernel32 ntdll)
add_pch(rpcrt4 precomp.h SOURCE)
add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
{
unsigned int i;
struct thunk *prev, *block;
+ DWORD oldprot;
block = VirtualAlloc( NULL, BLOCK_SIZE * sizeof(*block),
MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE );
if (!block) return NULL;
for (i = 0; i < BLOCK_SIZE; i++) init_thunk( &block[i], BLOCK_SIZE * num + i + 3 );
- VirtualProtect( block, BLOCK_SIZE * sizeof(*block), PAGE_EXECUTE_READ, NULL );
+ VirtualProtect( block, BLOCK_SIZE * sizeof(*block), PAGE_EXECUTE_READ, &oldprot );
prev = InterlockedCompareExchangePointer( (void **)&method_blocks[num], block, NULL );
if (prev) /* someone beat us to it */
{
#include <winreg.h>
+#define NO_SHLWAPI_PATH
+#define NO_SHLWAPI_STRFCNS
+#define NO_SHLWAPI_GDI
+#define NO_SHLWAPI_STREAM
+#include <shlwapi.h>
+
WINE_DEFAULT_DEBUG_CHANNEL(ole);
static void format_clsid( WCHAR *buffer, const CLSID *clsid )
strcpyW( keyname, interfaceW );
format_clsid( keyname + strlenW(keyname), proxy->header.piid );
- RegDeleteTreeW(HKEY_CLASSES_ROOT, keyname);
+ SHDeleteKeyW(HKEY_CLASSES_ROOT, keyname);
}
pProxyFileList++;
}
/* unregister clsid */
strcpyW( keyname, clsidW );
strcatW( keyname, clsid );
- RegDeleteTreeW(HKEY_CLASSES_ROOT, keyname);
+ SHDeleteKeyW(HKEY_CLASSES_ROOT, keyname);
return S_OK;
}
{
unsigned int i;
vtbl_method_t *prev, *block;
+ DWORD oldprot;
block = VirtualAlloc( NULL, BLOCK_SIZE * sizeof(*block),
MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE );
memcpy( &block[i], opcodes, sizeof(opcodes) );
block[i].offset = (BLOCK_SIZE * num + i + 3) * sizeof(void *);
}
- VirtualProtect( block, BLOCK_SIZE * sizeof(*block), PAGE_EXECUTE_READ, NULL );
+ VirtualProtect( block, BLOCK_SIZE * sizeof(*block), PAGE_EXECUTE_READ, &oldprot );
prev = InterlockedCompareExchangePointer( (void **)&method_blocks[num], block, NULL );
if (prev) /* someone beat us to it */
{
unsigned int i;
LONG_PTR *retval_ptr = NULL;
+ if (phase == STUBLESS_FREE)
+ {
+ /* Process the params allocated by the application first */
+ for (i = 0; i < number_of_params; i++)
+ {
+ unsigned char *pArg = pStubMsg->StackTop + params[i].stack_offset;
+ if (params[i].attr.MustFree)
+ {
+ call_freer(pStubMsg, pArg, ¶ms[i]);
+ }
+ }
+ }
+
for (i = 0; i < number_of_params; i++)
{
unsigned char *pArg = pStubMsg->StackTop + params[i].stack_offset;
call_marshaller(pStubMsg, pArg, ¶ms[i]);
break;
case STUBLESS_FREE:
- if (params[i].attr.MustFree)
- {
- call_freer(pStubMsg, pArg, ¶ms[i]);
- }
- else if (params[i].attr.ServerAllocSize)
+ if (params[i].attr.ServerAllocSize)
{
HeapFree(GetProcessHeap(), 0, *(void **)pArg);
}
DWORD bufLen = sizeof(ComputerName)/sizeof(ComputerName[0]);
RPC_STATUS r;
LPSTR pname;
+ LPSTR NetworkAddr;
INT size;
/* already connected? */
}
else
{
+ NetworkAddr = Connection->NetworkAddr;
+ if (NetworkAddr[0] == '\\' && NetworkAddr[1] == '\\')
+ NetworkAddr += 2;
+
if (GetComputerNameA(ComputerName, &bufLen))
{
- if (stricmp(ComputerName, Connection->NetworkAddr) == 0)
+ if (stricmp(ComputerName, NetworkAddr) == 0)
{
bUseLocalName = TRUE;
size += strlen(local);
else
{
bUseLocalName = FALSE;
- size += strlen(Connection->NetworkAddr);
+ size += strlen(NetworkAddr);
}
}
else
{
bUseLocalName = FALSE;
- size += strlen(Connection->NetworkAddr);
+ size += strlen(NetworkAddr);
}
}
if (bUseLocalName)
strcat(pname, local);
else
- strcat(pname, Connection->NetworkAddr);
+ strcat(pname, NetworkAddr);
strcat(pname, Connection->Endpoint);
r = rpcrt4_conn_open_pipe(Connection, pname, TRUE);
I_RpcFree(pname);
@ stdcall CreateProxyFromTypeInfo(ptr ptr ptr ptr ptr)
@ stdcall CreateStubFromTypeInfo(ptr ptr ptr ptr)
+# I_RpcServerTurnOnOffKeepalives
@ stdcall CStdStubBuffer_AddRef(ptr)
@ stdcall CStdStubBuffer_Connect(ptr ptr)
@ stdcall CStdStubBuffer_CountRefs(ptr)
@ stdcall CStdStubBuffer_Invoke(ptr ptr ptr)
@ stdcall CStdStubBuffer_IsIIDSupported(ptr ptr)
@ stdcall CStdStubBuffer_QueryInterface(ptr ptr ptr)
-@ stub CreateServerInterfaceFromStub # wxp
@ stdcall DceErrorInqTextA (long ptr)
@ stdcall DceErrorInqTextW (long ptr)
+# DllGetClassObject
+# DllInstall
@ stdcall -private DllRegisterServer()
@ stub GlobalMutexClearExternal
@ stub GlobalMutexRequestExternal
@ stub I_RpcBCacheAllocate
@ stub I_RpcBCacheFree
@ stub I_RpcBindingCopy
+# I_RpcBindingHandleToAsyncHandle
@ stub I_RpcBindingInqConnId
@ stub I_RpcBindingInqDynamicEndPoint
@ stub I_RpcBindingInqDynamicEndPointA
@ stub I_RpcBindingInqDynamicEndPointW
@ stub I_RpcBindingInqLocalClientPID # wxp
+# I_RpcBindingInqMarshalledTargetInfo
@ stub I_RpcBindingInqSecurityContext
@ stdcall I_RpcBindingInqTransportType(ptr ptr)
@ stub I_RpcBindingInqWireIdForSnego
@ stub I_RpcBindingIsClientLocal
-# 9x version of I_RpcBindingSetAsync has 3 arguments, not 2
-@ stdcall I_RpcBindingSetAsync(ptr ptr)
@ stub I_RpcBindingToStaticStringBindingW
@ stub I_RpcClearMutex
@ stub I_RpcConnectionInqSockBuffSize
@ stub I_RpcIfInqTransferSyntaxes
@ stub I_RpcLogEvent
@ stdcall I_RpcMapWin32Status(long)
+# I_RpcNDRCGetWireRepresentation
+# I_RpcNDRSContextEmergencyCleanup
@ stdcall I_RpcNegotiateTransferSyntax(ptr)
@ stub I_RpcNsBindingSetEntryName
@ stub I_RpcNsBindingSetEntryNameA
@ stub I_RpcProxyNewConnection # wxp
@ stub I_RpcReallocPipeBuffer
@ stdcall I_RpcReceive(ptr)
+# I_RpcRecordCalloutFailure
+# I_RpcReplyToClientWithStatus
@ stub I_RpcRequestMutex
+# I_RpcSNCHOption
@ stdcall I_RpcSend(ptr)
@ stdcall I_RpcSendReceive(ptr)
@ stub I_RpcServerAllocateIpPort
+# I_RpcServerCheckClientRestriction
@ stub I_RpcServerInqAddressChangeFn
@ stub I_RpcServerInqLocalConnAddress # wxp
@ stub I_RpcServerInqTransportType
+# I_RpcServerIsClientDisconnected
@ stub I_RpcServerRegisterForwardFunction
@ stub I_RpcServerSetAddressChangeFn
-@ stdcall I_RpcServerStartListening(ptr) # win9x
-@ stdcall I_RpcServerStopListening() # win9x
@ stub I_RpcServerUseProtseq2A
@ stub I_RpcServerUseProtseq2W
@ stub I_RpcServerUseProtseqEp2A
@ stub I_RpcServerUseProtseqEp2W
+# I_RpcSessionStrictContextHandle
@ stub I_RpcSetAsyncHandle
@ stub I_RpcSsDontSerializeContext
@ stub I_RpcSystemFunction001 # wxp (oh, brother!)
@ stub I_RpcTransIoCancelled
@ stub I_RpcTransServerNewConnection
@ stub I_RpcTurnOnEEInfoPropagation # wxp
-@ stdcall I_RpcWindowProc(ptr long long long) # win9x
@ stub I_UuidCreate
@ stub MIDL_wchar_strcpy
@ stub MIDL_wchar_strlen
@ stdcall NdrAllocate(ptr long)
@ varargs NdrAsyncClientCall(ptr ptr)
@ stub NdrAsyncServerCall
-@ stdcall NdrAsyncStubCall(ptr ptr ptr ptr)
@ stdcall NdrByteCountPointerBufferSize(ptr ptr ptr)
@ stdcall NdrByteCountPointerFree(ptr ptr ptr)
@ stdcall NdrByteCountPointerMarshall(ptr ptr ptr)
@ stdcall NdrCStdStubBuffer2_Release(ptr ptr)
@ stdcall NdrCStdStubBuffer_Release(ptr ptr)
@ stdcall NdrClearOutParameters(ptr ptr ptr)
-@ varargs NdrClientCall2(ptr ptr)
@ varargs -arch=i386 NdrClientCall(ptr ptr) NdrClientCall2
+@ varargs NdrClientCall2(ptr ptr)
@ stdcall NdrClientContextMarshall(ptr ptr long)
@ stdcall NdrClientContextUnmarshall(ptr ptr ptr)
@ stub NdrClientInitialize
@ stdcall NdrCorrelationFree(ptr)
@ stdcall NdrCorrelationInitialize(ptr ptr long long)
@ stdcall NdrCorrelationPass(ptr)
+# NdrCreateServerInterfaceFromStub
@ stub NdrDcomAsyncClientCall
@ stub NdrDcomAsyncStubCall
@ stdcall NdrDllCanUnloadNow(ptr)
@ stdcall NdrFullPointerXlatInit(long long)
@ stdcall NdrGetBuffer(ptr long ptr)
@ stub NdrGetDcomProtocolVersion
-@ stub NdrGetPartialBuffer
-@ stub NdrGetPipeBuffer
@ stub NdrGetSimpleTypeBufferAlignment # wxp
@ stub NdrGetSimpleTypeBufferSize # wxp
@ stub NdrGetSimpleTypeMemorySize # wxp
@ stub NdrGetTypeFlags # wxp
@ stdcall NdrGetUserMarshalInfo(ptr long ptr)
-@ stub NdrHardStructBufferSize #(ptr ptr ptr)
-@ stub NdrHardStructFree #(ptr ptr ptr)
-@ stub NdrHardStructMarshall #(ptr ptr ptr)
-@ stub NdrHardStructMemorySize #(ptr ptr)
-@ stub NdrHardStructUnmarshall #(ptr ptr ptr long)
@ stdcall NdrInterfacePointerBufferSize(ptr ptr ptr)
@ stdcall NdrInterfacePointerFree(ptr ptr ptr)
@ stdcall NdrInterfacePointerMarshall(ptr ptr ptr)
@ stdcall NdrInterfacePointerMemorySize(ptr ptr)
@ stdcall NdrInterfacePointerUnmarshall(ptr ptr ptr long)
-@ stub NdrIsAppDoneWithPipes
@ stdcall NdrMapCommAndFaultStatus(ptr ptr ptr long)
-@ stub NdrMarkNextActivePipe
-@ stub NdrMesProcEncodeDecode2
@ varargs NdrMesProcEncodeDecode(ptr ptr ptr)
+@ stub NdrMesProcEncodeDecode2
@ stub NdrMesSimpleTypeAlignSize
@ stub NdrMesSimpleTypeDecode
@ stub NdrMesSimpleTypeEncode
@ stub NdrPartialIgnoreClientMarshall # wxp
@ stub NdrPartialIgnoreServerInitialize # wxp
@ stub NdrPartialIgnoreServerUnmarshall # wxp
-@ stub NdrPipePull
-@ stub NdrPipePush
-@ stub NdrPipeSendReceive
-@ stub NdrPipesDone
-@ stub NdrPipesInitialize
@ stdcall NdrPointerBufferSize(ptr ptr ptr)
@ stdcall NdrPointerFree(ptr ptr ptr)
@ stdcall NdrPointerMarshall(ptr ptr ptr)
@ stub RpcErrorClearInformation # wxp
@ stdcall RpcErrorEndEnumeration(ptr)
@ stdcall RpcErrorGetNextRecord(ptr long ptr)
+# RpcErrorGetNumberOfRecords
@ stdcall RpcErrorLoadErrorInfo(ptr long ptr)
-@ stub RpcErrorNumberOfRecords # wxp
@ stub RpcErrorResetEnumeration # wxp
@ stdcall RpcErrorSaveErrorInfo(ptr ptr ptr)
@ stdcall RpcErrorStartEnumeration(ptr)
@ stub RpcFreeAuthorizationContext # wxp
@ stdcall RpcGetAsyncCallStatus(ptr) RpcAsyncGetCallStatus
+# RpcGetAuthorizationContextForClient
@ stub RpcIfIdVectorFree
@ stub RpcIfInqId
@ stdcall RpcImpersonateClient(ptr)
npc->pipe = pipe;
return RPC_S_OK;
-@@ -308,18 +306,59 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc
+@@ -308,18 +306,64 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc
static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection)
{
RpcConnection_np *npc = (RpcConnection_np *) Connection;
+ DWORD bufLen = sizeof(ComputerName)/sizeof(ComputerName[0]);
RPC_STATUS r;
LPSTR pname;
++ LPSTR NetworkAddr;
+ INT size;
/* already connected? */
+ }
+ else
+ {
++ NetworkAddr = Connection->NetworkAddr;
++ if (NetworkAddr[0] == '\\' && NetworkAddr[1] == '\\')
++ NetworkAddr += 2;
++
+ if (GetComputerNameA(ComputerName, &bufLen))
+ {
-+ if (stricmp(ComputerName, Connection->NetworkAddr) == 0)
++ if (stricmp(ComputerName, NetworkAddr) == 0)
+ {
+ bUseLocalName = TRUE;
+ size += strlen(local);
+ else
+ {
+ bUseLocalName = FALSE;
-+ size += strlen(Connection->NetworkAddr);
++ size += strlen(NetworkAddr);
+ }
+ }
+ else
+ {
+ bUseLocalName = FALSE;
-+ size += strlen(Connection->NetworkAddr);
++ size += strlen(NetworkAddr);
+ }
+ }
+
+ if (bUseLocalName)
+ strcat(pname, local);
+ else
-+ strcat(pname, Connection->NetworkAddr);
++ strcat(pname, NetworkAddr);
+ strcat(pname, Connection->Endpoint);
+ r = rpcrt4_conn_open_pipe(Connection, pname, TRUE);
I_RpcFree(pname);
return r;
-@@ -368,9 +407,9 @@ static void rpcrt4_conn_np_handoff(RpcCo
+@@ -368,9 +412,9 @@ static void rpcrt4_conn_np_handoff(RpcCo
* to the child, then reopen the server binding to continue listening */
new_npc->pipe = old_npc->pipe;
old_npc->listening = FALSE;
}
-@@ -415,11 +454,17 @@ static int rpcrt4_conn_np_read(RpcConnec
+@@ -415,11 +459,17 @@ static int rpcrt4_conn_np_read(RpcConnec
char *buf = buffer;
BOOL ret = TRUE;
unsigned int bytes_left = count;
return ret ? count : -1;
}
-@@ -437,16 +483,23 @@ static int rpcrt4_conn_np_write(RpcConne
+@@ -437,16 +488,23 @@ static int rpcrt4_conn_np_write(RpcConne
const char *buf = buffer;
BOOL ret = TRUE;
unsigned int bytes_left = count;
return ret ? count : -1;
}
-@@ -458,9 +511,9 @@ static int rpcrt4_conn_np_close(RpcConne
+@@ -458,9 +516,9 @@ static int rpcrt4_conn_np_close(RpcConne
CloseHandle(npc->pipe);
npc->pipe = 0;
}
}
return 0;
}
-@@ -664,7 +717,7 @@ static void *rpcrt4_protseq_np_get_wait_
+@@ -664,7 +722,7 @@ static void *rpcrt4_protseq_np_get_wait_
conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
while (conn) {
rpcrt4_conn_listen_pipe(conn);
(*count)++;
conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
}
-@@ -685,7 +738,7 @@ static void *rpcrt4_protseq_np_get_wait_
+@@ -685,7 +743,7 @@ static void *rpcrt4_protseq_np_get_wait_
*count = 1;
conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
while (conn) {
(*count)++;
conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
}
-@@ -732,18 +785,12 @@ static int rpcrt4_protseq_np_wait_for_ne
+@@ -732,18 +790,12 @@ static int rpcrt4_protseq_np_wait_for_ne
EnterCriticalSection(&protseq->cs);
conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
while (conn) {
LARGE_INTEGER SystemTime;
NTSTATUS Status;
+ DBG_UNREFERENCED_LOCAL_VARIABLE(StoredLmPresent);
+ DBG_UNREFERENCED_LOCAL_VARIABLE(StoredNtPresent);
+ DBG_UNREFERENCED_LOCAL_VARIABLE(StoredLmEmpty);
+
TRACE("(%p %u %p %p %u %p %p %u %p %u %p)\n",
UserHandle, LmPresent, OldLmEncryptedWithNewLm, NewLmEncryptedWithOldLm,
NtPresent, OldNtEncryptedWithNewNt, NewNtEncryptedWithOldNt, NtCrossEncryptionPresent,
@ stub pSetupVerifyQueuedCatalogs
@ stub pSetupWriteLogEntry
@ stub pSetupWriteLogError
-
-# Unknown functions, they are not present in Win2003 SP1
-@ stdcall AssertFail(str long str)
-@ stub CM_Remove_Unmarked_Children
-@ stub CM_Remove_Unmarked_Children_Ex
-@ stub CM_Reset_Children_Marks
-@ stub CM_Reset_Children_Marks_Ex
-@ stdcall CaptureStringArg(wstr ptr)
-@ stdcall DelayedMove(wstr wstr)
-@ stub DelimStringToMultiSz
-@ stub DestroyTextFileReadBuffer
-@ stdcall FileExists(wstr ptr)
-@ stub GetNewInfName
-@ stdcall GetSetFileTimestamp(wstr ptr ptr ptr long)
-@ stub LookUpStringInTable
-@ stub MemoryInitialize
-@ stub MultiSzFromSearchControl
-@ stdcall QueryRegistryValue(long wstr ptr ptr ptr)
-@ stub ReadAsciiOrUnicodeTextFile
-# Yes, Microsoft really misspelled this one!
-@ stdcall RetreiveFileSecurity(wstr ptr)
-@ stub SearchForInfFile
-@ stdcall StampFileSecurity(wstr ptr)
-@ stdcall TakeOwnershipOfFile(wstr)
-@ stub pSetupDirectoryIdToPath
-@ stub pSetupGetOsLoaderDriveAndPath
-@ stub pSetupGetVersionDatum
-@ stub pSetupSetSystemSourceFlags
add_library(shell32 SHARED
${SOURCE}
+ vista.c
shell32.rc
${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
{
- /*
- * We should use IShellWindows interface here in order to attempt to
+ /*
+ * We should use IShellWindows interface here in order to attempt to
* find an open shell window that shows the requested pidl and activate it
*/
rcDesktop.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
/* FIXME: Update work area */
+ DBG_UNREFERENCED_LOCAL_VARIABLE(rcDesktop);
}
break;
}
/* Copy static verbs from Classes\Applications key */
- LONG Result = RegCopyTreeW(hSrcKey, NULL, hDestKey);
+ /* FIXME: SHCopyKey does not copy the security attributes of the keys */
+ LSTATUS Result = SHCopyKeyW(hSrcKey, NULL, hDestKey, 0);
RegCloseKey(hDestKey);
RegCloseKey(hSrcKey);
RegCloseKey(hKey);
if (Result != ERROR_SUCCESS)
{
- ERR("RegCopyTreeW failed\n");
+ ERR("SHCopyKeyW failed\n");
return FALSE;
}
startup.wShowWindow = psei->nShow;
dwCreationFlags = CREATE_UNICODE_ENVIRONMENT;
if (!(psei->fMask & SEE_MASK_NO_CONSOLE))
- dwCreationFlags |= CREATE_NEW_CONSOLE;
+ dwCreationFlags |= CREATE_NEW_CONSOLE;
startup.lpTitle = (LPWSTR)(psei->fMask & (SEE_MASK_HASLINKNAME | SEE_MASK_HASTITLE) ? psei->lpClass : NULL);
if (psei->fMask & SEE_MASK_HASLINKNAME)
lpFile = xlpFile;
/* The file was found in one of the directories in the system-wide search path */
}
-
+
attribs = GetFileAttributesW(lpFile);
if (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY))
{
assert(ptr);
*ptr = 0;
}
-
+
static const WCHAR wTopic[] = L"\\topic";
if (strlenW(wTopic) + 1 > endkeyLen)
{
DWORD resultLen;
BOOL done;
UINT_PTR rslt;
-
+
/* FIXME: remove following block when SHELL_quote_and_execute supports hkeyClass parameter */
if (cmask != SEE_MASK_CLASSNAME)
{
ERR("Argify buffer not large enough... truncating\n");
return execfunc(wcmd, NULL, FALSE, psei, psei_out);
}
-
+
strcpyW(classname, psei->lpClass);
rslt = SHELL_FindExecutableByVerb(psei->lpVerb, NULL, classname, execCmd, sizeof(execCmd));
Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_EXEC;
//if (SHOpenWithDialog(sei_tmp.hwnd, &Info) != S_OK)
+ DBG_UNREFERENCED_LOCAL_VARIABLE(Info);
do_error_dialog(retval, sei_tmp.hwnd, wszApplicationName);
}
HeapFree(GetProcessHeap(), 0, wszApplicationName);
Info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_EXEC;
//if (SHOpenWithDialog(sei_tmp.hwnd, &Info) != S_OK)
+ DBG_UNREFERENCED_LOCAL_VARIABLE(Info);
do_error_dialog(retval, sei_tmp.hwnd, wszApplicationName);
}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: Copied from advapi32/reg/reg.c
+ * PURPOSE: Registry functions
+ * PROGRAMMER: Ariadne ( ariadne@xs4all.nl)
+ * Thomas Weidenmueller <w3seek@reactos.com>
+ * UPDATE HISTORY:
+ * Created 01/11/98
+ * 19990309 EA Stubs
+ * 20050502 Fireball imported some stuff from WINE
+ */
+
+/* FIXME: This file should go away once we properly handle Vista+ APIs */
+
+#include <stdarg.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+#include <winuser.h>
+#define NTOS_MODE_USER
+#include <ndk/rtlfuncs.h>
+
+#include <wine/debug.h>
+#include <wine/unicode.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(shell);
+
+/******************************************************************************
+ * load_string [Internal]
+ *
+ * This is basically a copy of user32/resource.c's LoadStringW. Necessary to
+ * avoid importing user32, which is higher level than advapi32. Helper for
+ * RegLoadMUIString.
+ */
+static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
+{
+ HGLOBAL hMemory;
+ HRSRC hResource;
+ WCHAR *pString;
+ int idxString;
+
+ /* Negative values have to be inverted. */
+ if (HIWORD(resId) == 0xffff)
+ resId = (UINT)(-((INT)resId));
+
+ /* Load the resource into memory and get a pointer to it. */
+ hResource = FindResourceW(hModule, MAKEINTRESOURCEW(LOWORD(resId >> 4) + 1), (LPWSTR)RT_STRING);
+ if (!hResource) return 0;
+ hMemory = LoadResource(hModule, hResource);
+ if (!hMemory) return 0;
+ pString = LockResource(hMemory);
+
+ /* Strings are length-prefixed. Lowest nibble of resId is an index. */
+ idxString = resId & 0xf;
+ while (idxString--) pString += *pString + 1;
+
+ /* If no buffer is given, return length of the string. */
+ if (!pwszBuffer) return *pString;
+
+ /* Else copy over the string, respecting the buffer size. */
+ cMaxChars = (*pString < cMaxChars) ? *pString : (cMaxChars - 1);
+ if (cMaxChars >= 0)
+ {
+ memcpy(pwszBuffer, pString+1, cMaxChars * sizeof(WCHAR));
+ pwszBuffer[cMaxChars] = L'\0';
+ }
+
+ return cMaxChars;
+}
+
+/************************************************************************
+ * RegLoadMUIStringW
+ *
+ * @implemented
+ */
+LONG WINAPI
+RegLoadMUIStringW(IN HKEY hKey,
+ IN LPCWSTR pszValue OPTIONAL,
+ OUT LPWSTR pszOutBuf,
+ IN DWORD cbOutBuf,
+ OUT LPDWORD pcbData OPTIONAL,
+ IN DWORD Flags,
+ IN LPCWSTR pszDirectory OPTIONAL)
+{
+ DWORD dwValueType, cbData;
+ LPWSTR pwszTempBuffer = NULL, pwszExpandedBuffer = NULL;
+ LONG result;
+
+ /* Parameter sanity checks. */
+ if (!hKey || !pszOutBuf)
+ return ERROR_INVALID_PARAMETER;
+
+ if (pszDirectory && *pszDirectory)
+ {
+ FIXME("BaseDir parameter not yet supported!\n");
+ return ERROR_INVALID_PARAMETER;
+ }
+
+ /* Check for value existence and correctness of it's type, allocate a buffer and load it. */
+ result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, NULL, &cbData);
+ if (result != ERROR_SUCCESS) goto cleanup;
+ if (!(dwValueType == REG_SZ || dwValueType == REG_EXPAND_SZ) || !cbData)
+ {
+ result = ERROR_FILE_NOT_FOUND;
+ goto cleanup;
+ }
+ pwszTempBuffer = HeapAlloc(GetProcessHeap(), 0, cbData);
+ if (!pwszTempBuffer)
+ {
+ result = ERROR_NOT_ENOUGH_MEMORY;
+ goto cleanup;
+ }
+ result = RegQueryValueExW(hKey, pszValue, NULL, &dwValueType, (LPBYTE)pwszTempBuffer, &cbData);
+ if (result != ERROR_SUCCESS) goto cleanup;
+
+ /* Expand environment variables, if appropriate, or copy the original string over. */
+ if (dwValueType == REG_EXPAND_SZ)
+ {
+ cbData = ExpandEnvironmentStringsW(pwszTempBuffer, NULL, 0) * sizeof(WCHAR);
+ if (!cbData) goto cleanup;
+ pwszExpandedBuffer = HeapAlloc(GetProcessHeap(), 0, cbData);
+ if (!pwszExpandedBuffer)
+ {
+ result = ERROR_NOT_ENOUGH_MEMORY;
+ goto cleanup;
+ }
+ ExpandEnvironmentStringsW(pwszTempBuffer, pwszExpandedBuffer, cbData);
+ }
+ else
+ {
+ pwszExpandedBuffer = HeapAlloc(GetProcessHeap(), 0, cbData);
+ memcpy(pwszExpandedBuffer, pwszTempBuffer, cbData);
+ }
+
+ /* If the value references a resource based string, parse the value and load the string.
+ * Else just copy over the original value. */
+ result = ERROR_SUCCESS;
+ if (*pwszExpandedBuffer != L'@') /* '@' is the prefix for resource based string entries. */
+ {
+ lstrcpynW(pszOutBuf, pwszExpandedBuffer, cbOutBuf / sizeof(WCHAR));
+ }
+ else
+ {
+ WCHAR *pComma = wcsrchr(pwszExpandedBuffer, L',');
+ UINT uiStringId;
+ HMODULE hModule;
+
+ /* Format of the expanded value is 'path_to_dll,-resId' */
+ if (!pComma || pComma[1] != L'-')
+ {
+ result = ERROR_BADKEY;
+ goto cleanup;
+ }
+
+ uiStringId = _wtoi(pComma+2);
+ *pComma = L'\0';
+
+ hModule = LoadLibraryExW(pwszExpandedBuffer + 1, NULL, LOAD_LIBRARY_AS_DATAFILE);
+ if (!hModule || !load_string(hModule, uiStringId, pszOutBuf, cbOutBuf / sizeof(WCHAR)))
+ result = ERROR_BADKEY;
+ FreeLibrary(hModule);
+ }
+
+cleanup:
+ HeapFree(GetProcessHeap(), 0, pwszTempBuffer);
+ HeapFree(GetProcessHeap(), 0, pwszExpandedBuffer);
+ return result;
+}
+
+/************************************************************************
+ * RegLoadMUIStringA
+ *
+ * @implemented
+ */
+LONG WINAPI
+RegLoadMUIStringA(IN HKEY hKey,
+ IN LPCSTR pszValue OPTIONAL,
+ OUT LPSTR pszOutBuf,
+ IN DWORD cbOutBuf,
+ OUT LPDWORD pcbData OPTIONAL,
+ IN DWORD Flags,
+ IN LPCSTR pszDirectory OPTIONAL)
+{
+ UNICODE_STRING valueW, baseDirW;
+ WCHAR *pwszBuffer;
+ DWORD cbData = cbOutBuf * sizeof(WCHAR);
+ LONG result;
+
+ valueW.Buffer = baseDirW.Buffer = pwszBuffer = NULL;
+ if (!RtlCreateUnicodeStringFromAsciiz(&valueW, pszValue) ||
+ !RtlCreateUnicodeStringFromAsciiz(&baseDirW, pszDirectory) ||
+ !(pwszBuffer = HeapAlloc(GetProcessHeap(), 0, cbData)))
+ {
+ result = ERROR_NOT_ENOUGH_MEMORY;
+ goto cleanup;
+ }
+
+ result = RegLoadMUIStringW(hKey, valueW.Buffer, pwszBuffer, cbData, NULL, Flags,
+ baseDirW.Buffer);
+
+ if (result == ERROR_SUCCESS)
+ {
+ cbData = WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszOutBuf, cbOutBuf, NULL, NULL);
+ if (pcbData)
+ *pcbData = cbData;
+ }
+
+cleanup:
+ HeapFree(GetProcessHeap(), 0, pwszBuffer);
+ RtlFreeUnicodeString(&baseDirW);
+ RtlFreeUnicodeString(&valueW);
+
+ return result;
+}
#include "wincodecs_private.h"
+#include <shlwapi.h>
+
/***********************************************************************
* interface for self-registering
*/
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(coclass_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
- res = RegDeleteTreeW(instance_key, buf);
+ res = SHDeleteKeyW(instance_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(coclass_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
- res = RegDeleteTreeW(instance_key, buf);
+ res = SHDeleteKeyW(instance_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(coclass_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
- res = RegDeleteTreeW(instance_key, buf);
+ res = SHDeleteKeyW(instance_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(coclass_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
- res = RegDeleteTreeW(instance_key, buf);
+ res = SHDeleteKeyW(instance_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(coclass_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
- res = RegDeleteTreeW(instance_key, buf);
+ res = SHDeleteKeyW(instance_key, buf);
if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS;
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
for (; res == ERROR_SUCCESS && list->clsid; list++)
{
StringFromGUID2(list->clsid, buf, 39);
- res = RegDeleteTreeW(instance_key, buf);
+ res = SHDeleteKeyW(instance_key, buf);
}
RegCloseKey(instance_key);
RegCloseKey(categories_key);
StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
- res = RegDeleteTreeW(coclass_key, buf);
+ res = SHDeleteKeyW(coclass_key, buf);
RegCloseKey(coclass_key);
add_pch(winmm winemm.h SOURCE)
add_subdirectory(midimap)
add_cd_file(TARGET winmm DESTINATION reactos/system32 FOR all)
+
+if(NOT MSVC)
+ add_target_compile_flags(winmm "-Wno-unused-but-set-variable")
+endif()
struct addrinfo *ret = NULL, *ai;
ULONG addr;
USHORT port;
+ PCHAR pc;
struct servent *se;
char *proto;
LPPROTOENT pent;
if (servname)
{
/* converting port number */
- port = strtoul(servname, NULL, 10);
+ port = strtoul(servname, &pc, 10);
/* service name was specified? */
- if (port == 0)
+ if (*pc != ANSI_NULL)
{
/* protocol was specified? */
if (hints && hints->ai_protocol)
#include "ws2_32.h"
#include <ws2tcpip.h>
+#include <strsafe.h>
/*
* @implemented
DWORD servlen,
INT flags)
{
+ if (!host && serv && flags & NI_NUMERICSERV)
+ {
+ const struct sockaddr_in *sa_in = (const struct sockaddr_in *)sa;
+ if (salen >= sizeof(*sa_in) && sa->sa_family == AF_INET)
+ {
+ StringCbPrintfA(serv, servlen, "%u", sa_in->sin_port);
+ return 0;
+ }
+ }
+
UNIMPLEMENTED
WSASetLastError(WSASYSCALLFAILURE);
spec2def(ksecdd.sys ksecdd.spec)
-
include_directories(
${REACTOS_SOURCE_DIR}/include/reactos/drivers/ksecdd
${REACTOS_SOURCE_DIR}/lib/cryptlib)
dispatch.c
random.c
stubs.c
- ksecdd.rc)
+ ksecdd.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/ksecdd.def)
add_library(ksecdd SHARED ${SOURCE})
target_link_libraries(ksecdd cryptlib pseh)
return 0;
}
+PSecurityFunctionTableW
+SEC_ENTRY
+InitSecurityInterfaceW(void)
+{
+
+ UNIMPLEMENTED_DBGBREAK();
+ return NULL;
+}
+
VOID
SEC_ENTRY
KSecRegisterSecurityProvider(VOID)
}
VOID
-NTAPI
+__cdecl
DebugFunction(
IN LPCSTR FormatStr, ...)
{
PLIST_ENTRY Entry;
PSYMBOLIC_LINK_ENTRY SymEntry;
BOOLEAN Found;
- HKEY hKey;
+ HANDLE hKey;
NTSTATUS Status = STATUS_SUCCESS;
IKsFilterFactoryImpl * Factory = (IKsFilterFactoryImpl*)CONTAINING_RECORD(FilterFactory, IKsFilterFactoryImpl, FilterFactory);
/* done */
return Status;
-}
+}
} else {
RtlZeroMemory(modeData, sizeof(MODE_POWER_CONDITION_PAGE));
modeData->PageCode = MODE_PAGE_POWER_CONDITION;
- modeData->PageLength = sizeof(MODE_PAGE_POWER_CONDITION)-sizeof(MODE_PARAMETER_HEADER);
+ modeData->PageLength = sizeof(MODE_POWER_CONDITION_PAGE)-sizeof(MODE_PARAMETER_HEADER);
modeData->Byte3.Fields.Idle = LunExt->PowerState <= StartStop_Power_Idle;
modeData->Byte3.Fields.Standby = LunExt->PowerState == StartStop_Power_Standby;
Srb->DataTransferLength = sizeof(MODE_POWER_CONDITION_PAGE);
+++ /dev/null
-Index: atapi.h
-===================================================================
---- atapi.h (revision 38451)
-+++ atapi.h (working copy)
-@@ -138,6 +138,10 @@
-
- #else // _DEBUG
-
-+#ifdef KdPrint
-+#undef KdPrint
-+#endif
-+
- #define PRINT_PREFIX "UniATA: "
-
- //#define KdPrint3(_x_) {if(LOG_ON_RAISED_IRQL_W2K || MajorVersion < 0x05 || KeGetCurrentIrql() <= 2){/*DbgPrint("%x: ", PsGetCurrentThread()) ;*/ DbgPrint _x_ ; if(g_LogToDisplay){ PrintNtConsole _x_ ;} }}
-@@ -1063,8 +1067,8 @@
-
- ULONG
- AtapiParseArgumentString(
-- IN PCHAR String,
-- IN PCHAR KeyWord
-+ IN PCCH String,
-+ IN PCCH KeyWord
- );
-
- BOOLEAN
-@@ -1202,15 +1206,15 @@
- IN PVOID HwDeviceExtension,
- IN ULONG chan,
- IN ULONG dev,
-- IN PWSTR Name,
-+ IN PCWSTR Name,
- IN ULONG Default
- );
-
- extern ULONG
- AtapiRegCheckParameterValue(
- IN PVOID HwDeviceExtension,
-- IN PWSTR PathSuffix,
-- IN PWSTR Name,
-+ IN PCWSTR PathSuffix,
-+ IN PCWSTR Name,
- IN ULONG Default
- );
-
-@@ -1220,7 +1224,7 @@
- VOID
- _cdecl
- _PrintNtConsole(
-- PCHAR DebugMessage,
-+ PCCH DebugMessage,
- ...
- );
-
-Index: id_sata.cpp
-===================================================================
---- id_sata.cpp (revision 38451)
-+++ id_sata.cpp (working copy)
-@@ -7,7 +7,7 @@
- )
- {
- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
-- ULONG Channel = deviceExtension->Channel + lChannel;
-+ //ULONG Channel = deviceExtension->Channel + lChannel;
- PHW_CHANNEL chan = &deviceExtension->chan[lChannel];
- SATA_SSTATUS_REG SStatus;
- ULONG i;
-@@ -126,7 +126,7 @@
- {
- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
- PHW_CHANNEL chan = &deviceExtension->chan[lChannel];
-- ULONG ChipFlags = deviceExtension->HwFlags & CHIPFLAG_MASK;
-+ //ULONG ChipFlags = deviceExtension->HwFlags & CHIPFLAG_MASK;
- SATA_SSTATUS_REG SStatus;
- SATA_SERROR_REG SError;
-
-Index: ntddk_ex.h
-===================================================================
---- ntddk_ex.h (revision 38451)
-+++ ntddk_ex.h (working copy)
-@@ -1,15 +1,12 @@
- #ifndef __NTDDK_EX__H__
- #define __NTDDK_EX__H__
-
--#ifndef __REACTOS__
-+#ifdef ASSERT
- #undef ASSERT
--#define ASSERT
--#else
--#undef ASSERT
--#define ASSERT //(x) if (!(x)) {RtlAssert("#x",__FILE__,__LINE__, ""); }
--#endif //__REACTOS__
-+#define ASSERT(x) ((void)0)
-+// #define ASSERT(x) if (!(x)) { RtlAssert("#x",__FILE__,__LINE__, ""); }
-+#endif
-
--
- #ifndef FILE_CHARACTERISTIC_PNP_DEVICE // DDK 2003
-
- #define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800
-Index: id_dma.cpp
-===================================================================
---- id_dma.cpp (revision 38451)
-+++ id_dma.cpp (working copy)
-@@ -219,7 +219,7 @@
- PHW_CHANNEL chan = &(deviceExtension->chan[lChannel]);
- PATA_REQ AtaReq = (PATA_REQ)(Srb->SrbExtension);
- BOOLEAN use_DB_IO = FALSE;
-- BOOLEAN use_AHCI = FALSE;
-+ //BOOLEAN use_AHCI = FALSE;
- ULONG orig_count = count;
- ULONG max_entries = (deviceExtension->HwFlags & UNIATA_AHCI) ? ATA_AHCI_DMA_ENTRIES : ATA_DMA_ENTRIES;
-
-@@ -281,7 +281,7 @@
- if(!dma_count || ((LONG)(dma_base) == -1)) {
- KdPrint2((PRINT_PREFIX "AtapiDmaSetup: No 1st block\n" ));
- //AtaReq->dma_base = NULL;
-- AtaReq->ahci_base64 = NULL;
-+ AtaReq->ahci_base64 = 0;
- return FALSE;
- }
-
-@@ -303,7 +303,7 @@
- if (i >= max_entries) {
- KdPrint2((PRINT_PREFIX "too many segments in DMA table\n" ));
- //AtaReq->dma_base = NULL;
-- AtaReq->ahci_base64 = NULL;
-+ AtaReq->ahci_base64 = 0;
- return FALSE;
- }
- KdPrint2((PRINT_PREFIX " get Phys(data[n]=%x)\n", data ));
-@@ -321,7 +321,7 @@
- } else
- if(!dma_count || !dma_base || ((LONG)(dma_base) == -1)) {
- //AtaReq->dma_base = NULL;
-- AtaReq->ahci_base64 = NULL;
-+ AtaReq->ahci_base64 = 0;
- KdPrint2((PRINT_PREFIX "AtapiDmaSetup: No NEXT block\n" ));
- return FALSE;
- }
-@@ -596,7 +596,7 @@
- )
- {
- PHW_LU_EXTENSION LunExt = &(deviceExtension->lun[ldev]);
-- CHAR apiomode;
-+ SCHAR apiomode;
-
- apiomode = (CHAR)AtaPioMode(&(LunExt->IdentifyData));
-
-@@ -612,7 +612,7 @@
- }
-
- if((deviceExtension->HbaCtrlFlags & HBAFLAGS_DMA_DISABLED_LBA48) &&
-- (AtaReq->lba >= ATA_MAX_LBA28) &&
-+ (AtaReq->lba >= (LONGLONG)ATA_MAX_LBA28) &&
- (LunExt->TransferMode > ATA_PIO5) ) {
- KdPrint2((PRINT_PREFIX
- "AtapiDmaReinit: FORCE_DOWNRATE on Device %d for LBA48\n", ldev & 1));
-@@ -623,7 +623,7 @@
- if(AtaReq->Flags & REQ_FLAG_FORCE_DOWNRATE) {
- KdPrint2((PRINT_PREFIX
- "AtapiDmaReinit: FORCE_DOWNRATE on Device %d\n", ldev & 1));
-- if(AtaReq->lba >= ATA_MAX_LBA28) {
-+ if(AtaReq->lba >= (LONGLONG)ATA_MAX_LBA28) {
- limit_lba48:
- LunExt->DeviceFlags |= REQ_FLAG_FORCE_DOWNRATE_LBA48;
- limit_pio:
-@@ -754,9 +754,9 @@
- IN ULONG DeviceNumber,
- IN ULONG lChannel, // logical channel,
- // is always 0 except simplex-only controllers
-- IN CHAR apiomode,
-- IN CHAR wdmamode,
-- IN CHAR udmamode
-+ IN SCHAR apiomode,
-+ IN SCHAR wdmamode,
-+ IN SCHAR udmamode
- )
- {
- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
-@@ -1488,7 +1488,7 @@
- AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 + apiomode);
-
- SetPciConfig1(mreg, mode | (mask & 0x11));
-- SetPciConfig2(ureg - 0x8, sil_pio_modes[i]);
-+ SetPciConfig2(ureg - 0x8, sil_pio_modes[apiomode]);
- return;
-
- } else {
-@@ -1538,7 +1538,7 @@
- /*******/
- /* SiS */
- /*******/
-- PULONG sis_modes;
-+ PULONG sis_modes = NULL;
- static const ULONG sis_modes_new133[] =
- { 0x28269008, 0x0c266008, 0x04263008, 0x0c0a3008, 0x05093008,
- 0x22196008, 0x0c0a3008, 0x05093008, 0x050939fc, 0x050936ac,
-@@ -1553,9 +1553,9 @@
- { 0x00cb, 0x0067, 0x0044, 0x0033, 0x0031, 0x0044, 0x0033, 0x0031,
- 0x8b31, 0x8731, 0x8531, 0x8431, 0x8231, 0x8131 };
-
-- ULONG reg;
-+ ULONG reg = 0;
- UCHAR reg57;
-- ULONG reg_size;
-+ ULONG reg_size = 0;
- ULONG offs;
-
- switch(ChipType) {
-@@ -1731,8 +1731,8 @@
- AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 + apiomode);
- ChangePciConfig1(0x50, a | (1 << (dev + 3)) );
- GetPciConfig1(0x54 + offset, reg54);
-- if(reg54 < chtiming[i]) {
-- SetPciConfig1(0x54 + offset, chtiming[i]);
-+ if(reg54 < chtiming[apiomode]) {
-+ SetPciConfig1(0x54 + offset, chtiming[apiomode]);
- }
- return;
- }
-@@ -1901,7 +1901,7 @@
- ULONG ChipType = deviceExtension->HwFlags & CHIPTYPE_MASK;
- //ULONG ChipFlags = deviceExtension->HwFlags & CHIPFLAG_MASK;
-
-- ULONG timing;
-+ ULONG timing = 0;
-
- if(mode == ATA_PIO5)
- mode = ATA_PIO4;
-Index: id_badblock.cpp
-===================================================================
---- id_badblock.cpp (revision 38451)
-+++ id_badblock.cpp (working copy)
-@@ -159,7 +159,11 @@
- L"UniATA\\Parameters\\BadBlocks",
- QueryTable, 0, 0);
-
-+#ifdef _DEBUG
- KdPrint(( "InitBadBlocks returned: %#x\n", status));
-+#else
-+ UNREFERENCED_PARAMETER(status);
-+#endif
- } else {
-
- KdPrint(( "InitBadBlocks local\n"));
-Index: id_init.cpp
-===================================================================
---- id_init.cpp (revision 38451)
-+++ id_init.cpp (working copy)
-@@ -52,11 +52,11 @@
- )
- {
- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
-- ULONG slotNumber = deviceExtension->slotNumber;
-- ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
-+ //ULONG slotNumber = deviceExtension->slotNumber;
-+ //ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
- ULONG VendorID = deviceExtension->DevID & 0xffff;
-- ULONG DeviceID = (deviceExtension->DevID >> 16) & 0xffff;
-- ULONG RevID = deviceExtension->RevID;
-+ //ULONG DeviceID = (deviceExtension->DevID >> 16) & 0xffff;
-+ //ULONG RevID = deviceExtension->RevID;
- ULONG ChipType = deviceExtension->HwFlags & CHIPTYPE_MASK;
- ULONG ChipFlags= deviceExtension->HwFlags & CHIPFLAG_MASK;
-
-@@ -216,7 +216,7 @@
- PCI_DEV_HW_SPEC_BM( 0730, 1039, 0x00, ATA_UDMA5, "SiS 730" , SIS100OLD ),
-
- PCI_DEV_HW_SPEC_BM( 0646, 1039, 0x00, ATA_UDMA6, "SiS 645DX", SIS133NEW ),
--/* PCI_DEV_HW_SPEC_BM( 0645, 1039, 0x00, ATA_UDMA6, "SiS 645" , SIS133NEW ),
-+/* PCI_DEV_HW_SPEC_BM( 0645, 1039, 0x00, ATA_UDMA6, "SiS 645" , SIS133NEW ),*/
- /* PCI_DEV_HW_SPEC_BM( 0640, 1039, 0x00, ATA_UDMA4, "SiS 640" , SIS_SOUTH ),*/
- PCI_DEV_HW_SPEC_BM( 0635, 1039, 0x00, ATA_UDMA5, "SiS 635" , SIS100NEW ),
- PCI_DEV_HW_SPEC_BM( 0633, 1039, 0x00, ATA_UDMA5, "SiS 633" , SIS100NEW ),
-@@ -419,7 +419,7 @@
- BaseIoAddressBM = AtapiGetIoRange(HwDeviceExtension, ConfigInfo, pciData, SystemIoBusNumber,
- 4, 0, deviceExtension->NumberChannels*sizeof(IDE_BUSMASTER_REGISTERS));
- for(c=0; c<deviceExtension->NumberChannels; c++) {
-- ULONG unit01 = (c & 1);
-+ //ULONG unit01 = (c & 1);
- ULONG unit10 = (c & 2);
- chan = &deviceExtension->chan[c];
-
-@@ -987,7 +987,7 @@
- IN ULONG slotNumber
- )
- {
-- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
-+ //PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
- PCI_COMMON_CONFIG pciData;
- ULONG funcNumber;
- ULONG busDataRead;
-@@ -1039,7 +1039,7 @@
- IN ULONG c
- )
- {
-- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
-+ //PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
- PCI_COMMON_CONFIG pciData;
- ULONG funcNumber;
- ULONG busDataRead;
-@@ -1174,7 +1174,7 @@
- ULONG slotNumber = deviceExtension->slotNumber;
- ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
-
-- ULONG ChipType = deviceExtension->HwFlags & CHIPTYPE_MASK;
-+ //ULONG ChipType = deviceExtension->HwFlags & CHIPTYPE_MASK;
- PHW_CHANNEL chan;
- ULONG c; // logical channel (for Compatible Mode controllers)
- UCHAR tmp8;
-@@ -1332,7 +1332,9 @@
- ULONG slotNumber = deviceExtension->slotNumber;
- ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
- ULONG VendorID = deviceExtension->DevID & 0xffff;
-+#ifdef _DEBUG
- ULONG DeviceID = (deviceExtension->DevID >> 16) & 0xffff;
-+#endif
- ULONG RevID = deviceExtension->RevID;
- // ULONG i;
- // BUSMASTER_CONTROLLER_INFORMATION* DevTypeInfo;
-Index: id_ata.cpp
-===================================================================
---- id_ata.cpp (revision 38451)
-+++ id_ata.cpp (working copy)
-@@ -1864,7 +1864,9 @@
- ULONG slotNumber = deviceExtension->slotNumber;
- ULONG SystemIoBusNumber = deviceExtension->SystemIoBusNumber;
- ULONG VendorID = deviceExtension->DevID & 0xffff;
-+#ifdef _DEBUG
- ULONG DeviceID = (deviceExtension->DevID >> 16) & 0xffff;
-+#endif
- //ULONG RevID = deviceExtension->RevID;
- ULONG ChipFlags = deviceExtension->HwFlags & CHIPFLAG_MASK;
- UCHAR tmp8;
-@@ -2859,12 +2861,12 @@
- --*/
- ULONG
- AtapiParseArgumentString(
-- IN PCHAR String,
-- IN PCHAR KeyWord
-+ IN PCCH String,
-+ IN PCCH KeyWord
- )
- {
-- PCHAR cptr;
-- PCHAR kptr;
-+ PCCH cptr;
-+ PCCH kptr;
- ULONG value;
- ULONG stringLength = 0;
- ULONG keyWordLength = 0;
-@@ -2877,24 +2879,15 @@
- return 0;
- }
-
-- // Calculate the string length and lower case all characters.
-+ // Calculate the string length.
- cptr = String;
-- while (*cptr) {
-- if (*cptr >= 'A' && *cptr <= 'Z') {
-- *cptr = *cptr + ('a' - 'A');
-- }
-- cptr++;
-+ while (*cptr++) {
- stringLength++;
- }
-
-- // Calculate the keyword length and lower case all characters.
-- cptr = KeyWord;
-- while (*cptr) {
--
-- if (*cptr >= 'A' && *cptr <= 'Z') {
-- *cptr = *cptr + ('a' - 'A');
-- }
-- cptr++;
-+ // Calculate the keyword length.
-+ kptr = KeyWord;
-+ while (*kptr++) {
- keyWordLength++;
- }
-
-@@ -2920,18 +2913,21 @@
- }
-
- kptr = KeyWord;
-- while (*cptr++ == *kptr++) {
-+ while ((*cptr == *kptr) ||
-+ (*cptr <= 'Z' && *cptr + ('a' - 'A') == *kptr) ||
-+ (*cptr >= 'a' && *cptr - ('a' - 'A') == *kptr)) {
-+ cptr++;
-+ kptr++;
-
-- if (*(cptr - 1) == '\0') {
-+ if (*cptr == '\0') {
- // end of string
- return 0;
- }
- }
-
-- if (*(kptr - 1) == '\0') {
-+ if (*kptr == '\0') {
-
- // May have a match backup and check for blank or equals.
-- cptr--;
- while (*cptr == ' ' || *cptr == '\t') {
- cptr++;
- }
-@@ -2967,7 +2963,7 @@
- }
-
- value = 0;
-- if ((*cptr == '0') && (*(cptr + 1) == 'x')) {
-+ if ((*cptr == '0') && ((*(cptr + 1) == 'x') || (*(cptr + 1) == 'X'))) {
- // Value is in Hex. Skip the "0x"
- cptr += 2;
- for (index = 0; *(cptr + index); index++) {
-@@ -2983,6 +2979,8 @@
- } else {
- if ((*(cptr + index) >= 'a') && (*(cptr + index) <= 'f')) {
- value = (16 * value) + (*(cptr + index) - 'a' + 10);
-+ } else if ((*(cptr + index) >= 'A') && (*(cptr + index) <= 'F')) {
-+ value = (16 * value) + (*(cptr + index) - 'A' + 10);
- } else {
- // Syntax error, return not found.
- return 0;
-@@ -8752,10 +8750,10 @@
- ULONG
- AtapiRegCheckDevLunValue(
- IN PVOID HwDeviceExtension,
-- IN PWCHAR NamePrefix,
-+ IN PCWCH NamePrefix,
- IN ULONG chan,
- IN ULONG dev,
-- IN PWSTR Name,
-+ IN PCWSTR Name,
- IN ULONG Default
- )
- {
-@@ -8822,7 +8820,7 @@
- IN PVOID HwDeviceExtension,
- IN ULONG chan,
- IN ULONG dev,
-- IN PWSTR Name,
-+ IN PCWSTR Name,
- IN ULONG Default
- )
- {
-@@ -8940,8 +8938,8 @@
- ULONG
- AtapiRegCheckParameterValue(
- IN PVOID HwDeviceExtension,
-- IN PWSTR PathSuffix,
-- IN PWSTR Name,
-+ IN PCWSTR PathSuffix,
-+ IN PCWSTR Name,
- IN ULONG Default
- )
- {
-@@ -9108,7 +9106,7 @@
- VOID
- _cdecl
- _PrintNtConsole(
-- PCHAR DebugMessage,
-+ PCCH DebugMessage,
- ...
- )
- {
-Index: id_probe.cpp
-===================================================================
---- id_probe.cpp (revision 38451)
-+++ id_probe.cpp (working copy)
-@@ -76,7 +76,6 @@
- VOID
- AtapiDoNothing(VOID)
- {
-- ULONG i = 0;
- return;
- } // end AtapiDoNothing()
-
-@@ -504,8 +503,8 @@
- /* if(known) {
- RtlCopyMemory(newBMListPtr, (PVOID)&(BusMasterAdapters[i]), sizeof(BUSMASTER_CONTROLLER_INFORMATION));
- } else {*/
-- sprintf((PCHAR)vendorStrPtr, "%4.4x", VendorID);
-- sprintf((PCHAR)deviceStrPtr, "%4.4x", DeviceID);
-+ sprintf((PCHAR)vendorStrPtr, "%4.4lx", VendorID);
-+ sprintf((PCHAR)deviceStrPtr, "%4.4lx", DeviceID);
-
- RtlCopyMemory(&(newBMListPtr->VendorIdStr), (PCHAR)vendorStrPtr, 4);
- RtlCopyMemory(&(newBMListPtr->DeviceIdStr), (PCHAR)deviceStrPtr, 4);
-@@ -874,7 +873,11 @@
- BOOLEAN found = FALSE;
- BOOLEAN MasterDev;
- BOOLEAN simplexOnly = FALSE;
-+#ifndef UNIATA_CORE
-+#ifdef UNIATA_INIT_ON_PROBE
- BOOLEAN skip_find_dev = FALSE;
-+#endif
-+#endif
- BOOLEAN AltInit = FALSE;
-
- SCSI_PHYSICAL_ADDRESS IoBasePort1;
-@@ -1712,7 +1715,7 @@
- )
- {
- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
-- PHW_CHANNEL chan = NULL;
-+ //PHW_CHANNEL chan = NULL;
- // this buffer must be global for UNIATA_CORE build
- PCI_COMMON_CONFIG pciData;
-
-@@ -1743,8 +1746,8 @@
- BOOLEAN found = FALSE;
- BOOLEAN MasterDev;
- BOOLEAN simplexOnly = FALSE;
-- BOOLEAN skip_find_dev = FALSE;
-- BOOLEAN AltInit = FALSE;
-+ //BOOLEAN skip_find_dev = FALSE;
-+ //BOOLEAN AltInit = FALSE;
-
- PIDE_BUSMASTER_REGISTERS BaseIoAddressBM_0 = NULL;
-
-@@ -1797,7 +1800,7 @@
- &pciData,
- PCI_COMMON_HDR_LENGTH);
-
-- if (busDataRead < PCI_COMMON_HDR_LENGTH) {
-+ if (busDataRead < (ULONG)PCI_COMMON_HDR_LENGTH) {
- KdPrint2((PRINT_PREFIX "busDataRead < PCI_COMMON_HDR_LENGTH => SP_RETURN_ERROR\n"));
- goto exit_error;
- }
-@@ -2207,7 +2210,7 @@
- PHW_DEVICE_EXTENSION deviceExtension = (PHW_DEVICE_EXTENSION)HwDeviceExtension;
- PHW_CHANNEL chan;
- PULONG adapterCount = (PULONG)Context;
-- PUCHAR ioSpace;
-+ PUCHAR ioSpace = NULL;
- ULONG i;
- ULONG irq=0;
- ULONG portBase;
-@@ -2217,7 +2220,7 @@
- BOOLEAN preConfig = FALSE;
- //
- PIDE_REGISTERS_1 BaseIoAddress1;
-- PIDE_REGISTERS_2 BaseIoAddress2;
-+ PIDE_REGISTERS_2 BaseIoAddress2 = NULL;
-
- // The following table specifies the ports to be checked when searching for
- // an IDE controller. A zero entry terminates the search.
-Index: bm_devs.h
-===================================================================
---- bm_devs.h (revision 38451)
-+++ bm_devs.h (working copy)
-@@ -482,7 +482,7 @@
- { #idlo, 4, 0x##idlo, #idhi, 4, 0x##idhi, rev, mode, name, flags}
- #else
- #define PCI_DEV_HW_SPEC_BM(idhi, idlo, rev, mode, name, flags) \
-- { #idlo, 4, 0x##idlo, #idhi, 4, 0x##idhi, rev, mode, NULL, flags}
-+ { (PCHAR) #idlo, 4, 0x##idlo, (PCHAR) #idhi, 4, 0x##idhi, rev, mode, NULL, flags}
- #endif
-
- #define BMLIST_TERMINATOR (0xffffffffL)
-Index: bsmaster.h
-===================================================================
---- bsmaster.h (revision 38451)
-+++ bsmaster.h (working copy)
-@@ -987,7 +987,7 @@
- BOOLEAN opt_AtapiDmaRawRead; // default TRUE
- BOOLEAN opt_AtapiDmaReadWrite; // default TRUE
-
-- PCHAR FullDevName;
-+ PCCH FullDevName;
-
- } HW_DEVICE_EXTENSION, *PHW_DEVICE_EXTENSION;
-
-@@ -1172,9 +1172,9 @@
- IN ULONG DeviceNumber,
- IN ULONG lChannel, // logical channel,
- // is always 0 except simplex-only controllers
-- IN CHAR apiomode,
-- IN CHAR wdmamode,
-- IN CHAR udmamode
-+ IN SCHAR apiomode,
-+ IN SCHAR wdmamode,
-+ IN SCHAR udmamode
- );
-
- extern BOOLEAN NTAPI
#elif defined(_MSC_VER)
# define __CRT_INLINE __inline
#elif defined(__GNUC__)
-# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
+# if defined(__clang__) || ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
# define __CRT_INLINE extern inline __attribute__((__always_inline__,__gnu_inline__))
# else
# define __CRT_INLINE extern __inline__ __attribute__((__always_inline__))
#endif
#endif
+#undef _CRT_PACKING
+#define _CRT_PACKING 8
+#pragma pack(push,_CRT_PACKING)
+
/* Disable non-ANSI C definitions if compiling with __STDC__ */
//HACK: Disabled
//#if __STDC__
/** Properties ***************************************************************/
-#undef _CRT_PACKING
-#define _CRT_PACKING 8
-#pragma pack(push,_CRT_PACKING)
-
#ifndef _CRT_STRINGIZE
#define __CRT_STRINGIZE(_Value) #_Value
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
typedef unsigned short wctype_t;
#endif
+#ifdef __GNUC__
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST
+ typedef __builtin_va_list __gnuc_va_list;
+#endif
+#endif
+
+#ifndef _VA_LIST_DEFINED
+#define _VA_LIST_DEFINED
+#if defined(__GNUC__)
+ typedef __gnuc_va_list va_list;
+#elif defined(_MSC_VER)
+ typedef _Writable_bytes_(_Inexpressible_("length varies")) char * va_list;
+#endif
+#endif
+
#ifndef _ERRCODE_DEFINED
#define _ERRCODE_DEFINED
typedef int errcode;
_Inout_ struct _DISPATCHER_CONTEXT *_DispatcherContext,
_In_ unsigned __int64 _GlobalPointer);
-#elif defined(__x86_64)
+#elif defined(__x86_64) || defined(_M_ARM)
struct _EXCEPTION_RECORD;
struct _CONTEXT;
#endif
/*** memcopy must be memmove ***/
+void* memmove(void*, const void*, size_t);
__INTRIN_INLINE void* memcpy(void* dest, const void* source, size_t num)
{
return memmove(dest, source, num);
__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand);
__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand);
__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand);
+__INTRIN_INLINE char _InterlockedExchange8(volatile char * const Target, const char Value);
+__INTRIN_INLINE short _InterlockedExchange16(volatile short * const Target, const short Value);
__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value);
__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value);
__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short Value);
return (void *)__sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
+__INTRIN_INLINE char _InterlockedExchange8(volatile char * const Target, const char Value)
+{
+ /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
+ __sync_synchronize();
+ return __sync_lock_test_and_set(Target, Value);
+}
+
+__INTRIN_INLINE short _InterlockedExchange16(volatile short * const Target, const short Value)
+{
+ /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
+ __sync_synchronize();
+ return __sync_lock_test_and_set(Target, Value);
+}
+
__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
{
- /* NOTE: ditto */
+ /* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__sync_synchronize();
return (void *)__sync_lock_test_and_set(Target, Value);
}
__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand);
__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand);
__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand);
+__INTRIN_INLINE char _InterlockedExchange8(volatile char * const Target, const char Value);
+__INTRIN_INLINE short _InterlockedExchange16(volatile short * const Target, const short Value);
__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value);
__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value);
__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short Value);
return retval;
}
+__INTRIN_INLINE char _InterlockedExchange8(volatile char * const Target, const char Value)
+{
+ char retval = Value;
+ __asm__("xchgb %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory");
+ return retval;
+}
+
+__INTRIN_INLINE short _InterlockedExchange16(volatile short * const Target, const short Value)
+{
+ short retval = Value;
+ __asm__("xchgw %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory");
+ return retval;
+}
+
__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value)
{
long retval = Value;
__INTRIN_INLINE unsigned char _rotl8(unsigned char value, unsigned char shift);
__INTRIN_INLINE unsigned short _rotl16(unsigned short value, unsigned char shift);
__INTRIN_INLINE unsigned int _rotl(unsigned int value, int shift);
+__INTRIN_INLINE unsigned __int64 _rotl64(unsigned __int64 value, int shift);
__INTRIN_INLINE unsigned int _rotr(unsigned int value, int shift);
__INTRIN_INLINE unsigned char _rotr8(unsigned char value, unsigned char shift);
__INTRIN_INLINE unsigned short _rotr16(unsigned short value, unsigned char shift);
return retval;
}
+#ifdef _M_AMD64
+__INTRIN_INLINE unsigned __int64 _rotl64(unsigned __int64 value, int shift)
+{
+ unsigned __int64 retval;
+ __asm__("rolq %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
+ return retval;
+}
+#else
+__INTRIN_INLINE unsigned __int64 _rotl64(unsigned __int64 value, int shift)
+{
+ /* FIXME: this is probably not optimal */
+ return (value << shift) | (value >> (64 - shift));
+}
+#endif
+
__INTRIN_INLINE unsigned int _rotr(unsigned int value, int shift)
{
unsigned long retval;
* ISO C Standard: 7.15 Variable arguments <stdarg.h>
*/
+#pragma once
+
#ifndef _INC_STDARG
#define _INC_STDARG
-#ifndef _WIN32
-#error Only Win32 target is supported!
-#endif
-
-#ifndef _STDARG_H
-#ifndef _ANSI_STDARG_H_
-#ifndef __need___va_list
-#define _STDARG_H
-#define _ANSI_STDARG_H_
-#endif /* not __need___va_list */
-#undef __need___va_list
-
-/* Define __gnuc_va_list. */
-
-#ifdef __GNUC__
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST
-typedef __builtin_va_list __gnuc_va_list;
-#endif
-#endif
-/* Define the standard macros for the user,
- if this invocation was from the user program. */
-#ifdef _STDARG_H
-
-#ifdef __GNUC__
-#define va_start(v,l) __builtin_va_start(v,l)
-#define va_end(v) __builtin_va_end(v)
-#define va_arg(v,l) __builtin_va_arg(v,l)
-#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
-#define va_copy(d,s) __builtin_va_copy(d,s)
-#endif
-#define __va_copy(d,s) __builtin_va_copy(d,s)
-#endif
-
-/* Define va_list, if desired, from __gnuc_va_list. */
-/* We deliberately do not define va_list when called from
- stdio.h, because ANSI C says that stdio.h is not supposed to define
- va_list. stdio.h needs to have access to that data type,
- but must not use that name. It should use the name __gnuc_va_list,
- which is safe because it is reserved for the implementation. */
-
-#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
-#undef _VA_LIST
-#endif
-
-#ifdef _BSD_VA_LIST
-#undef _BSD_VA_LIST
-#endif
-
-#ifdef __GNUC__
-#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
-/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
- so we must avoid testing it and setting it here.
- SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
- have no conflict with that. */
-#ifndef _VA_LIST_
-#define _VA_LIST_
-#ifdef __i860__
-#ifndef _VA_LIST
-#define _VA_LIST va_list
-#endif
-#endif /* __i860__ */
-typedef __gnuc_va_list va_list;
-#ifdef _SCO_DS
-#define __VA_LIST
-#endif
-#endif /* _VA_LIST_ */
-#else /* not __svr4__ || _SCO_DS */
+#include <crtdefs.h>
+#include <vadefs.h>
-/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
- But on BSD NET2 we must not test or define or undef it.
- (Note that the comments in NET 2's ansi.h
- are incorrect for _VA_LIST_--see stdio.h!) */
-#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
-/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */
-#ifndef _VA_LIST_DEFINED
-/* The macro _VA_LIST is used in SCO Unix 3.2. */
-#ifndef _VA_LIST
-/* The macro _VA_LIST_T_H is used in the Bull dpx2 */
-#ifndef _VA_LIST_T_H
-/* The macro __va_list__ is used by BeOS. */
-#ifndef __va_list__
-typedef __gnuc_va_list va_list;
-#endif /* not __va_list__ */
-#endif /* not _VA_LIST_T_H */
-#endif /* not _VA_LIST */
-#endif /* not _VA_LIST_DEFINED */
-#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
-#define _VA_LIST_
-#endif
-#ifndef _VA_LIST
-#define _VA_LIST
-#endif
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-#endif
-#ifndef _VA_LIST_T_H
-#define _VA_LIST_T_H
-#endif
-#ifndef __va_list__
-#define __va_list__
+#ifndef _WIN32
+#error Only Win32 target is supported!
#endif
-#endif /* not _VA_LIST_, except on certain systems */
-
-#endif /* not __svr4__ */
-
-#endif /* __GNUC__ */
-#endif /* _STDARG_H */
-
-#endif /* not _ANSI_STDARG_H_ */
-#endif /* not _STDARG_H */
-
-#include <vadefs.h>
-
#ifndef va_start
#define va_start _crt_va_start
#endif
extern "C" {
#endif
-#ifndef _UINTPTR_T_DEFINED
-#define _UINTPTR_T_DEFINED
-#ifndef __uintptr_t_defined
-#define __uintptr_t_defined
-#undef uintptr_t
-#ifdef _WIN64
-#if defined(__GNUC__) && defined(__STRICT_ANSI__)
- typedef unsigned int uintptr_t __attribute__ ((mode (DI)));
-#else
- __MINGW_EXTENSION typedef unsigned __int64 uintptr_t;
-#endif
-#else
- typedef unsigned long uintptr_t;
-#endif
-#endif
-#endif
-
-#ifdef __GNUC__
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST
- typedef __builtin_va_list __gnuc_va_list;
-#endif
-#endif
-
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-#if defined(__GNUC__)
- typedef __gnuc_va_list va_list;
-#elif defined(_MSC_VER)
- typedef char * va_list;
-#endif
-#endif
-
#ifdef __cplusplus
#define _ADDRESSOF(v) (&reinterpret_cast<const char &>(v))
#else
+
#ifndef _BASETYPS_H
#define _BASETYPS_H
+#pragma once
+
+#include <guiddef.h>
#ifndef __OBJC__
# ifdef __cplusplus
# endif
#endif
+#ifndef STDMETHODCALLTYPE
#define STDMETHODCALLTYPE __stdcall
#define STDMETHODVCALLTYPE __cdecl
#define STDAPICALLTYPE __stdcall
#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
+#endif /* !STDMETHODCALLTYPE */
#if defined(__cplusplus) && !defined(CINTERFACE)
# define interface struct
# define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
#endif
-#include <guiddef.h>
-
#ifndef _ERROR_STATUS_T_DEFINED
#define _ERROR_STATUS_T_DEFINED
typedef unsigned long error_status_t;
#ifndef GUID_DEFINED
#define GUID_DEFINED
+
typedef struct _GUID
{
#ifdef _MSC_VER
} GUID;
#endif
+#ifndef FAR
+#define FAR
+#endif
+
#ifndef DECLSPEC_SELECTANY
#define DECLSPEC_SELECTANY __declspec(selectany)
#endif
#define REFFMTID const FMTID* __MIDL_CONST
#endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
+#if !defined(__midl) && !defined(__WIDL__)
+#include <string.h>
#if defined(__cplusplus) && !defined(CINTERFACE)
__inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
#endif /* defined(__cplusplus) && !defined(CINTERFACE) */
+#endif /* __midl && __WIDL__ */
#if defined(__cplusplus) && !defined(CINTERFACE)
#include <string.h>
#include <specstrings.h>
#include <kernelspecs.h>
-// FIXME: Shouldn't be included!
-#include <stdarg.h>
-#include <string.h>
-
#ifdef __cplusplus
extern "C" {
#endif
+/* Default to strict */
+#ifndef NO_STRICT
+#ifndef STRICT
+#define STRICT 1
+#endif
+#endif
+
/* Pseudo Modifiers for Input Parameters */
#ifndef IN
#define CRITICAL
#endif
-// FIXME: deprecated
-#ifndef FAR
-#define FAR
-#endif
-
/* Constant modifier */
#ifndef CONST
#define CONST const
#define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(ULONG)
#endif
+#ifdef __cplusplus
+#define EXTERN_C extern "C"
+#else
+#define EXTERN_C extern
+#endif
+
/* Calling Conventions */
#if defined(_MANAGED)
#define FASTCALL __stdcall
#define NTAPI __stdcall
+#ifndef STDMETHODCALLTYPE
+#define STDMETHODCALLTYPE __stdcall
+#define STDMETHODVCALLTYPE __cdecl
+#define STDAPICALLTYPE __stdcall
+#define STDAPIVCALLTYPE __cdecl
+#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
+#define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
+#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
+#define STDMETHODIMP_(t) t STDMETHODCALLTYPE
+#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
+#define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
+#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
+#define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
+#endif /* !STDMETHODCALLTYPE */
+
+#define STDOVERRIDEMETHODIMP __override STDMETHODIMP
+#define STDOVERRIDEMETHODIMP_(t) __override STDMETHODIMP_(t)
+#define IFACEMETHODIMP __override STDMETHODIMP
+#define IFACEMETHODIMP_(t) __override STDMETHODIMP_(t)
+#define STDOVERRIDEMETHODIMPV __override STDMETHODIMPV
+#define STDOVERRIDEMETHODIMPV_(t) __override STDMETHODIMPV_(t)
+#define IFACEMETHODIMPV __override STDMETHODIMPV
+#define IFACEMETHODIMPV_(t) __override STDMETHODIMPV_(t)
+
/* Import and Export Specifiers */
#endif /* DECLSPEC_NOINLINE */
#if !defined(_M_CEE_PURE)
-#define NTAPI_INLINE NTAPI
+#define NTAPI_INLINE NTAPI
#else
#define NTAPI_INLINE
#endif
typedef int INT;
#endif
#endif
-typedef double DOUBLE;
+
+/* Avoid redefinition in windef.h */
+#define BASETYPES
/* Unsigned Types */
typedef unsigned char UCHAR, *PUCHAR;
typedef unsigned short USHORT, *PUSHORT;
typedef unsigned long ULONG, *PULONG;
+
typedef CONST UCHAR *PCUCHAR;
typedef CONST USHORT *PCUSHORT;
typedef CONST ULONG *PCULONG;
-typedef UCHAR FCHAR;
-typedef USHORT FSHORT;
-typedef ULONG FLONG;
-typedef UCHAR BOOLEAN, *PBOOLEAN;
-typedef ULONG LOGICAL;
-typedef ULONG *PLOGICAL;
+
+typedef double DOUBLE;
/* Signed Types */
typedef SHORT *PSHORT;
typedef LONG *PLONG;
-typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
-typedef NTSTATUS *PNTSTATUS;
-typedef signed char SCHAR;
-typedef SCHAR *PSCHAR;
+
+/* Flag types */
+typedef unsigned char FCHAR;
+typedef unsigned short FSHORT;
+typedef unsigned long FLONG;
+
+typedef unsigned char BOOLEAN, *PBOOLEAN;
+typedef ULONG LOGICAL, *PLOGICAL;
+typedef _Return_type_success_(return >= 0) LONG NTSTATUS, *PNTSTATUS;;
+typedef signed char SCHAR, *PSCHAR;
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
-typedef LONG HRESULT;
+typedef _Return_type_success_(return >= 0) LONG HRESULT;
#endif
/* 64-bit types */
+#define _ULONGLONG_
__GNU_EXTENSION typedef __int64 LONGLONG, *PLONGLONG;
__GNU_EXTENSION typedef unsigned __int64 ULONGLONG, *PULONGLONG;
+#define _DWORDLONG_
typedef ULONGLONG DWORDLONG, *PDWORDLONG;
/* Update Sequence Number */
typedef LONGLONG USN;
/* ANSI (Multi-byte Character) types */
-typedef CHAR *PCHAR, *LPCH, *PCH;
-typedef CONST CHAR *LPCCH, *PCCH;
+typedef CHAR *PCHAR, *LPCH, *PCH, *PNZCH;
+typedef CONST CHAR *LPCCH, *PCCH, *PCNZCH;
typedef _Null_terminated_ CHAR *NPSTR, *LPSTR, *PSTR;
typedef _Null_terminated_ PSTR *PZPSTR;
typedef _Null_terminated_ CONST PSTR *PCZPSTR;
typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR;
typedef _Null_terminated_ PCSTR *PZPCSTR;
+typedef _NullNull_terminated_ CHAR *PZZSTR;
+typedef _NullNull_terminated_ CONST CHAR *PCZZSTR;
+
/* Pointer to an Asciiz string */
typedef _Null_terminated_ CHAR *PSZ;
typedef _Null_terminated_ CONST char *PCSZ;
typedef _Null_terminated_ CONST WCHAR *LPCWSTR, *PCWSTR;
typedef _Null_terminated_ PCWSTR *PZPCWSTR;
typedef _Null_terminated_ CONST WCHAR UNALIGNED *LPCUWSTR, *PCUWSTR;
+
typedef _NullNull_terminated_ WCHAR *PZZWSTR;
+typedef _NullNull_terminated_ CONST WCHAR *PCZZWSTR;
+typedef _NullNull_terminated_ WCHAR UNALIGNED *PUZZWSTR;
+typedef _NullNull_terminated_ CONST WCHAR UNALIGNED *PCUZZWSTR;
+
+typedef WCHAR *PNZWCH;
+typedef CONST WCHAR *PCNZWCH;
+typedef WCHAR UNALIGNED *PUNZWCH;
+typedef CONST WCHAR UNALIGNED *PCUNZWCH;
+
+#if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS))
+typedef CONST WCHAR *LPCWCHAR, *PCWCHAR;
+typedef CONST WCHAR UNALIGNED *LPCUWCHAR, *PCUWCHAR;
+typedef unsigned long UCSCHAR, *PUCSCHAR, *PUCSSTR;
+typedef const UCSCHAR *PCUCSCHAR, *PCUCSSTR;
+typedef UCSCHAR UNALIGNED *PUUCSCHAR, *PUUCSSTR;
+typedef const UCSCHAR UNALIGNED *PCUUCSCHAR, *PCUUCSSTR;
+#define UCSCHAR_INVALID_CHARACTER (0xffffffff)
+#define MIN_UCSCHAR (0)
+#define MAX_UCSCHAR (0x0010FFFF)
+#endif /* _WIN32_WINNT >= 0x0600 */
+
+#ifdef UNICODE
+
+#ifndef _TCHAR_DEFINED
+typedef WCHAR TCHAR, *PTCHAR;
+typedef WCHAR TUCHAR, *PTUCHAR;
+#define _TCHAR_DEFINED
+#endif /* !_TCHAR_DEFINED */
+typedef LPWCH LPTCH, PTCH;
+typedef LPCWCH LPCTCH, PCTCH;
+typedef LPWSTR PTSTR, LPTSTR;
+typedef LPCWSTR PCTSTR, LPCTSTR;
+typedef LPUWSTR PUTSTR, LPUTSTR;
+typedef LPCUWSTR PCUTSTR, LPCUTSTR;
+typedef LPWSTR LP;
+typedef PZZWSTR PZZTSTR;
+typedef PCZZWSTR PCZZTSTR;
+typedef PUZZWSTR PUZZTSTR;
+typedef PCUZZWSTR PCUZZTSTR;
+typedef PZPWSTR PZPTSTR;
+typedef PNZWCH PNZTCH;
+typedef PCNZWCH PCNZTCH;
+typedef PUNZWCH PUNZTCH;
+typedef PCUNZWCH PCUNZTCH;
+#define __TEXT(quote) L##quote
+
+#else /* UNICODE */
+
+#ifndef _TCHAR_DEFINED
+typedef char TCHAR, *PTCHAR;
+typedef unsigned char TUCHAR, *PTUCHAR;
+#define _TCHAR_DEFINED
+#endif /* !_TCHAR_DEFINED */
+typedef LPCH LPTCH, PTCH;
+typedef LPCCH LPCTCH, PCTCH;
+typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
+typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
+typedef PZZSTR PZZTSTR, PUZZTSTR;
+typedef PCZZSTR PCZZTSTR, PCUZZTSTR;
+typedef PZPSTR PZPTSTR;
+typedef PNZCH PNZTCH, PUNZTCH;
+typedef PCNZCH PCNZTCH, PCUNZTCH;
+#define __TEXT(quote) quote // r_winnt
+
+#endif /* UNICODE */ // r_winnt
+#define TEXT(quote) __TEXT(quote) // r_winnt
/* Cardinal Data Types */
-typedef char CCHAR, *PCCHAR;
+typedef char CCHAR;
+typedef CCHAR *PCCHAR;
typedef short CSHORT, *PCSHORT;
typedef ULONG CLONG, *PCLONG;
/* NLS basics (Locale and Language Ids) */
-typedef ULONG LCID;
-typedef PULONG PLCID;
-typedef USHORT LANGID;
+typedef unsigned long LCID, *PLCID;
+typedef unsigned short LANGID;
-typedef enum {
- UNSPECIFIED_COMPARTMENT_ID = 0,
- DEFAULT_COMPARTMENT_ID
+#ifndef __COMPARTMENT_ID_DEFINED__
+#define __COMPARTMENT_ID_DEFINED__
+typedef enum
+{
+ UNSPECIFIED_COMPARTMENT_ID = 0,
+ DEFAULT_COMPARTMENT_ID
} COMPARTMENT_ID, *PCOMPARTMENT_ID;
+#endif /* __COMPARTMENT_ID_DEFINED__ */
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4201)
#endif
+
/* Used to store a non-float 8 byte aligned structure */
typedef struct _QUAD
{
typedef struct _UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
- PWSTR Buffer;
+#ifdef MIDL_PASS
+ [size_is(MaximumLength / 2), length_is((Length) / 2)] PUSHORT Buffer;
+#else
+ _Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer;
+#endif
} UNICODE_STRING, *PUNICODE_STRING;
typedef const UNICODE_STRING* PCUNICODE_STRING;
+
#define UNICODE_NULL ((WCHAR)0)
#define UNICODE_STRING_MAX_BYTES ((USHORT) 65534)
#define UNICODE_STRING_MAX_CHARS (32767)
UNICODE_STRING64, *PUNICODE_STRING64,
ANSI_STRING64, *PANSI_STRING64;
-/* LangID and NLS */
-#define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p))
-#define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff)
-#define SUBLANGID(lgid) ((USHORT)(lgid) >> 10)
-
-#define NLS_VALID_LOCALE_MASK 0x000fffff
-
-#define MAKELCID(lgid, srtid) ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) | \
- ((ULONG)((USHORT)(lgid)))))
-#define MAKESORTLCID(lgid, srtid, ver) \
- ((ULONG)((MAKELCID(lgid, srtid)) | \
- (((ULONG)((USHORT)(ver))) << 20)))
-#define LANGIDFROMLCID(lcid) ((USHORT)(lcid))
-#define SORTIDFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 16) & 0xf))
-#define SORTVERSIONFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 20) & 0xf))
-
-
/* Object Attributes */
typedef struct _OBJECT_ATTRIBUTES {
ULONG Length;
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES;
+typedef struct _OBJECT_ATTRIBUTES32 {
+ ULONG Length;
+ ULONG RootDirectory;
+ ULONG ObjectName;
+ ULONG Attributes;
+ ULONG SecurityDescriptor;
+ ULONG SecurityQualityOfService;
+} OBJECT_ATTRIBUTES32, *POBJECT_ATTRIBUTES32;
+typedef CONST OBJECT_ATTRIBUTES32 *PCOBJECT_ATTRIBUTES32;
+
+typedef struct _OBJECT_ATTRIBUTES64 {
+ ULONG Length;
+ ULONG64 RootDirectory;
+ ULONG64 ObjectName;
+ ULONG Attributes;
+ ULONG64 SecurityDescriptor;
+ ULONG64 SecurityQualityOfService;
+} OBJECT_ATTRIBUTES64, *POBJECT_ATTRIBUTES64;
+typedef CONST OBJECT_ATTRIBUTES64 *PCOBJECT_ATTRIBUTES64;
+
/* Values for the Attributes member */
-#define OBJ_INHERIT 0x00000002
-#define OBJ_PERMANENT 0x00000010
-#define OBJ_EXCLUSIVE 0x00000020
-#define OBJ_CASE_INSENSITIVE 0x00000040
-#define OBJ_OPENIF 0x00000080
-#define OBJ_OPENLINK 0x00000100
-#define OBJ_KERNEL_HANDLE 0x00000200
-#define OBJ_FORCE_ACCESS_CHECK 0x00000400
-#define OBJ_VALID_ATTRIBUTES 0x000007F2
+#define OBJ_INHERIT 0x00000002L
+#define OBJ_PERMANENT 0x00000010L
+#define OBJ_EXCLUSIVE 0x00000020L
+#define OBJ_CASE_INSENSITIVE 0x00000040L
+#define OBJ_OPENIF 0x00000080L
+#define OBJ_OPENLINK 0x00000100L
+#define OBJ_KERNEL_HANDLE 0x00000200L
+#define OBJ_FORCE_ACCESS_CHECK 0x00000400L
+#define OBJ_VALID_ATTRIBUTES 0x000007F2L
/* Helper Macro */
#define InitializeObjectAttributes(p,n,a,r,s) { \
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
(p)->RootDirectory = (r); \
- (p)->Attributes = (a); \
(p)->ObjectName = (n); \
+ (p)->Attributes = (a); \
(p)->SecurityDescriptor = (s); \
(p)->SecurityQualityOfService = NULL; \
}
+#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n,a) { \
+ sizeof(OBJECT_ATTRIBUTES), \
+ NULL, \
+ RTL_CONST_CAST(PUNICODE_STRING)(n), \
+ a, \
+ NULL, \
+ NULL \
+}
+
+#define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \
+ RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
+
/* Product Types */
typedef enum _NT_PRODUCT_TYPE {
NtProductWinNt = 1,
struct _SINGLE_LIST_ENTRY *Next;
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
+typedef struct _SINGLE_LIST_ENTRY32 {
+ ULONG Next;
+} SINGLE_LIST_ENTRY32, *PSINGLE_LIST_ENTRY32;
+
typedef struct _PROCESSOR_NUMBER {
USHORT Group;
UCHAR Number;
UCHAR Reserved;
} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
-struct _CONTEXT;
-struct _EXCEPTION_RECORD;
+#define ALL_PROCESSOR_GROUPS 0xffff
_IRQL_requires_same_
_Function_class_(EXCEPTION_ROUTINE)
-typedef EXCEPTION_DISPOSITION
-(NTAPI *PEXCEPTION_ROUTINE)(
+typedef
+EXCEPTION_DISPOSITION
+NTAPI
+EXCEPTION_ROUTINE(
_Inout_ struct _EXCEPTION_RECORD *ExceptionRecord,
_In_ PVOID EstablisherFrame,
_Inout_ struct _CONTEXT *ContextRecord,
_In_ PVOID DispatcherContext);
+typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;
+
typedef struct _GROUP_AFFINITY {
KAFFINITY Mask;
USHORT Group;
#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) * 8)
#define RTL_BITS_OF_FIELD(type, field) (RTL_BITS_OF(RTL_FIELD_TYPE(type, field)))
-#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
+#ifdef __cplusplus
+extern "C++" template<typename _Type> struct _RTL_remove_const_template;
+extern "C++" template<typename _Type> struct _RTL_remove_const_template<const _Type&> { typedef _Type type; };
+#define _RTL_CONSTANT_STRING_remove_const_macro(s) \
+ (const_cast<_RTL_remove_const_template<decltype((s)[0])>::type*>(s))
+extern "C++" template<class _Ty> struct _RTL_CONSTANT_STRING_type_check_template;
+extern "C++" template<class _Ty, int _Count> struct _RTL_CONSTANT_STRING_type_check_template<const _Ty (&)[_Count]> { typedef char type; };
+#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template<decltype(s)>::type
+#else
+#define _RTL_CONSTANT_STRING_remove_const_macro(s) (s)
+char _RTL_CONSTANT_STRING_type_check(const void *s);
+#endif
+#define RTL_CONSTANT_STRING(s) { \
+ sizeof(s)-sizeof((s)[0]), \
+ sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
+ _RTL_CONSTANT_STRING_remove_const_macro(s) }
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
( (((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)) )
#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
+
+#ifdef __GNUC__
+#define RTL_NUMBER_OF_V2(A) \
+ (({ int _check_array_type[__builtin_types_compatible_p(typeof(A), typeof(&A[0])) ? -1 : 1]; (void)_check_array_type; }), \
+ RTL_NUMBER_OF_V1(A))
+#else
+/// \todo implement security checks for cplusplus / MSVC
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
+#endif
+
#ifdef ENABLE_RTL_NUMBER_OF_V2
#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
#else
#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
#endif
#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
+#define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A)
+
+#define RTL_NUMBER_OF_FIELD(type, field) \
+ (RTL_NUMBER_OF(RTL_FIELD_TYPE(type, field)))
+
+#define RTL_PADDING_BETWEEN_FIELDS(type, field1, field2) \
+ ((FIELD_OFFSET(type, field2) > FIELD_OFFSET(type, field1)) \
+ ? (FIELD_OFFSET(type, field2) - FIELD_OFFSET(type, field1) - RTL_FIELD_SIZE(type, field1)) \
+ : (FIELD_OFFSET(type, field1) - FIELD_OFFSET(type, field2) - RTL_FIELD_SIZE(type, field2)))
+
+#if defined(__cplusplus)
+#define RTL_CONST_CAST(type) const_cast<type>
+#else
+#define RTL_CONST_CAST(type) (type)
+#endif
/* Type Limits */
#define MINCHAR 0x80
#define MAXULONG 0xffffffff
#define MAXLONGLONG (0x7fffffffffffffffLL)
-/* Multiplication and Shift Operations */
-#define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
-#define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b))
-#define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b))
-#define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
-#define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
+/* Multiplication and Shift Operations. Note: we don't use inline
+ asm functions, the compiler can optimize this better. */
+#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b)))
+#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b))
+
+#if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE)
+/* Use native math */
+#define Int64ShllMod32(a,b) ((unsigned __int64)(a)<<(b))
+#define Int64ShraMod32(a,b) (((__int64)(a))>>(b))
+#define Int64ShrlMod32(a,b) (((unsigned __int64)(a))>>(b))
+#else
+/* Use intrinsics */
+#define Int64ShllMod32(a,b) __ll_lshift(a,b)
+#define Int64ShraMod32(a,b) __ll_rshift(a,b)
+#define Int64ShrlMod32(a,b) __ull_rshift(a,b)
+#endif
+
+#define RotateLeft32 _rotl
+#define RotateLeft64 _rotl64
+#define RotateRight32 _rotr
+#define RotateRight64 _rotr64
+
+#if defined(_M_AMD64)
+#define RotateLeft8 _rotl8
+#define RotateLeft16 _rotl16
+#define RotateRight8 _rotr8
+#define RotateRight16 _rotr16
+#endif /* _M_AMD64 */
/* C_ASSERT Definition */
#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
/* Eliminate Microsoft C/C++ compiler warning 4715 */
-#if defined(_MSC_VER) && (_MSC_VER > 1200)
+#if defined(_MSC_VER)
# define DEFAULT_UNREACHABLE default: __assume(0)
#elif defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
# define DEFAULT_UNREACHABLE default: __builtin_unreachable()
#define VER_SUITE_COMPUTE_SERVER 0x00004000
#define VER_SUITE_WH_SERVER 0x00008000
+#define PRODUCT_UNDEFINED 0x00000000
+#define PRODUCT_ULTIMATE 0x00000001
+#define PRODUCT_HOME_BASIC 0x00000002
+#define PRODUCT_HOME_PREMIUM 0x00000003
+#define PRODUCT_ENTERPRISE 0x00000004
+#define PRODUCT_HOME_BASIC_N 0x00000005
+#define PRODUCT_BUSINESS 0x00000006
+#define PRODUCT_STANDARD_SERVER 0x00000007
+#define PRODUCT_DATACENTER_SERVER 0x00000008
+#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009
+#define PRODUCT_ENTERPRISE_SERVER 0x0000000A
+#define PRODUCT_STARTER 0x0000000B
+#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C
+#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D
+#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
+#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F
+#define PRODUCT_BUSINESS_N 0x00000010
+#define PRODUCT_WEB_SERVER 0x00000011
+#define PRODUCT_CLUSTER_SERVER 0x00000012
+#define PRODUCT_HOME_SERVER 0x00000013
+#define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014
+#define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015
+#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019
+#define PRODUCT_HOME_PREMIUM_N 0x0000001A
+#define PRODUCT_ENTERPRISE_N 0x0000001B
+#define PRODUCT_ULTIMATE_N 0x0000001C
+#define PRODUCT_WEB_SERVER_CORE 0x0000001D
+#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E
+#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F
+#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020
+#define PRODUCT_SERVER_FOUNDATION 0x00000021
+#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023
+#define PRODUCT_STANDARD_SERVER_V 0x00000024
+#define PRODUCT_DATACENTER_SERVER_V 0x00000025
+#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026
+#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027
+#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028
+#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029
+#define PRODUCT_HYPERV 0x0000002A
+#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B
+#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C
+#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E
+#define PRODUCT_STARTER_N 0x0000002F
+#define PRODUCT_PROFESSIONAL 0x00000030
+#define PRODUCT_PROFESSIONAL_N 0x00000031
+#define PRODUCT_SB_SOLUTION_SERVER 0x00000032
+#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033
+#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034
+#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035
+#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036
+#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037
+#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038
+#define PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE 0x00000039
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D
+#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F
+#define PRODUCT_CLUSTER_SERVER_V 0x00000040
+#define PRODUCT_EMBEDDED 0x00000041
+#define PRODUCT_STARTER_E 0x00000042
+#define PRODUCT_HOME_BASIC_E 0x00000043
+#define PRODUCT_HOME_PREMIUM_E 0x00000044
+#define PRODUCT_PROFESSIONAL_E 0x00000045
+#define PRODUCT_ENTERPRISE_E 0x00000046
+#define PRODUCT_ULTIMATE_E 0x00000047
+#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048
+#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C
+#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D
+#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F
+#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050
+#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054
+#define PRODUCT_EMBEDDED_AUTOMOTIVE 0x00000055
+#define PRODUCT_EMBEDDED_INDUSTRY_A 0x00000056
+#define PRODUCT_THINPC 0x00000057
+#define PRODUCT_EMBEDDED_A 0x00000058
+#define PRODUCT_EMBEDDED_INDUSTRY 0x00000059
+#define PRODUCT_EMBEDDED_E 0x0000005A
+#define PRODUCT_EMBEDDED_INDUSTRY_E 0x0000005B
+#define PRODUCT_EMBEDDED_INDUSTRY_A_E 0x0000005C
+#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F
+#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060
+#define PRODUCT_CORE_ARM 0x00000061
+#define PRODUCT_CORE_N 0x00000062
+#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063
+#define PRODUCT_CORE_SINGLELANGUAGE 0x00000064
+#define PRODUCT_CORE 0x00000065
+#define PRODUCT_PROFESSIONAL_WMC 0x00000067
+#define PRODUCT_UNLICENSED 0xABCDABCD
+
+/* LangID and NLS */
+#define MAKELANGID(p, s) ((((USHORT)(s)) << 10) | (USHORT)(p))
+#define PRIMARYLANGID(lgid) ((USHORT)(lgid) & 0x3ff)
+#define SUBLANGID(lgid) ((USHORT)(lgid) >> 10)
+#define MAKELCID(lgid, srtid) ((ULONG)((((ULONG)((USHORT)(srtid))) << 16) | \
+ ((ULONG)((USHORT)(lgid)))))
+#define MAKESORTLCID(lgid, srtid, ver) \
+ ((ULONG)((MAKELCID(lgid, srtid)) | \
+ (((ULONG)((USHORT)(ver))) << 20)))
+#define LANGIDFROMLCID(lcid) ((USHORT)(lcid))
+#define SORTIDFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 16) & 0xf))
+#define SORTVERSIONFROMLCID(lcid) ((USHORT)((((ULONG)(lcid)) >> 20) & 0xf))
+
+#define NLS_VALID_LOCALE_MASK 0x000fffff
+#define LOCALE_NAME_MAX_LENGTH 85
+
/* Primary language IDs. */
#define LANG_NEUTRAL 0x00
#define LANG_INVARIANT 0x7f
-
#define LANG_AFRIKAANS 0x36
#define LANG_ALBANIAN 0x1c
#define LANG_ALSATIAN 0x84
#define LANG_ARMENIAN 0x2b
#define LANG_ASSAMESE 0x4d
#define LANG_AZERI 0x2c
+#define LANG_AZERBAIJANI 0x2c
+#define LANG_BANGLA 0x45
#define LANG_BASHKIR 0x6d
#define LANG_BASQUE 0x2d
#define LANG_BELARUSIAN 0x23
#define LANG_BOSNIAN_NEUTRAL 0x781a
#define LANG_BULGARIAN 0x02
#define LANG_CATALAN 0x03
+#define LANG_CENTRAL_KURDISH 0x92
+#define LANG_CHEROKEE 0x5c
#define LANG_CHINESE 0x04
#define LANG_CHINESE_SIMPLIFIED 0x04
#define LANG_CHINESE_TRADITIONAL 0x7c04
#define LANG_FINNISH 0x0b
#define LANG_FRENCH 0x0c
#define LANG_FRISIAN 0x62
+#define LANG_FULAH 0x67
#define LANG_GALICIAN 0x56
#define LANG_GEORGIAN 0x37
#define LANG_GERMAN 0x07
#define LANG_GREENLANDIC 0x6f
#define LANG_GUJARATI 0x47
#define LANG_HAUSA 0x68
+#define LANG_HAWAIIAN 0x75
#define LANG_HEBREW 0x0d
#define LANG_HINDI 0x39
#define LANG_HUNGARIAN 0x0e
#define LANG_NEPALI 0x61
#define LANG_NORWEGIAN 0x14
#define LANG_OCCITAN 0x82
+#define LANG_ODIA 0x48
#define LANG_ORIYA 0x48
#define LANG_PASHTO 0x63
#define LANG_PERSIAN 0x29
#define LANG_POLISH 0x15
#define LANG_PORTUGUESE 0x16
+#define LANG_PULAR 0x67
#define LANG_PUNJABI 0x46
#define LANG_QUECHUA 0x6b
#define LANG_ROMANIAN 0x18
#define LANG_ROMANSH 0x17
#define LANG_RUSSIAN 0x19
+#define LANG_SAKHA 0x85
#define LANG_SAMI 0x3b
#define LANG_SANSKRIT 0x4f
+#define LANG_SCOTTISH_GAELIC 0x91
#define LANG_SERBIAN 0x1a
#define LANG_SERBIAN_NEUTRAL 0x7c1a
#define LANG_SINDHI 0x59
#define LANG_THAI 0x1e
#define LANG_TIBETAN 0x51
#define LANG_TIGRIGNA 0x73
+#define LANG_TIGRINYA 0x73
#define LANG_TSWANA 0x32
#define LANG_TURKISH 0x1f
#define LANG_TURKMEN 0x42
#define LANG_UPPER_SORBIAN 0x2e
#define LANG_URDU 0x20
#define LANG_UZBEK 0x43
+#define LANG_VALENCIAN 0x03
#define LANG_VIETNAMESE 0x2a
#define LANG_WELSH 0x52
#define LANG_WOLOF 0x88
#define LANG_YORUBA 0x6a
#define LANG_ZULU 0x35
+#define SUBLANG_NEUTRAL 0x00
+#define SUBLANG_DEFAULT 0x01
+#define SUBLANG_SYS_DEFAULT 0x02
+#define SUBLANG_CUSTOM_DEFAULT 0x03
+#define SUBLANG_CUSTOM_UNSPECIFIED 0x04
+#define SUBLANG_UI_CUSTOM_DEFAULT 0x05
+#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
+#define SUBLANG_ALBANIAN_ALBANIA 0x01
+#define SUBLANG_ALSATIAN_FRANCE 0x01
+#define SUBLANG_AMHARIC_ETHIOPIA 0x01
+#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+#define SUBLANG_ARABIC_IRAQ 0x02
+#define SUBLANG_ARABIC_EGYPT 0x03
+#define SUBLANG_ARABIC_LIBYA 0x04
+#define SUBLANG_ARABIC_ALGERIA 0x05
+#define SUBLANG_ARABIC_MOROCCO 0x06
+#define SUBLANG_ARABIC_TUNISIA 0x07
+#define SUBLANG_ARABIC_OMAN 0x08
+#define SUBLANG_ARABIC_YEMEN 0x09
+#define SUBLANG_ARABIC_SYRIA 0x0a
+#define SUBLANG_ARABIC_JORDAN 0x0b
+#define SUBLANG_ARABIC_LEBANON 0x0c
+#define SUBLANG_ARABIC_KUWAIT 0x0d
+#define SUBLANG_ARABIC_UAE 0x0e
+#define SUBLANG_ARABIC_BAHRAIN 0x0f
+#define SUBLANG_ARABIC_QATAR 0x10
+#define SUBLANG_ARMENIAN_ARMENIA 0x01
+#define SUBLANG_ASSAMESE_INDIA 0x01
+#define SUBLANG_AZERI_LATIN 0x01
+#define SUBLANG_AZERI_CYRILLIC 0x02
+#define SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN 0x01
+#define SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC 0x02
+#define SUBLANG_BANGLA_INDIA 0x01
+#define SUBLANG_BANGLA_BANGLADESH 0x02
+#define SUBLANG_BASHKIR_RUSSIA 0x01
+#define SUBLANG_BASQUE_BASQUE 0x01
+#define SUBLANG_BELARUSIAN_BELARUS 0x01
+#define SUBLANG_BENGALI_INDIA 0x01
+#define SUBLANG_BENGALI_BANGLADESH 0x02
+#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
+#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
+#define SUBLANG_BRETON_FRANCE 0x01
+#define SUBLANG_BULGARIAN_BULGARIA 0x01
+#define SUBLANG_CATALAN_CATALAN 0x01
+#define SUBLANG_CENTRAL_KURDISH_IRAQ 0x01
+#define SUBLANG_CHEROKEE_CHEROKEE 0x01
+#define SUBLANG_CHINESE_TRADITIONAL 0x01
+#define SUBLANG_CHINESE_SIMPLIFIED 0x02
+#define SUBLANG_CHINESE_HONGKONG 0x03
+#define SUBLANG_CHINESE_SINGAPORE 0x04
+#define SUBLANG_CHINESE_MACAU 0x05
+#define SUBLANG_CORSICAN_FRANCE 0x01
+#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
+#define SUBLANG_CROATIAN_CROATIA 0x01
+#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
+#define SUBLANG_DANISH_DENMARK 0x01
+#define SUBLANG_DARI_AFGHANISTAN 0x01
+#define SUBLANG_DIVEHI_MALDIVES 0x01
+#define SUBLANG_DUTCH 0x01
+#define SUBLANG_DUTCH_BELGIAN 0x02
+#define SUBLANG_ENGLISH_US 0x01
+#define SUBLANG_ENGLISH_UK 0x02
+#define SUBLANG_ENGLISH_AUS 0x03
+#define SUBLANG_ENGLISH_CAN 0x04
+#define SUBLANG_ENGLISH_NZ 0x05
+#define SUBLANG_ENGLISH_EIRE 0x06
+#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+#define SUBLANG_ENGLISH_JAMAICA 0x08
+#define SUBLANG_ENGLISH_CARIBBEAN 0x09
+#define SUBLANG_ENGLISH_BELIZE 0x0a
+#define SUBLANG_ENGLISH_TRINIDAD 0x0b
+#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+#define SUBLANG_ENGLISH_INDIA 0x10
+#define SUBLANG_ENGLISH_MALAYSIA 0x11
+#define SUBLANG_ENGLISH_SINGAPORE 0x12
+#define SUBLANG_ESTONIAN_ESTONIA 0x01
+#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
+#define SUBLANG_FILIPINO_PHILIPPINES 0x01
+#define SUBLANG_FINNISH_FINLAND 0x01
+#define SUBLANG_FRENCH 0x01
+#define SUBLANG_FRENCH_BELGIAN 0x02
+#define SUBLANG_FRENCH_CANADIAN 0x03
+#define SUBLANG_FRENCH_SWISS 0x04
+#define SUBLANG_FRENCH_LUXEMBOURG 0x05
+#define SUBLANG_FRENCH_MONACO 0x06
+#define SUBLANG_FRISIAN_NETHERLANDS 0x01
+#define SUBLANG_FULAH_SENEGAL 0x02
+#define SUBLANG_GALICIAN_GALICIAN 0x01
+#define SUBLANG_GEORGIAN_GEORGIA 0x01
+#define SUBLANG_GERMAN 0x01
+#define SUBLANG_GERMAN_SWISS 0x02
+#define SUBLANG_GERMAN_AUSTRIAN 0x03
+#define SUBLANG_GERMAN_LUXEMBOURG 0x04
+#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+#define SUBLANG_GREEK_GREECE 0x01
+#define SUBLANG_GREENLANDIC_GREENLAND 0x01
+#define SUBLANG_GUJARATI_INDIA 0x01
+#define SUBLANG_HAUSA_NIGERIA_LATIN 0x01
+#define SUBLANG_HAWAIIAN_US 0x01
+#define SUBLANG_HEBREW_ISRAEL 0x01
+#define SUBLANG_HINDI_INDIA 0x01
+#define SUBLANG_HUNGARIAN_HUNGARY 0x01
+#define SUBLANG_ICELANDIC_ICELAND 0x01
+#define SUBLANG_IGBO_NIGERIA 0x01
+#define SUBLANG_INDONESIAN_INDONESIA 0x01
+#define SUBLANG_INUKTITUT_CANADA 0x01
+#define SUBLANG_INUKTITUT_CANADA_LATIN 0x02
+#define SUBLANG_IRISH_IRELAND 0x02
+#define SUBLANG_ITALIAN 0x01
+#define SUBLANG_ITALIAN_SWISS 0x02
+#define SUBLANG_JAPANESE_JAPAN 0x01
+#define SUBLANG_KANNADA_INDIA 0x01
+#define SUBLANG_KASHMIRI_SASIA 0x02
+#define SUBLANG_KASHMIRI_INDIA 0x02
+#define SUBLANG_KAZAK_KAZAKHSTAN 0x01
+#define SUBLANG_KHMER_CAMBODIA 0x01
+#define SUBLANG_KICHE_GUATEMALA 0x01
+#define SUBLANG_KINYARWANDA_RWANDA 0x01
+#define SUBLANG_KONKANI_INDIA 0x01
+#define SUBLANG_KOREAN 0x01
+#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
+#define SUBLANG_LAO_LAO 0x01
+#define SUBLANG_LATVIAN_LATVIA 0x01
+#define SUBLANG_LITHUANIAN 0x01
+#define SUBLANG_LOWER_SORBIAN_GERMANY 0x02
+#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
+#define SUBLANG_MACEDONIAN_MACEDONIA 0x01
+#define SUBLANG_MALAY_MALAYSIA 0x01
+#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+#define SUBLANG_MALAYALAM_INDIA 0x01
+#define SUBLANG_MALTESE_MALTA 0x01
+#define SUBLANG_MAORI_NEW_ZEALAND 0x01
+#define SUBLANG_MAPUDUNGUN_CHILE 0x01
+#define SUBLANG_MARATHI_INDIA 0x01
+#define SUBLANG_MOHAWK_MOHAWK 0x01
+#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
+#define SUBLANG_MONGOLIAN_PRC 0x02
+#define SUBLANG_NEPALI_INDIA 0x02
+#define SUBLANG_NEPALI_NEPAL 0x01
+#define SUBLANG_NORWEGIAN_BOKMAL 0x01
+#define SUBLANG_NORWEGIAN_NYNORSK 0x02
+#define SUBLANG_OCCITAN_FRANCE 0x01
+#define SUBLANG_ODIA_INDIA 0x01
+#define SUBLANG_ORIYA_INDIA 0x01
+#define SUBLANG_PASHTO_AFGHANISTAN 0x01
+#define SUBLANG_PERSIAN_IRAN 0x01
+#define SUBLANG_POLISH_POLAND 0x01
+#define SUBLANG_PORTUGUESE 0x02
+#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
+#define SUBLANG_PULAR_SENEGAL 0x02
+#define SUBLANG_PUNJABI_INDIA 0x01
+#define SUBLANG_PUNJABI_PAKISTAN 0x02
+#define SUBLANG_QUECHUA_BOLIVIA 0x01
+#define SUBLANG_QUECHUA_ECUADOR 0x02
+#define SUBLANG_QUECHUA_PERU 0x03
+#define SUBLANG_ROMANIAN_ROMANIA 0x01
+#define SUBLANG_ROMANSH_SWITZERLAND 0x01
+#define SUBLANG_RUSSIAN_RUSSIA 0x01
+#define SUBLANG_SAKHA_RUSSIA 0x01
+#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
+#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
+#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
+#define SUBLANG_SAMI_LULE_NORWAY 0x04
+#define SUBLANG_SAMI_LULE_SWEDEN 0x05
+#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
+#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
+#define SUBLANG_SAMI_SKOLT_FINLAND 0x08
+#define SUBLANG_SAMI_INARI_FINLAND 0x09
+#define SUBLANG_SANSKRIT_INDIA 0x01
+#define SUBLANG_SCOTTISH_GAELIC 0x01
+#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06
+#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07
+#define SUBLANG_SERBIAN_MONTENEGRO_LATIN 0x0b
+#define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC 0x0c
+#define SUBLANG_SERBIAN_SERBIA_LATIN 0x09
+#define SUBLANG_SERBIAN_SERBIA_CYRILLIC 0x0a
+#define SUBLANG_SERBIAN_CROATIA 0x01
+#define SUBLANG_SERBIAN_LATIN 0x02
+#define SUBLANG_SERBIAN_CYRILLIC 0x03
+#define SUBLANG_SINDHI_INDIA 0x01
+#define SUBLANG_SINDHI_PAKISTAN 0x02
+#define SUBLANG_SINDHI_AFGHANISTAN 0x02
+#define SUBLANG_SINHALESE_SRI_LANKA 0x01
+#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01
+#define SUBLANG_SLOVAK_SLOVAKIA 0x01
+#define SUBLANG_SLOVENIAN_SLOVENIA 0x01
+#define SUBLANG_SPANISH 0x01
+#define SUBLANG_SPANISH_MEXICAN 0x02
+#define SUBLANG_SPANISH_MODERN 0x03
+#define SUBLANG_SPANISH_GUATEMALA 0x04
+#define SUBLANG_SPANISH_COSTA_RICA 0x05
+#define SUBLANG_SPANISH_PANAMA 0x06
+#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+#define SUBLANG_SPANISH_VENEZUELA 0x08
+#define SUBLANG_SPANISH_COLOMBIA 0x09
+#define SUBLANG_SPANISH_PERU 0x0a
+#define SUBLANG_SPANISH_ARGENTINA 0x0b
+#define SUBLANG_SPANISH_ECUADOR 0x0c
+#define SUBLANG_SPANISH_CHILE 0x0d
+#define SUBLANG_SPANISH_URUGUAY 0x0e
+#define SUBLANG_SPANISH_PARAGUAY 0x0f
+#define SUBLANG_SPANISH_BOLIVIA 0x10
+#define SUBLANG_SPANISH_EL_SALVADOR 0x11
+#define SUBLANG_SPANISH_HONDURAS 0x12
+#define SUBLANG_SPANISH_NICARAGUA 0x13
+#define SUBLANG_SPANISH_PUERTO_RICO 0x14
+#define SUBLANG_SPANISH_US 0x15
+#define SUBLANG_SWAHILI_KENYA 0x01
+#define SUBLANG_SWEDISH 0x01
+#define SUBLANG_SWEDISH_FINLAND 0x02
+#define SUBLANG_SYRIAC_SYRIA 0x01
+#define SUBLANG_TAJIK_TAJIKISTAN 0x01
+#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
+#define SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH 0x04
+#define SUBLANG_TAMIL_INDIA 0x01
+#define SUBLANG_TAMIL_SRI_LANKA 0x02
+#define SUBLANG_TATAR_RUSSIA 0x01
+#define SUBLANG_TELUGU_INDIA 0x01
+#define SUBLANG_THAI_THAILAND 0x01
+#define SUBLANG_TIBETAN_PRC 0x01
+#define SUBLANG_TIGRIGNA_ERITREA 0x02
+#define SUBLANG_TIGRINYA_ERITREA 0x02
+#define SUBLANG_TIGRINYA_ETHIOPIA 0x01
+#define SUBLANG_TSWANA_BOTSWANA 0x02
+#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
+#define SUBLANG_TURKISH_TURKEY 0x01
+#define SUBLANG_TURKMEN_TURKMENISTAN 0x01
+#define SUBLANG_UIGHUR_PRC 0x01
+#define SUBLANG_UKRAINIAN_UKRAINE 0x01
+#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
+#define SUBLANG_URDU_PAKISTAN 0x01
+#define SUBLANG_URDU_INDIA 0x02
+#define SUBLANG_UZBEK_LATIN 0x01
+#define SUBLANG_UZBEK_CYRILLIC 0x02
+#define SUBLANG_VALENCIAN_VALENCIA 0x02
+#define SUBLANG_VIETNAMESE_VIETNAM 0x01
+#define SUBLANG_WELSH_UNITED_KINGDOM 0x01
+#define SUBLANG_WOLOF_SENEGAL 0x01
+#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
+#define SUBLANG_YAKUT_RUSSIA 0x01
+#define SUBLANG_YI_PRC 0x01
+#define SUBLANG_YORUBA_NIGERIA 0x01
+#define SUBLANG_ZULU_SOUTH_AFRICA 0x01
+
+#define SORT_DEFAULT 0x0
+#define SORT_INVARIANT_MATH 0x1
+#define SORT_JAPANESE_XJIS 0x0
+#define SORT_JAPANESE_UNICODE 0x1
+#define SORT_JAPANESE_RADICALSTROKE 0x4
+#define SORT_CHINESE_BIG5 0x0
+#define SORT_CHINESE_PRCP 0x0
+#define SORT_CHINESE_UNICODE 0x1
+#define SORT_CHINESE_PRC 0x2
+#define SORT_CHINESE_BOPOMOFO 0x3
+#define SORT_CHINESE_RADICALSTROKE 0x4
+#define SORT_KOREAN_KSC 0x0
+#define SORT_KOREAN_UNICODE 0x1
+#define SORT_GERMAN_PHONE_BOOK 0x1
+#define SORT_HUNGARIAN_DEFAULT 0x0
+#define SORT_HUNGARIAN_TECHNICAL 0x1
+#define SORT_GEORGIAN_TRADITIONAL 0x0
+#define SORT_GEORGIAN_MODERN 0x1
+
+#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
+#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
+
+#define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
+#define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)
+#define LOCALE_CUSTOM_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT)
+#define LOCALE_CUSTOM_UNSPECIFIED MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT)
+#define LOCALE_CUSTOM_UI_DEFAULT MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT)
+#define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT)
+#define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT)
+
#ifdef __cplusplus
} // extern "C"
#endif
#define LOCALE_SABBREVMONTHNAME13 0x100F
#define LOCALE_SPOSITIVESIGN 80
#define LOCALE_SNEGATIVESIGN 81
-#define LOCALE_SSCRIPTS 108
+#define LOCALE_SSCRIPTS 108 // FIXME
#define LOCALE_IPOSSIGNPOSN 82
#define LOCALE_INEGSIGNPOSN 83
#define LOCALE_IPOSSYMPRECEDES 84
#define LOCALE_IPOSSEPBYSPACE 85
#define LOCALE_INEGSYMPRECEDES 86
#define LOCALE_INEGSEPBYSPACE 87
-#if (WINVER >= 0x0400)
#define LOCALE_FONTSIGNATURE 88
#define LOCALE_SISO639LANGNAME 89
#define LOCALE_SISO3166CTRYNAME 90
-#define LOCALE_SNAME 92
-#endif
+#define LOCALE_SNAME 92 // FIXME
+
#if (WINVER >= 0x0600)
+#define LOCALE_SNAME 92
+#define LOCALE_SDURATION 93
+#define LOCALE_SKEYBOARDSTOINSTALL 94
+#define LOCALE_SSHORTESTDAYNAME1 96
+#define LOCALE_SSHORTESTDAYNAME2 97
+#define LOCALE_SSHORTESTDAYNAME3 98
+#define LOCALE_SSHORTESTDAYNAME4 99
+#define LOCALE_SSHORTESTDAYNAME5 100
+#define LOCALE_SSHORTESTDAYNAME6 101
+#define LOCALE_SSHORTESTDAYNAME7 102
+#define LOCALE_SISO639LANGNAME2 103
+#define LOCALE_SISO3166CTRYNAME2 104
+#define LOCALE_SNAN 105
+#define LOCALE_SPOSINFINITY 106
+#define LOCALE_SNEGINFINITY 107
#define LOCALE_SSCRIPTS 108
-#endif
-#define LOCALE_SYSTEM_DEFAULT 0x800
-#define LOCALE_USER_DEFAULT 0x400
+#define LOCALE_SPARENT 109
+#define LOCALE_SCONSOLEFALLBACKNAME 110
+#endif /* (WINVER >= 0x0600) */
+//#if (WINVER >= _WIN32_WINNT_WIN7)
#define LOCALE_IREADINGLAYOUT 0x0070
#define LOCALE_INEUTRAL 0x0071
+#define LOCALE_INEGATIVEPERCENT 0x0074
+#define LOCALE_IPOSITIVEPERCENT 0x0075
+#define LOCALE_SPERCENT 0x0076
+#define LOCALE_SPERMILLE 0x0077
+#define LOCALE_SMONTHDAY 0x0078
+#define LOCALE_SSHORTTIME 0x0079
+#define LOCALE_SOPENTYPELANGUAGETAG 0x007a
+#define LOCALE_SSORTLOCALE 0x007b
+//#endif /* (WINVER >= _WIN32_WINNT_WIN7) */
-#if defined(__GNUC__)
-# define LOCALE_NAME_INVARIANT (const WCHAR []){ 0 }
-#elif defined(_MSC_VER)
-# define LOCALE_NAME_INVARIANT L""
-#else
-static const WCHAR LOCALE_NAME_INVARIANT[] = { 0 };
-#endif
-
-#if defined(__GNUC__)
-# define LOCALE_NAME_SYSTEM_DEFAULT (const WCHAR []){'!','s','y','s','-','d','e','f','a','u','l','t','-','l','o','c','a','l','e',0}
-#elif defined(_MSC_VER)
-# define LOCALE_NAME_SYSTEM_DEFAULT L"!sys-default-locale"
-#else
-static const WCHAR LOCALE_NAME_SYSTEM_DEFAULT[] = {'!','s','y','s','-','d','e','f','a','u','l','t','-','l','o','c','a','l','e',0};
-#endif
-
+#if (WINVER >= 0x0600)
#define LOCALE_NAME_USER_DEFAULT NULL
+#define LOCALE_NAME_INVARIANT L""
+#define LOCALE_NAME_SYSTEM_DEFAULT L"!sys-default-locale"
+#endif
#define LOCALE_IDEFAULTUNIXCODEPAGE 0x1030 /* Wine extension */
#define LANGIDFROMLCID(l) ((WORD)(l))
#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT)
#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT)
+#define LOCALE_SYSTEM_DEFAULT MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT)
+#define LOCALE_USER_DEFAULT MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT)
#define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT)
#define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT)
#define LOCALE_NAME_MAX_LENGTH 85
[out] DWORD *pulSSDIFlags,
[in] DWORD ulFlags);
-cpp_quote("#if _WIN32_WINNT >= 0x0600")
-
- /* Function 65 */
- DWORD PNP_GetObjectPropKeys(
- [in] handle_t hBinding,
- [in, string, ref] LPWSTR ObjectName,
- [in] DWORD ObjectType,
- [in, string, unique] LPWSTR PropertyCultureName,
- [in, out] PNP_PROP_COUNT *PropertyCount,
- [out] PNP_PROP_COUNT *TransferLen,
- [out, size_is(*PropertyCount), length_is(*TransferLen)] DEVPROPKEY *PropertyKeys,
- [in] DWORD Flags);
-
- /* Function 66 */
- DWORD PNP_GetObjectProp(
- [in] handle_t hBinding,
- [in, string, ref] LPWSTR ObjectName,
- [in] DWORD ObjectType,
- [in, string, unique] LPWSTR PropertyCultureName,
- [in] const DEVPROPKEY *PropertyKey,
- [out] DEVPROPTYPE *PropertyType,
- [in, out] PNP_PROP_SIZE *PropertySize,
- [out] PNP_PROP_SIZE *TransferLen,
- [out, size_is(*PropertySize), length_is(*TransferLen)] BYTE *PropertyBuffer,
- [in] DWORD Flags);
-
- /* Function 67 */
- DWORD PNP_SetObjectProp(
- [in] handle_t hBinding,
- [in, string, ref] LPWSTR ObjectName,
- [in] DWORD ObjectType,
- [in, string, unique] LPWSTR PropertyCultureName,
- [in] const DEVPROPKEY *PropertyKey,
- [in] DEVPROPTYPE PropertyType,
- [in] PNP_PROP_SIZE PropertySize,
- [in, unique, size_is(PropertySize)] BYTE *PropertyBuffer,
- [in] DWORD Flags);
-
- /* Function 68 */
- DWORD PNP_InstallDevInst(
- [in] handle_t hBinding); /* FIXME */
-
- /* Function 69 */
- DWORD PNP_ApplyPowerSettings(
- [in] handle_t hBinding); /* FIXME */
-
- /* Function 70 */
- DWORD PNP_DriverStoreAddDriverPackage(
- [in] handle_t hBinding); /* FIXME */
-
- /* Function 71 */
- DWORD PNP_DriverStoreDeleteDriverPackage(
- [in] handle_t hBinding); /* FIXME */
-
- /* Function 72 */
- DWORD PNP_RegisterServiceNotification(
- [in] handle_t hBinding); /* FIXME */
-
- /* Function 73 */
- DWORD PNP_SetActiveService(
- [in] handle_t hBinding); /* FIXME */
-
- /* Function 74 */
- DWORD PNP_DeleteServiceDevices(
- [in] handle_t hBinding); /* FIXME */
-
-cpp_quote("#endif /* WIN32_WINNT >= 0x0600 */")
cpp_quote("#endif /* WIN32_WINNT >= 0x0501 */")
}
#define EXCEPTION_VM86_PICRETURN 0x80000112
#ifndef _RTLTYPES_H
-typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
- (struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
-
struct _EXCEPTION_REGISTRATION_RECORD;
+
+typedef
+DWORD
+(*PEXCEPTION_HANDLER)(
+ struct _EXCEPTION_RECORD*,
+ struct _EXCEPTION_REGISTRATION_RECORD *,
+ struct _CONTEXT*,
+ struct _EXCEPTION_REGISTRATION_RECORD**);
+
typedef struct _EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
struct _EXCEPTION_REGISTRATION_RECORD
extern void winetest_add_failures( LONG new_failures );
extern void winetest_wait_child_process( HANDLE process );
-extern const char *wine_dbgstr_wn( const WCHAR *str, int n );
+extern const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n );
extern const char *wine_dbgstr_guid( const GUID *guid );
static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
}
}
-const char *wine_dbgstr_wn( const WCHAR *str, int n )
+const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n )
{
char *dst, *res;
size_t size;
add_library(libmpg123 ${SOURCE})
add_dependencies(libmpg123 psdk)
add_pch(libmpg123 precomp.h SOURCE)
+
+if(NOT MSVC)
+ add_target_compile_flags(libmpg123 "-Wno-unused-but-set-variable")
+endif()
PHHIVE RegistryHive)
{
ULONG FileOffset;
- ULONG BufferSize;
- ULONG BitmapSize;
+ UINT32 BufferSize;
+ UINT32 BitmapSize;
PUCHAR Buffer;
PUCHAR Ptr;
ULONG BlockIndex;
BufferSize = HV_LOG_HEADER_SIZE + sizeof(ULONG) + BitmapSize;
BufferSize = ROUND_UP(BufferSize, HV_BLOCK_SIZE);
- DPRINT("Bitmap size %lu buffer size: %lu\n", BitmapSize, BufferSize);
+ DPRINT("Bitmap size %u buffer size: %u\n", BitmapSize, BufferSize);
Buffer = RegistryHive->Allocate(BufferSize, TRUE, TAG_CM);
if (Buffer == NULL)
typedef VOID (NTAPI *PHIDPARSER_FREE_FUNCTION)(PVOID Item);
typedef VOID (NTAPI *PHIDPARSER_ZERO_FUNCTION)(PVOID Item, ULONG Size);
typedef VOID (NTAPI *PHIDPARSER_COPY_FUNCTION)(PVOID Target, PVOID Source, ULONG Size);
-typedef VOID (NTAPI *PHIDPARSER_DEBUG_FUNCTION)(LPCSTR Src, ...);
+typedef VOID (__cdecl *PHIDPARSER_DEBUG_FUNCTION)(LPCSTR Src, ...);
//
// status code
int CDECL _resetstkoflw(void)
{
int stack_addr;
+ DWORD oldprot;
/* causes stack fault that updates NtCurrentTeb()->Tib.StackLimit */
- return VirtualProtect( &stack_addr, 1, PAGE_GUARD|PAGE_READWRITE, NULL );
+ return VirtualProtect(&stack_addr, 1, PAGE_GUARD|PAGE_READWRITE, &oldprot);
}
#define _CHAR_ char
#define _EOF_ EOF
#define _EOF_RET EOF
-#define _ISSPACE_(c) isspace((unsigned char)(c))
-#define _ISDIGIT_(c) isdigit((unsigned char)(c))
+#define _ISSPACE_(c) isspace(c)
+#define _ISDIGIT_(c) isdigit(c)
#define _WIDE2SUPPORTED_(c) c /* FIXME: convert wide char to char */
#define _CHAR2SUPPORTED_(c) c /* No conversion needed (char to char) */
#define _CHAR2DIGIT_(c, base) char2digit((c), (base))
#ifdef CONSOLE
#define _GETC_(file) (consumed++, _getch())
#define _UNGETC_(nch, file) do { _ungetch(nch); consumed--; } while(0)
+#define _LOCK_FILE_(file) _lock_file(stdin)
+#define _UNLOCK_FILE_(file) _unlock_file(stdin)
+#ifdef WIDE_SCANF
+#ifdef SECURE
+#define _FUNCTION_ static int vcwscanf_s_l(const char *format, _locale_t locale, __ms_va_list ap)
+#else /* SECURE */
+#define _FUNCTION_ static int vcwscanf_l(const char *format, _locale_t locale, __ms_va_list ap)
+#endif /* SECURE */
+#else /* WIDE_SCANF */
#ifdef SECURE
#define _FUNCTION_ static int vcscanf_s_l(const char *format, _locale_t locale, __ms_va_list ap)
#else /* SECURE */
#define _FUNCTION_ static int vcscanf_l(const char *format, _locale_t locale, __ms_va_list ap)
#endif /* SECURE */
+#endif /* WIDE_SCANF */
#else
#ifdef STRING
#undef _EOF_
#define _EOF_ 0
+#ifdef STRING_LEN
+#define _GETC_(file) (consumed==length ? '\0' : (consumed++, *file++))
+#define _UNGETC_(nch, file) do { file--; consumed--; } while(0)
+#define _LOCK_FILE_(file) do {} while(0)
+#define _UNLOCK_FILE_(file) do {} while(0)
+#ifdef WIDE_SCANF
+#ifdef SECURE
+#define _FUNCTION_ static int vsnwscanf_s_l(const wchar_t *file, size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
+#else /* SECURE */
+#define _FUNCTION_ static int vsnwscanf_l(const wchar_t *file, size_t length, const wchar_t *format, _locale_t locale, __ms_va_list ap)
+#endif /* SECURE */
+#else /* WIDE_SCANF */
+#ifdef SECURE
+#define _FUNCTION_ static int vsnscanf_s_l(const char *file, size_t length, const char *format, _locale_t locale, __ms_va_list ap)
+#else /* SECURE */
+#define _FUNCTION_ static int vsnscanf_l(const char *file, size_t length, const char *format, _locale_t locale, __ms_va_list ap)
+#endif /* SECURE */
+#endif /* WIDE_SCANF */
+#else /* STRING_LEN */
#define _GETC_(file) (consumed++, *file++)
#define _UNGETC_(nch, file) do { file--; consumed--; } while(0)
+#define _LOCK_FILE_(file) do {} while(0)
+#define _UNLOCK_FILE_(file) do {} while(0)
#ifdef WIDE_SCANF
#ifdef SECURE
#define _FUNCTION_ static int vswscanf_s_l(const wchar_t *file, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#define _FUNCTION_ static int vsscanf_l(const char *file, const char *format, _locale_t locale, __ms_va_list ap)
#endif /* SECURE */
#endif /* WIDE_SCANF */
+#endif /* STRING_LEN */
#else /* STRING */
#ifdef WIDE_SCANF
#define _GETC_(file) (consumed++, fgetwc(file))
#define _UNGETC_(nch, file) do { ungetwc(nch, file); consumed--; } while(0)
+#define _LOCK_FILE_(file) _lock_file(file)
+#define _UNLOCK_FILE_(file) _unlock_file(file)
#ifdef SECURE
#define _FUNCTION_ static int vfwscanf_s_l(FILE* file, const wchar_t *format, _locale_t locale, __ms_va_list ap)
#else /* SECURE */
#else /* WIDE_SCANF */
#define _GETC_(file) (consumed++, fgetc(file))
#define _UNGETC_(nch, file) do { ungetc(nch, file); consumed--; } while(0)
+#define _LOCK_FILE_(file) _lock_file(file)
+#define _UNLOCK_FILE_(file) _unlock_file(file)
#ifdef SECURE
#define _FUNCTION_ static int vfscanf_s_l(FILE* file, const char *format, _locale_t locale, __ms_va_list ap)
#else /* SECURE */
TRACE("(%s):\n", debugstr_a(format));
#else /* CONSOLE */
#ifdef STRING
- TRACE("%s (%s)\n", file, debugstr_a(format));
+ TRACE("%s (%s)\n", debugstr_a(file), debugstr_a(format));
#else /* STRING */
TRACE("%p (%s)\n", file, debugstr_a(format));
#endif /* STRING */
#endif /* CONSOLE */
#endif /* WIDE_SCANF */
+ _LOCK_FILE_(file);
nch = _GETC_(file);
if (nch == _EOF_) {
+ _UNLOCK_FILE_(file);
return _EOF_RET;
}
base = 0;
number: {
/* read an integer */
- __int64 cur = 0;
+ ULONGLONG cur = 0;
int negative = 0;
int seendigit=0;
/* skip initial whitespace */
if (!seendigit) break; /* not a valid number */
st = 1;
if (!suppress) {
-#define _SET_NUMBER_(type) *va_arg(ap, type*) = (type)(negative ? -cur : cur)
+#define _SET_NUMBER_(type) *va_arg(ap, type*) = negative ? -cur : cur
if (I64_prefix) _SET_NUMBER_(LONGLONG);
else if (l_prefix) _SET_NUMBER_(LONG);
else if (h_prefix == 1) _SET_NUMBER_(short int);
#endif /* WIDE_SCANF */
charstring: { /* read a word into a char */
char *sptr = suppress ? NULL : va_arg(ap, char*);
+ char *sptr_beg = sptr;
+#ifdef SECURE
+ unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned);
+#else
+ unsigned size = UINT_MAX;
+#endif
/* skip initial whitespace */
while ((nch!=_EOF_) && _ISSPACE_(nch))
nch = _GETC_(file);
/* read until whitespace */
while (width!=0 && (nch!=_EOF_) && !_ISSPACE_(nch)) {
- if (!suppress) *sptr++ = _CHAR2SUPPORTED_(nch);
+ if (!suppress) {
+ *sptr++ = _CHAR2SUPPORTED_(nch);
+ if(size>1) size--;
+ else {
+ _UNLOCK_FILE_(file);
+ *sptr_beg = 0;
+ return rd;
+ }
+ }
st++;
nch = _GETC_(file);
if (width>0) width--;
break;
widecharstring: { /* read a word into a wchar_t* */
wchar_t *sptr = suppress ? NULL : va_arg(ap, wchar_t*);
+ wchar_t *sptr_beg = sptr;
+#ifdef SECURE
+ unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned);
+#else
+ unsigned size = UINT_MAX;
+#endif
/* skip initial whitespace */
while ((nch!=_EOF_) && _ISSPACE_(nch))
nch = _GETC_(file);
/* read until whitespace */
while (width!=0 && (nch!=_EOF_) && !_ISSPACE_(nch)) {
- if (!suppress) *sptr++ = _WIDE2SUPPORTED_(nch);
+ if (!suppress) {
+ *sptr++ = _WIDE2SUPPORTED_(nch);
+ if(size>1) size--;
+ else {
+ _UNLOCK_FILE_(file);
+ *sptr_beg = 0;
+ return rd;
+ }
+ }
st++;
nch = _GETC_(file);
if (width>0) width--;
#endif /* WIDE_SCANF */
character: { /* read single character into char */
char *str = suppress ? NULL : va_arg(ap, char*);
+ char *pstr = str;
+#ifdef SECURE
+ unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned)/sizeof(char);
+#else
+ unsigned size = UINT_MAX;
+#endif
if (width == -1) width = 1;
- while ((width != 0) && (nch != _EOF_))
+ while (width && (nch != _EOF_))
{
- if (!suppress) *str++ = _CHAR2SUPPORTED_(nch);
+ if (!suppress) {
+ *str++ = _CHAR2SUPPORTED_(nch);
+ if(size) size--;
+ else {
+ _UNLOCK_FILE_(file);
+ *pstr = 0;
+ return rd;
+ }
+ }
st++;
width--;
nch = _GETC_(file);
break;
widecharacter: { /* read single character into a wchar_t */
wchar_t *str = suppress ? NULL : va_arg(ap, wchar_t*);
+ wchar_t *pstr = str;
+#ifdef SECURE
+ unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned)/sizeof(wchar_t);
+#else
+ unsigned size = UINT_MAX;
+#endif
if (width == -1) width = 1;
- while ((width != 0) && (nch != _EOF_))
+ while (width && (nch != _EOF_))
{
- if (!suppress) *str++ = _WIDE2SUPPORTED_(nch);
+ if (!suppress) {
+ *str++ = _WIDE2SUPPORTED_(nch);
+ if(size) size--;
+ else {
+ _UNLOCK_FILE_(file);
+ *pstr = 0;
+ return rd;
+ }
+ }
st++;
width--;
nch = _GETC_(file);
RTL_BITMAP bitMask;
ULONG *Mask;
int invert = 0; /* Set if we are NOT to find the chars */
+#ifdef SECURE
+ unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned)/sizeof(_CHAR_);
+#else
+ unsigned size = UINT_MAX;
+#endif
- /* Init our bitmap */
- Mask = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _BITMAPSIZE_/8);
- RtlInitializeBitMap(&bitMask, Mask, _BITMAPSIZE_);
+ /* Init our bitmap */
+ Mask = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _BITMAPSIZE_/8);
+ RtlInitializeBitMap(&bitMask, Mask, _BITMAPSIZE_);
/* Read the format */
format++;
if ((*(format - 1)) < *(format + 1))
RtlSetBits(&bitMask, *(format - 1) +1 , *(format + 1) - *(format - 1));
else
- RtlSetBits(&bitMask, *(format + 1) , *(format - 1) - *(format + 1));
+ RtlSetBits(&bitMask, *(format + 1) , *(format - 1) - *(format + 1));
format++;
} else
RtlSetBits(&bitMask, *format, 1);
st++;
nch = _GETC_(file);
if (width>0) width--;
+ if(size>1) size--;
+ else {
+ _UNLOCK_FILE_(file);
+ *str = 0;
+ return rd;
+ }
}
/* terminate */
if (!suppress) *sptr = 0;
- HeapFree(GetProcessHeap(), 0, Mask);
+ HeapFree(GetProcessHeap(), 0, Mask);
}
break;
default:
}
TRACE("returning %d\n", rd);
+ _UNLOCK_FILE_(file);
return rd;
}
#undef _CHAR2DIGIT_
#undef _GETC_
#undef _UNGETC_
+#undef _LOCK_FILE_
+#undef _UNLOCK_FILE_
#undef _FUNCTION_
#undef _BITMAPSIZE_
reactos/lib/sdk/crt/except/cpp.c # Synced at 20080528
reactos/lib/sdk/crt/except/cppexcept.c # Synced at 20071111
reactos/lib/sdk/crt/signal/xcptinfo.c # Synced to Wine-1.7.17
- reactos/lib/sdk/crt/string/scanf.c/h # Synced to Wine-1_1_27
+ reactos/lib/sdk/crt/string/scanf.c/h # Synced to Wine-1.7.17
reactos/lib/sdk/crt/strings/wcs.c # Synced at 20080611
reactos/lib/sdk/crt/wine/heap.c # Synced at 20080529
reactos/lib/sdk/crt/wine/undname.c # Synced at 20081130
-if(NOT ARCH STREQUAL "amd64")
-
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/rostests/)
add_subdirectory(rostests)
endif()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/wallpaper/)
add_subdirectory(wallpaper)
endif()
-
-endif()
&MArea,
FALSE,
AllocationType,
- PAGE_SIZE);
+ *BaseAddress ?
+ PAGE_SIZE : MM_ALLOCATION_GRANULARITY);
if (!NT_SUCCESS(Status))
{
goto Cleanup;
}
+ if (Kcb->KeyHive == &CmiVolatileHive->Hive)
+ {
+ /* Keys that are directly in the master hive can't be saved */
+ Status = STATUS_ACCESS_DENIED;
+ goto Cleanup;
+ }
+
/* Create a new hive that will hold the key */
Status = CmpInitializeHive(&KeyHive,
HINIT_CREATE,
IN ULONG Flags)
{
/* FIXME: HACK! */
+ DPRINT1("CmCheckRegistry(0x%p, %lu) is UNIMPLEMENTED!\n", RegistryHive, Flags);
return 0;
}
(OperationType == HINIT_MAPFILE))
{
/* Verify integrity */
- if (CmCheckRegistry((PCMHIVE)Hive, TRUE))
+ ULONG CheckStatus = CmCheckRegistry(Hive, CheckFlags);
+ if (CheckStatus != 0)
{
/* Cleanup allocations and fail */
ExFreePoolWithTag(Hive->FlusherLock, TAG_CM);
{
/* Get the key body */
KeyBody = CONTAINING_RECORD(NextEntry, CM_KEY_BODY, KeyBodyList);
- ASSERT(KeyBody->Type == '20yk');
+ ASSERT(KeyBody->Type == CM_KEY_BODY_TYPE);
/* Check for notifications */
if (KeyBody->NotifyBlock)
/* Setup the key body */
KeyBody = (PCM_KEY_BODY)(*Object);
- KeyBody->Type = '20yk';
+ KeyBody->Type = CM_KEY_BODY_TYPE;
KeyBody->KeyControlBlock = NULL;
/* Check if we had a class */
/* Get the key body and fill it out */
KeyBody = (PCM_KEY_BODY)(*Object);
KeyBody->KeyControlBlock = Kcb;
- KeyBody->Type = '20yk';
+ KeyBody->Type = CM_KEY_BODY_TYPE;
KeyBody->ProcessID = PsGetCurrentProcessId();
KeyBody->NotifyBlock = NULL;
CmpLockRegistry();
/* Make sure this is a valid key body */
- if (KeyBody->Type == '20yk')
+ if (KeyBody->Type == CM_KEY_BODY_TYPE)
{
/* Get the KCB */
Kcb = KeyBody->KeyControlBlock;
if (SystemHandleCount > 1) return;
/* Make sure we're a valid key body */
- if (KeyBody->Type == '20yk')
+ if (KeyBody->Type == CM_KEY_BODY_TYPE)
{
/* Don't do anything if we don't have a notify block */
if (!KeyBody->NotifyBlock) return;
LogHandle,
NULL,
HiveName,
- 0);
+ CheckFlags);
if (!NT_SUCCESS(Status))
{
/* Fail */
/* Success, return hive */
*Hive = NewHive;
- /* ROS: Init root key cell and prepare the hive */
+ /* HACK: ROS: Init root key cell and prepare the hive */
if (Operation == HINIT_CREATE) CmCreateRootNode(&NewHive->Hive, L"");
/* Duplicate the hive name */
/* Initialize the object */
RootKey->KeyControlBlock = Kcb;
- RootKey->Type = '20yk';
+ RootKey->Type = CM_KEY_BODY_TYPE;
RootKey->NotifyBlock = NULL;
RootKey->ProcessID = PsGetCurrentProcessId();
#define CM_KCB_INVALID_CACHED_INFO 0x40
#define CM_KCB_READ_ONLY_KEY 0x80
+//
+// CM_KEY_BODY Types
+//
+#define CM_KEY_BODY_TYPE 0x6B793032
+
//
// CM_KEY_VALUE Types
//
}
}
+ DPRINT("NtAllocateVirtualMemory: Process 0x%p, Address 0x%p, Zerobits %lu , RegionSize 0x%x, Allocation type 0x%x, Protect 0x%x.\n",
+ Process, PBaseAddress, ZeroBits, PRegionSize, AllocationType, Protect);
+
//
// Check for large page allocations and make sure that the required privilege
// is being held, before attempting to handle them.
//
}
_SEH2_END;
+ DPRINT("Reserved %x bytes at %p.\n", PRegionSize, StartingAddress);
return STATUS_SUCCESS;
}
}
}
+ DPRINT("NtFreeVirtualMemory: Process 0x%p, Adress 0x%p, size 0x%x, FreeType %x.\n",
+ Process, PBaseAddress, PRegionSize, FreeType);
+
//
// Lock the address space
//
ASSERT(Vad->StartingVpn << PAGE_SHIFT == (ULONG_PTR)MemoryArea->StartingAddress);
ASSERT((Vad->EndingVpn + 1) << PAGE_SHIFT == (ULONG_PTR)MemoryArea->EndingAddress);
Vad->EndingVpn = ((ULONG_PTR)StartingAddress - 1) >> PAGE_SHIFT;
- MemoryArea->EndingAddress = (PVOID)(((Vad->EndingVpn + 1) << PAGE_SHIFT) - 1);
+ MemoryArea->EndingAddress = (PVOID)(StartingAddress);
}
else
{
Vad->EndingVpn = Vad->StartingVpn;
}
Vad->u.VadFlags.Spare = 1;
- Vad->u.VadFlags.PrivateMemory = 1;
Vad->u.VadFlags.Protection = MiMakeProtectionMask(marea->Protect);
/* Insert the VAD */
return(STATUS_UNSUCCESSFUL);
}
- MemoryArea->DeleteInProgress = TRUE;
Section = MemoryArea->Data.SectionData.Section;
Segment = MemoryArea->Data.SectionData.Segment;
#ifdef NEWCC
- if (Segment->Flags & MM_DATAFILE_SEGMENT)
- return MmUnmapViewOfCacheSegment(AddressSpace, BaseAddress);
+ if (Segment->Flags & MM_DATAFILE_SEGMENT)
+ {
+ MmUnlockAddressSpace(AddressSpace);
+ Status = MmUnmapViewOfCacheSegment(AddressSpace, BaseAddress);
+ MmLockAddressSpace(AddressSpace);
+
+ return Status;
+ }
#endif
+ MemoryArea->DeleteInProgress = TRUE;
+
MmLockSectionSegment(Segment);
RegionListHead = &MemoryArea->Data.SectionData.RegionListHead;
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
BaseAddress);
if (MemoryArea == NULL ||
- MemoryArea->Type != MEMORY_AREA_SECTION_VIEW ||
+ ((MemoryArea->Type != MEMORY_AREA_SECTION_VIEW) &&
+ (MemoryArea->Type != MEMORY_AREA_CACHE)) ||
MemoryArea->DeleteInProgress)
{
if (MemoryArea) NT_ASSERT(MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3);
return STATUS_NOT_MAPPED_VIEW;
}
- MemoryArea->DeleteInProgress = TRUE;
-
Section = MemoryArea->Data.SectionData.Section;
- if (Section->AllocationAttributes & SEC_IMAGE)
+ if ((Section != NULL) && (Section->AllocationAttributes & SEC_IMAGE))
{
ULONG i;
ULONG NrSegments;
SectionSegments = ImageSectionObject->Segments;
NrSegments = ImageSectionObject->NrSegments;
+ MemoryArea->DeleteInProgress = TRUE;
+
/* Search for the current segment within the section segments
* and calculate the image base address */
for (i = 0; i < NrSegments; i++)
ProcessBasicInfo->UniqueProcessId = (ULONG_PTR)Process->
UniqueProcessId;
ProcessBasicInfo->InheritedFromUniqueProcessId =
- (ULONG)Process->InheritedFromUniqueProcessId;
+ (ULONG_PTR)Process->InheritedFromUniqueProcessId;
ProcessBasicInfo->BasePriority = Process->Pcb.BasePriority;
}
root = RtlImageDirectoryEntryToData( BaseAddress, TRUE, IMAGE_DIRECTORY_ENTRY_RESOURCE, &size );
if (!root) return STATUS_RESOURCE_DATA_NOT_FOUND;
+ if (size < sizeof(*resdirptr)) return STATUS_RESOURCE_DATA_NOT_FOUND;
resdirptr = root;
if (!level--) goto done;
WORD KeybdBufferEnd; // 0x82
BYTE ScreenRows; // 0x84
WORD CharacterHeight; // 0x85
- BYTE EGAFlags[2]; // 0x87
+ BYTE VGAOptions; // 0x87
+ BYTE VGASwitches; // 0x88
BYTE VGAFlags[2]; // 0x89
DWORD Reserved3; // 0x8b
BYTE Reserved4; // 0x8f
((PULONG)BaseAddress)[0x43] = (ULONG)NULL;
((PULONG)BaseAddress)[0x44] = (ULONG)NULL;
+ /* Initialize the VGA BDA data */
+ Bda->VGAOptions = 0x30; /* 256 KB Video RAM */
+ Bda->VGASwitches = 0x09; /* High-resolution */
+
//
// FIXME: At the moment we always set a VGA mode. In the future,
// we should set this mode **only** when:
PIMAGE_DOS_HEADER Header;
PDWORD RelocationTable;
PWORD RelocWord;
+ LPSTR CmdLinePtr = (LPSTR)CommandLine;
DPRINT1("DosLoadExecutable(%d, %s, %s, %s, 0x%08X, 0x%08X)\n",
LoadType,
}
/* NULL-terminate the command line by removing the return carriage character */
- while (*CommandLine && *CommandLine != '\r') CommandLine++;
- *(LPSTR)CommandLine = '\0';
+ while (*CmdLinePtr && *CmdLinePtr != '\r') CmdLinePtr++;
+ *CmdLinePtr = '\0';
/* Open a handle to the executable */
FileHandle = CreateFileA(ExecutablePath,
STRINGTABLE
BEGIN
- IDS_VDM_DUMPMEM, "Dump &Memory"
+ IDS_VDM_DUMPMEM, "Zrzut &Pamięci"
IDS_VDM_QUIT , "&Wyjdź z ReactOS VDM"
END
NTAPI
CsrInitializeProcessStructure(VOID);
-// NTSTATUS WINAPI CsrEnumProcesses(CSRSS_ENUM_PROCESS_PROC EnumProc,
-// PVOID Context);
PCSR_THREAD
NTAPI
CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL,
@ stdcall CsrDereferenceWait(ptr)
@ stdcall CsrDestroyProcess(ptr long)
@ stdcall CsrDestroyThread(ptr)
-;@ stdcall CsrEnumProcesses(ptr ptr) ;;;;;;; Temporary hack used in win32csr, to be removed
@ stdcall CsrExecServerThread(ptr long)
@ stdcall CsrGetProcessLuid(ptr ptr)
@ stdcall CsrImpersonateClient(ptr)
}
}
-/*++
- * @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 */
-/*
- /\* 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 */
- // FIXME: if ((CsrProcess->ShutdownLevel > Level) || !(ReturnCsrProcess))
- 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;
-}
-
/*++
* @name CsrProcessRefcountZero
*
sizeof(PriorityClass));
}
+/*++
+ * @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;
+ 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)
+ {
+ /* 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);
+ if (CsrImpersonateClient(CsrThread))
+ {
+ Status = CsrGetProcessLuid(NULL, &ProcessLuid);
+ CsrRevertToSelf();
+ }
+ else
+ {
+ Status = STATUS_BAD_IMPERSONATION_LEVEL;
+ }
+ }
+ }
+
+ 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;
+}
+
/*++
* @name CsrShutdownProcesses
* @implemented NT4
BOOLEAN FirstTry;
ULONG i;
PCSR_SERVER_DLL ServerDll;
- ULONG Result = 0; /* Intentionally invalid enumeratee to silence compiler warning */
+ ULONG Result = 0;
/* Acquire process lock */
CsrAcquireProcessLock();
}
/* No matches during the first try, so loop again */
- if ((FirstTry) && (Result == CsrShutdownNonCsrProcess))
+ if (FirstTry && (Result == CsrShutdownNonCsrProcess))
{
FirstTry = FALSE;
continue;
return Status;
}
-/* HACK: Temporary hack. This is really "CsrShutdownProcesses", mostly. Used by winsrv */
-#if 0
-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);
-
- /* Move to the next entry */
- NextEntry = NextEntry->Flink;
-
- /* Remove the skip flag, set shutdown flags to 0 */
- CsrProcess->Flags &= ~CsrProcessSkipShutdown;
- CsrProcess->ShutdownFlags = 0;
- }
-
- /* 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;
-}
-#endif
-
/*++
* @name CsrUnlockProcess
* @implemented NT4
#define FLOATOBJ_16 {0x40000000, 0x00000006}
#define FLOATOBJ_1_16 {0x40000000, 0xfffffffe}
-#define FLOATOBJ_Set0(fo) (fo)->ul1 = 0; (fo)->ul2 = 0;
-#define FLOATOBJ_Set1(fo) (fo)->ul1 = 0x40000000; (fo)->ul2 = 2;
+#define FLOATOBJ_Set0(fo) do { (fo)->ul1 = 0; (fo)->ul2 = 0; } while (0)
+#define FLOATOBJ_Set1(fo) do { (fo)->ul1 = 0x40000000; (fo)->ul2 = 2; } while (0)
#else
if (pldev->pGdiDriverInfo)
{
/* Check for match (case insensative) */
- if (RtlEqualUnicodeString(&pldev->pGdiDriverInfo->DriverName, &strDriverName, 1))
+ if (RtlEqualUnicodeString(&pldev->pGdiDriverInfo->DriverName, &strDriverName, TRUE))
{
/* Image found in LDEV list */
break;
#include <ftoutln.h>
#include <ftwinfnt.h>
+#include <gdi/eng/floatobj.h>
+
#define NDEBUG
#include <debug.h>
USHORT DxShift;
PMATRIX pmxWorldToDevice;
LONG fixAscender, fixDescender;
+ FLOATOBJ Scale;
// TODO: Write test-cases to exactly match real Windows in different
// bad parameters (e.g. does Windows check the DC or the RECT first?).
}
else
{
- TextLeft += Dx[i<<DxShift] << 6;
- DPRINT("New TextLeft2: %I64d\n", TextLeft);
+ Scale = pdcattr->mxWorldToDevice.efM11;
+ if (_FLOATOBJ_Equal0(&Scale))
+ FLOATOBJ_Set1(&Scale);
+
+ FLOATOBJ_MulLong(&Scale, Dx[i<<DxShift] << 6); // do the shift before multiplying to preserve precision
+ TextLeft += FLOATOBJ_GetLong(&Scale);
+ DPRINT("New TextLeft2: %I64d\n", TextLeft);
}
if (DxShift)
UserThreadWOWInformation,
UserThreadHungStatus,
UserThreadInitiateShutdown,
-
UserThreadEndShutdown,
UserThreadUseActiveDesktop,
UserThreadUseDesktop,
#define MSQ_STATE_MENUOWNER 0x4
#define MSQ_STATE_MOVESIZE 0x5
#define MSQ_STATE_CARET 0x6
-#define TWOPARAM_ROUTINE_SETCARETPOS 0xfffd0060
#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE 0x1004
#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT 0x1005
/* Compare the name */
if (RtlEqualUnicodeString(RemainingName,
&DesktopName,
- (Attributes & OBJ_CASE_INSENSITIVE)))
+ (Attributes & OBJ_CASE_INSENSITIVE) != 0))
{
/* We found a match. Did this come from a create? */
if (Context)
HANDLE OldTID, NewTID;
PTHREADINFO pti, ptiOld, ptiNew;
BOOL InAAPM = FALSE;
+
+ //ERR("SendActivateMessages\n");
+
pti = PsGetCurrentThreadWin32Thread();
if (Window)
{
-
UserRefObjectCo(Window, &Ref);
if (WindowPrev) UserRefObjectCo(WindowPrev, &RefPrev);
ExFreePool(phwndTopLevel);
}
}
- ////
+ }
+ ////
+ OldTID = WindowPrev ? IntGetWndThreadId(WindowPrev) : NULL;
+ NewTID = Window ? IntGetWndThreadId(Window) : NULL;
+ ptiOld = WindowPrev ? WindowPrev->head.pti : NULL;
+ ptiNew = Window ? Window->head.pti : NULL;
+
+ //ERR("SendActivateMessage Old -> %x, New -> %x\n", OldTID, NewTID);
+ if (!(pti->TIF_flags & TIF_INACTIVATEAPPMSG) &&
+ (!WindowPrev || OldTID != NewTID) )
+ {
+ PWND cWindow;
+ HWND *List, *phWnd;
+
+ List = IntWinListChildren(UserGetDesktopWindow());
+ if ( List )
+ {
+ if ( OldTID )
+ {
+ ptiOld->TIF_flags |= TIF_INACTIVATEAPPMSG;
+ // Note: Do not set pci flags, this does crash!
+ for (phWnd = List; *phWnd; ++phWnd)
+ {
+ cWindow = ValidateHwndNoErr(*phWnd);
+ if (cWindow && cWindow->head.pti == ptiOld)
+ { // FALSE if the window is being deactivated,
+ // ThreadId that owns the window being activated.
+ //ERR("SendActivateMessage Old\n");
+ co_IntSendMessageNoWait(*phWnd, WM_ACTIVATEAPP, FALSE, (LPARAM)NewTID);
+ }
+ }
+ ptiOld->TIF_flags &= ~TIF_INACTIVATEAPPMSG;
+ }
+ if ( NewTID )
+ { //// Prevents a resource crash due to reentrance!
+ InAAPM = TRUE;
+ pti->TIF_flags |= TIF_INACTIVATEAPPMSG;
+ ////
+ for (phWnd = List; *phWnd; ++phWnd)
+ {
+ cWindow = ValidateHwndNoErr(*phWnd);
+ if (cWindow && cWindow->head.pti == ptiNew)
+ { // TRUE if the window is being activated,
+ // ThreadId that owns the window being deactivated.
+ //ERR("SendActivateMessage New\n");
+ co_IntSendMessageNoWait(*phWnd, WM_ACTIVATEAPP, TRUE, (LPARAM)OldTID);
+ }
+ }
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+ }
+
+ if (Window)
+ {
if (WindowPrev)
UserDerefObjectCo(WindowPrev); // Now allow the previous window to die.
for(Child = Root->spwndChild; Child; Child = Child->spwndNext)
{
- OwnerWnd = Child->spwndOwner;
+ OwnerWnd = Child->spwndOwner;
if(!OwnerWnd)
continue;
}
else
{
- pwndMsg = co_WinPosWindowFromPoint(NULL, &msg->pt, &hittest, TRUE);
+ pwndMsg = co_WinPosWindowFromPoint(NULL, &msg->pt, &hittest, FALSE);//TRUE);
}
TRACE("Got mouse message for %p, hittest: 0x%x\n", msg->hwnd, hittest);
CONST RECT *lpUnsafeRect,
BOOL bErase)
{
- return NtUserRedrawWindow(hWnd, lpUnsafeRect, NULL, RDW_INVALIDATE | (bErase? RDW_ERASE : 0));
+ UINT flags = RDW_INVALIDATE | (bErase ? RDW_ERASE : 0);
+ if (!hWnd)
+ {
+ flags = RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW;
+ lpUnsafeRect = NULL;
+ }
+ return NtUserRedrawWindow(hWnd, lpUnsafeRect, NULL, flags);
}
BOOL
HRGN hRgn,
BOOL bErase)
{
+ if (!hWnd)
+ {
+ EngSetLastError( ERROR_INVALID_WINDOW_HANDLE );
+ return FALSE;
+ }
return NtUserRedrawWindow(hWnd, NULL, hRgn, RDW_INVALIDATE | (bErase? RDW_ERASE : 0));
}
HWND hWnd,
const RECT *lpRect)
{
- if (hWnd)
+ UINT flags = RDW_VALIDATE;
+ if (!hWnd)
{
- return NtUserRedrawWindow(hWnd, lpRect, NULL, RDW_VALIDATE );
+ flags = RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW;
+ lpRect = NULL;
}
- return NtUserRedrawWindow(hWnd, lpRect, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ERASENOW|RDW_ALLCHILDREN);
+ return NtUserRedrawWindow(hWnd, lpRect, NULL, flags);
}
/* EOF */
/* Initialize the window station */
RtlZeroMemory(WindowStationObject, sizeof(WINSTATION_OBJECT));
- KeInitializeSpinLock(&WindowStationObject->Lock);
InitializeListHead(&WindowStationObject->DesktopListHead);
Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
WindowStationObject->Name = WindowStationName;
{
NTSTATUS Status;
PWINSTATION_OBJECT WindowStation;
- KIRQL OldLevel;
PLIST_ENTRY DesktopEntry;
PDESKTOP DesktopObject;
DWORD EntryCount;
return Status;
}
- KeAcquireSpinLock(&WindowStation->Lock, &OldLevel);
-
/*
* Count the required size of buffer.
*/
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
if (! NT_SUCCESS(Status))
{
- KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
ObDereferenceObject(WindowStation);
return STATUS_BUFFER_TOO_SMALL;
}
*/
if (dwSize < ReturnLength)
{
- KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
ObDereferenceObject(WindowStation);
return STATUS_BUFFER_TOO_SMALL;
}
Status = MmCopyToCaller(lpBuffer, &EntryCount, sizeof(DWORD));
if (! NT_SUCCESS(Status))
{
- KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
ObDereferenceObject(WindowStation);
return Status;
}
Status = MmCopyToCaller(lpBuffer, DesktopName.Buffer, DesktopName.Length);
if (! NT_SUCCESS(Status))
{
- KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
ObDereferenceObject(WindowStation);
return Status;
}
Status = MmCopyToCaller(lpBuffer, &NullWchar, sizeof(WCHAR));
if (! NT_SUCCESS(Status))
{
- KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
ObDereferenceObject(WindowStation);
return Status;
}
}
/*
- * Clean up
+ * Clean up and return
*/
- KeReleaseSpinLock(&WindowStation->Lock, OldLevel);
ObDereferenceObject(WindowStation);
-
return STATUS_SUCCESS;
}
{
DWORD dwSessionId;
- KSPIN_LOCK Lock;
UNICODE_STRING Name;
LIST_ENTRY DesktopListHead;
PRTL_ATOM_TABLE AtomTable;
#define MAX_WINDOWS 120
// Global variables
-HWND switchdialog;
+HWND switchdialog = NULL;
HFONT dialogFont;
int selectedWindow = 0;
BOOL isOpen = FALSE;
LRESULT WINAPI DoAppSwitch( WPARAM wParam, LPARAM lParam )
{
- HWND hwnd;
+ HWND hwnd, hwndActive;
MSG msg;
BOOL Esc = FALSE;
INT Count = 0;
WCHAR Text[1024];
- switchdialog = NULL;
+ // Already in the loop.
+ if (switchdialog) return 0;
+
+ hwndActive = GetActiveWindow();
+ // Nothing is active so exit.
+ if (!hwndActive) return 0;
+ // Capture current active window.
+ SetCapture( hwndActive );
switch (lParam)
{
case VK_TAB:
- if( !CreateSwitcherWindow(User32Instance) ) return 0;
- if( !GetDialogFont() ) return 0;
+ if( !CreateSwitcherWindow(User32Instance) ) goto Exit;
+ if( !GetDialogFont() ) goto Exit;
ProcessHotKey();
break;
windowCount = 0;
Count = 0;
EnumWindowsZOrder(EnumerateCallback, 0);
- if (windowCount < 2) return 0;
+ if (windowCount < 2) goto Exit;
if (wParam == SC_NEXTWINDOW)
Count = 1;
else
break;
default:
- return 0;
+ goto Exit;
}
// Main message loop:
while (1)
}
}
Exit:
+ ReleaseCapture();
if (switchdialog) DestroyWindow(switchdialog);
switchdialog = NULL;
selectedWindow = 0;
DT_EDITCONTROL)
{
/* break the word after the last character that fits (there must be
- * at least one; none is caught earlier).
- */
+ * at least one). */
+ if (!chars_fit)
+ ++chars_fit;
*len_str = chars_fit;
*chars_used = chars_fit;
/* INCLUDES *******************************************************************/
#include <consrv.h>
-
+#include <intrin.h>
#include <windowsx.h>
#define NDEBUG
} while (!(Items[i].uID == 0 && Items[i].SubMenu == NULL && Items[i].wCmdID == 0));
}
-static VOID
+//static
+VOID
CreateSysMenu(HWND hWnd)
{
MENUITEMINFOW mii;
static VOID
Paste(PGUI_CONSOLE_DATA GuiData);
static VOID
-UpdateSelection(PGUI_CONSOLE_DATA GuiData, PCOORD coord);
+UpdateSelection(PGUI_CONSOLE_DATA GuiData,
+ PCOORD SelectionAnchor OPTIONAL,
+ PCOORD coord);
static VOID
Mark(PGUI_CONSOLE_DATA GuiData)
PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer;
/* Clear the old selection */
- // UpdateSelection(GuiData, NULL);
GuiData->Selection.dwFlags = CONSOLE_NO_SELECTION;
/* Restart a new selection */
- GuiData->dwSelectionCursor.X = ActiveBuffer->ViewOrigin.X;
- GuiData->dwSelectionCursor.Y = ActiveBuffer->ViewOrigin.Y;
- GuiData->Selection.dwSelectionAnchor = GuiData->dwSelectionCursor;
- UpdateSelection(GuiData, &GuiData->Selection.dwSelectionAnchor);
+ GuiData->dwSelectionCursor = ActiveBuffer->ViewOrigin;
+ UpdateSelection(GuiData,
+ &GuiData->dwSelectionCursor,
+ &GuiData->dwSelectionCursor);
}
static VOID
SelectAll(PGUI_CONSOLE_DATA GuiData)
{
PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer;
+ COORD SelectionAnchor;
/* Clear the old selection */
- // UpdateSelection(GuiData, NULL);
GuiData->Selection.dwFlags = CONSOLE_NO_SELECTION;
/*
* The selection area extends to the whole screen buffer's width.
*/
- GuiData->Selection.dwSelectionAnchor.X = 0;
- GuiData->Selection.dwSelectionAnchor.Y = 0;
+ SelectionAnchor.X = SelectionAnchor.Y = 0;
GuiData->dwSelectionCursor.X = ActiveBuffer->ScreenBufferSize.X - 1;
/*
/* Restart a new selection */
GuiData->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION;
- UpdateSelection(GuiData, &GuiData->dwSelectionCursor);
+ UpdateSelection(GuiData, &SelectionAnchor, &GuiData->dwSelectionCursor);
}
static LRESULT
SetWindowLongPtrW(GuiData->hWindow, GWLP_USERDATA, (DWORD_PTR)GuiData);
SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL);
- CreateSysMenu(GuiData->hWindow);
+ // FIXME: HACK: Potential HACK for CORE-8129; see revision 63595.
+ //CreateSysMenu(GuiData->hWindow);
DPRINT("OnNcCreate - setting start event\n");
SetEvent(GuiData->hGuiInitEvent);
Rect->bottom = (SmallRect->Bottom + 1 - Buffer->ViewOrigin.Y) * HeightUnit;
}
+VOID
+GetSelectionBeginEnd(PCOORD Begin, PCOORD End,
+ PCOORD SelectionAnchor,
+ PSMALL_RECT SmallRect)
+{
+ if (Begin == NULL || End == NULL) return;
+
+ *Begin = *SelectionAnchor;
+ End->X = (SelectionAnchor->X == SmallRect->Left) ? SmallRect->Right
+ /* Case X != Left, must be == Right */ : SmallRect->Left;
+ End->Y = (SelectionAnchor->Y == SmallRect->Top ) ? SmallRect->Bottom
+ /* Case Y != Top, must be == Bottom */ : SmallRect->Top;
+
+ /* Exchange Begin / End if Begin > End lexicographically */
+ if (Begin->Y > End->Y || (Begin->Y == End->Y && Begin->X > End->X))
+ {
+ End->X = _InterlockedExchange16(&Begin->X, End->X);
+ End->Y = _InterlockedExchange16(&Begin->Y, End->Y);
+ }
+}
+
+static HRGN
+CreateSelectionRgn(PGUI_CONSOLE_DATA GuiData,
+ BOOL LineSelection,
+ PCOORD SelectionAnchor,
+ PSMALL_RECT SmallRect)
+{
+ if (!LineSelection)
+ {
+ RECT rect;
+ SmallRectToRect(GuiData, &rect, SmallRect);
+ return CreateRectRgnIndirect(&rect);
+ }
+ else
+ {
+ HRGN SelRgn;
+ COORD Begin, End;
+
+ GetSelectionBeginEnd(&Begin, &End, SelectionAnchor, SmallRect);
+
+ if (Begin.Y == End.Y)
+ {
+ SMALL_RECT sr;
+ RECT r ;
+
+ sr.Left = Begin.X;
+ sr.Top = Begin.Y;
+ sr.Right = End.X;
+ sr.Bottom = End.Y;
+
+ // Debug thingie to see whether I can put this corner case
+ // together with the previous one.
+ if (SmallRect->Left != sr.Left ||
+ SmallRect->Top != sr.Top ||
+ SmallRect->Right != sr.Right ||
+ SmallRect->Bottom != sr.Bottom)
+ {
+ DPRINT1("\n"
+ "SmallRect = (%d, %d, %d, %d)\n"
+ "sr = (%d, %d, %d, %d)\n"
+ "\n",
+ SmallRect->Left, SmallRect->Top, SmallRect->Right, SmallRect->Bottom,
+ sr.Left, sr.Top, sr.Right, sr.Bottom);
+ }
+
+ SmallRectToRect(GuiData, &r, &sr);
+ SelRgn = CreateRectRgnIndirect(&r);
+ }
+ else
+ {
+ PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer;
+
+ HRGN rg1, rg2, rg3;
+ SMALL_RECT sr1, sr2, sr3;
+ RECT r1 , r2 , r3 ;
+
+ sr1.Left = Begin.X;
+ sr1.Top = Begin.Y;
+ sr1.Right = ActiveBuffer->ScreenBufferSize.X - 1;
+ sr1.Bottom = Begin.Y;
+
+ sr2.Left = 0;
+ sr2.Top = Begin.Y + 1;
+ sr2.Right = ActiveBuffer->ScreenBufferSize.X - 1;
+ sr2.Bottom = End.Y - 1;
+
+ sr3.Left = 0;
+ sr3.Top = End.Y;
+ sr3.Right = End.X;
+ sr3.Bottom = End.Y;
+
+ SmallRectToRect(GuiData, &r1, &sr1);
+ SmallRectToRect(GuiData, &r2, &sr2);
+ SmallRectToRect(GuiData, &r3, &sr3);
+
+ rg1 = CreateRectRgnIndirect(&r1);
+ rg2 = CreateRectRgnIndirect(&r2);
+ rg3 = CreateRectRgnIndirect(&r3);
+
+ CombineRgn(rg1, rg1, rg2, RGN_XOR);
+ CombineRgn(rg1, rg1, rg3, RGN_XOR);
+ DeleteObject(rg3);
+ DeleteObject(rg2);
+
+ SelRgn = rg1;
+ }
+
+ return SelRgn;
+ }
+}
+
static VOID
-UpdateSelection(PGUI_CONSOLE_DATA GuiData, PCOORD coord)
+PaintSelectionRect(PGUI_CONSOLE_DATA GuiData, PPAINTSTRUCT pps)
+{
+ HRGN rgnPaint = CreateRectRgnIndirect(&pps->rcPaint);
+ HRGN rgnSel = CreateSelectionRgn(GuiData, GuiData->LineSelection,
+ &GuiData->Selection.dwSelectionAnchor,
+ &GuiData->Selection.srSelection);
+
+ /* Invert the selection */
+
+ int ErrorCode = CombineRgn(rgnPaint, rgnPaint, rgnSel, RGN_AND);
+ if (ErrorCode != ERROR && ErrorCode != NULLREGION)
+ {
+ InvertRgn(pps->hdc, rgnPaint);
+ }
+
+ DeleteObject(rgnSel);
+ DeleteObject(rgnPaint);
+}
+
+static VOID
+UpdateSelection(PGUI_CONSOLE_DATA GuiData,
+ PCOORD SelectionAnchor OPTIONAL,
+ PCOORD coord)
{
PCONSOLE Console = GuiData->Console;
- RECT oldRect;
+ HRGN oldRgn = CreateSelectionRgn(GuiData, GuiData->LineSelection,
+ &GuiData->Selection.dwSelectionAnchor,
+ &GuiData->Selection.srSelection);
- SmallRectToRect(GuiData, &oldRect, &GuiData->Selection.srSelection);
+ /* Update the anchor if needed (use the old one if NULL) */
+ if (SelectionAnchor)
+ GuiData->Selection.dwSelectionAnchor = *SelectionAnchor;
if (coord != NULL)
{
- RECT newRect;
SMALL_RECT rc;
+ HRGN newRgn;
+
+ /*
+ * Pressing the Control key while selecting text, allows us to enter
+ * into line-selection mode, the selection mode of *nix terminals.
+ */
+ BOOL OldLineSel = GuiData->LineSelection;
+ GuiData->LineSelection = !!(GetKeyState(VK_CONTROL) & 0x8000);
/* Exchange left/top with right/bottom if required */
rc.Left = min(GuiData->Selection.dwSelectionAnchor.X, coord->X);
rc.Right = max(GuiData->Selection.dwSelectionAnchor.X, coord->X);
rc.Bottom = max(GuiData->Selection.dwSelectionAnchor.Y, coord->Y);
- SmallRectToRect(GuiData, &newRect, &rc);
+ newRgn = CreateSelectionRgn(GuiData, GuiData->LineSelection,
+ &GuiData->Selection.dwSelectionAnchor,
+ &rc);
if (GuiData->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY)
{
- if (memcmp(&rc, &GuiData->Selection.srSelection, sizeof(SMALL_RECT)) != 0)
+ if (OldLineSel != GuiData->LineSelection ||
+ memcmp(&rc, &GuiData->Selection.srSelection, sizeof(SMALL_RECT)) != 0)
{
- HRGN rgn1, rgn2;
-
/* Calculate the region that needs to be updated */
- if ((rgn1 = CreateRectRgnIndirect(&oldRect)))
+ if (oldRgn && newRgn && CombineRgn(newRgn, newRgn, oldRgn, RGN_XOR) != ERROR)
{
- if ((rgn2 = CreateRectRgnIndirect(&newRect)))
- {
- if (CombineRgn(rgn1, rgn2, rgn1, RGN_XOR) != ERROR)
- {
- InvalidateRgn(GuiData->hWindow, rgn1, FALSE);
- }
- DeleteObject(rgn2);
- }
- DeleteObject(rgn1);
+ InvalidateRgn(GuiData->hWindow, newRgn, FALSE);
}
}
}
else
{
- InvalidateRect(GuiData->hWindow, &newRect, FALSE);
+ InvalidateRgn(GuiData->hWindow, newRgn, FALSE);
}
+ DeleteObject(newRgn);
+
GuiData->Selection.dwFlags |= CONSOLE_SELECTION_NOT_EMPTY;
GuiData->Selection.srSelection = rc;
GuiData->dwSelectionCursor = *coord;
if ((GuiData->Selection.dwFlags & CONSOLE_SELECTION_IN_PROGRESS) == 0)
{
- LPWSTR SelectionType, WindowTitle = NULL;
- SIZE_T Length = 0;
+ LPWSTR SelTypeStr = NULL , WindowTitle = NULL;
+ SIZE_T SelTypeStrLength = 0, Length = 0;
/* Clear the old selection */
if (GuiData->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY)
{
- InvalidateRect(GuiData->hWindow, &oldRect, FALSE);
+ InvalidateRgn(GuiData->hWindow, oldRgn, FALSE);
}
- if (GuiData->Selection.dwFlags & CONSOLE_MOUSE_SELECTION)
- {
- SelectionType = L"Selection - ";
- }
- else
+ /*
+ * When passing a zero-length buffer size, LoadString(...) returns
+ * a read-only pointer buffer to the program's resource string.
+ */
+ SelTypeStrLength =
+ LoadStringW(ConSrvDllInstance,
+ (GuiData->Selection.dwFlags & CONSOLE_MOUSE_SELECTION)
+ ? IDS_SELECT_TITLE : IDS_MARK_TITLE,
+ (LPWSTR)&SelTypeStr, 0);
+
+ /*
+ * Prepend the selection type string to the current console title
+ * if we succeeded in retrieving a valid localized string.
+ */
+ if (SelTypeStr)
{
- SelectionType = L"Mark - ";
- }
+ // 3 for " - " and 1 for NULL
+ Length = Console->Title.Length + (SelTypeStrLength + 3 + 1) * sizeof(WCHAR);
+ WindowTitle = ConsoleAllocHeap(0, Length);
- Length = Console->Title.Length + wcslen(SelectionType) + 1;
- WindowTitle = ConsoleAllocHeap(0, Length * sizeof(WCHAR));
- wcscpy(WindowTitle, SelectionType);
- wcscat(WindowTitle, Console->Title.Buffer);
- SetWindowText(GuiData->hWindow, WindowTitle);
- ConsoleFreeHeap(WindowTitle);
+ wcsncpy(WindowTitle, SelTypeStr, SelTypeStrLength);
+ WindowTitle[SelTypeStrLength] = L'\0';
+ wcscat(WindowTitle, L" - ");
+ wcscat(WindowTitle, Console->Title.Buffer);
+
+ SetWindowText(GuiData->hWindow, WindowTitle);
+ ConsoleFreeHeap(WindowTitle);
+ }
GuiData->Selection.dwFlags |= CONSOLE_SELECTION_IN_PROGRESS;
ConioPause(Console, PAUSED_FROM_SELECTION);
/* Clear the selection */
if (GuiData->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY)
{
- InvalidateRect(GuiData->hWindow, &oldRect, FALSE);
+ InvalidateRgn(GuiData->hWindow, oldRgn, FALSE);
}
GuiData->Selection.dwFlags = CONSOLE_NO_SELECTION;
ConioUnpause(Console, PAUSED_FROM_SELECTION);
+ /* Restore the console title */
SetWindowText(GuiData->hWindow, Console->Title.Buffer);
}
+
+ DeleteObject(oldRgn);
}
rcPaint.top,
SRCCOPY);
+ /* Draw the selection region if needed */
if (GuiData->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY)
{
- SmallRectToRect(GuiData, &rcPaint, &GuiData->Selection.srSelection);
-
- /* Invert the selection */
- if (IntersectRect(&rcPaint, &ps.rcPaint, &rcPaint))
- {
- InvertRect(ps.hdc, &rcPaint);
- }
+ PaintSelectionRect(GuiData, &ps);
}
LeaveCriticalSection(&GuiData->Lock);
goto Quit;
}
else if ( VirtualKeyCode == VK_ESCAPE ||
- (VirtualKeyCode == 'C' && GetKeyState(VK_CONTROL) & 0x8000) )
+ (VirtualKeyCode == 'C' && (GetKeyState(VK_CONTROL) & 0x8000)) )
{
/* Cancel selection if ESC or Ctrl-C are pressed */
- UpdateSelection(GuiData, NULL);
+ UpdateSelection(GuiData, NULL, NULL);
goto Quit;
}
{
/* Keyboard selection mode */
BOOL Interpreted = FALSE;
- BOOL MajPressed = (GetKeyState(VK_SHIFT) & 0x8000);
+ BOOL MajPressed = !!(GetKeyState(VK_SHIFT) & 0x8000);
switch (VirtualKeyCode)
{
if (Interpreted)
{
- if (!MajPressed)
- GuiData->Selection.dwSelectionAnchor = GuiData->dwSelectionCursor;
-
- UpdateSelection(GuiData, &GuiData->dwSelectionCursor);
+ UpdateSelection(GuiData,
+ !MajPressed ? &GuiData->dwSelectionCursor : NULL,
+ &GuiData->dwSelectionCursor);
}
else if (!IsSystemKey(VirtualKeyCode))
{
if (!IsSystemKey(VirtualKeyCode))
{
/* Clear the selection and send the key into the input buffer */
- UpdateSelection(GuiData, NULL);
+ UpdateSelection(GuiData, NULL, NULL);
}
else
{
case WM_LBUTTONDOWN:
{
/* Clear the old selection */
- // UpdateSelection(GuiData, NULL);
GuiData->Selection.dwFlags = CONSOLE_NO_SELECTION;
/* Restart a new selection */
- GuiData->Selection.dwSelectionAnchor = PointToCoord(GuiData, lParam);
+ GuiData->dwSelectionCursor = PointToCoord(GuiData, lParam);
SetCapture(GuiData->hWindow);
GuiData->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION | CONSOLE_MOUSE_DOWN;
- UpdateSelection(GuiData, &GuiData->Selection.dwSelectionAnchor);
+ UpdateSelection(GuiData,
+ &GuiData->dwSelectionCursor,
+ &GuiData->dwSelectionCursor);
break;
}
case WM_LBUTTONUP:
{
- // COORD c;
-
if (!(GuiData->Selection.dwFlags & CONSOLE_MOUSE_DOWN)) break;
- // c = PointToCoord(GuiData, lParam);
+ // GuiData->dwSelectionCursor = PointToCoord(GuiData, lParam);
GuiData->Selection.dwFlags &= ~CONSOLE_MOUSE_DOWN;
- // UpdateSelection(GuiData, &c);
+ // UpdateSelection(GuiData, NULL, &GuiData->dwSelectionCursor);
ReleaseCapture();
break;
if (GetType(Buffer) == TEXTMODE_BUFFER)
{
-#ifdef IS_WHITESPACE
-#undef IS_WHITESPACE
-#endif
-#define IS_WHITESPACE(c) \
+#define IS_WORD_SEP(c) \
((c) == L'\0' || (c) == L' ' || (c) == L'\t' || (c) == L'\r' || (c) == L'\n')
PTEXTMODE_SCREEN_BUFFER TextBuffer = (PTEXTMODE_SCREEN_BUFFER)Buffer;
ptrL = ptrR = ConioCoordToPointer(TextBuffer, cL.X, cL.Y);
/* Enlarge the selection by checking for whitespace */
- while ((0 < cL.X) && !IS_WHITESPACE(ptrL->Char.UnicodeChar)
- && !IS_WHITESPACE((ptrL-1)->Char.UnicodeChar))
+ while ((0 < cL.X) && !IS_WORD_SEP(ptrL->Char.UnicodeChar)
+ && !IS_WORD_SEP((ptrL-1)->Char.UnicodeChar))
{
--cL.X;
--ptrL;
}
while ((cR.X < TextBuffer->ScreenBufferSize.X - 1) &&
- !IS_WHITESPACE(ptrR->Char.UnicodeChar) &&
- !IS_WHITESPACE((ptrR+1)->Char.UnicodeChar))
+ !IS_WORD_SEP(ptrR->Char.UnicodeChar) &&
+ !IS_WORD_SEP((ptrR+1)->Char.UnicodeChar))
{
++cR.X;
++ptrR;
* Update the selection started with the single
* left-click that preceded this double-click.
*/
- GuiData->Selection.dwSelectionAnchor = cL;
- GuiData->dwSelectionCursor = cR;
-
GuiData->Selection.dwFlags |= CONSOLE_MOUSE_SELECTION | CONSOLE_MOUSE_DOWN;
- UpdateSelection(GuiData, &GuiData->dwSelectionCursor);
+ UpdateSelection(GuiData, &cL, &cR);
/* Ignore the next mouse move signal */
GuiData->IgnoreNextMouseSignal = TRUE;
case WM_MOUSEMOVE:
{
- COORD c;
-
if (!(wParam & MK_LBUTTON)) break;
if (!(GuiData->Selection.dwFlags & CONSOLE_MOUSE_DOWN)) break;
- c = PointToCoord(GuiData, lParam); /* TODO: Scroll buffer to bring c into view */
- UpdateSelection(GuiData, &c);
+ // TODO: Scroll buffer to bring SelectionCursor into view
+ GuiData->dwSelectionCursor = PointToCoord(GuiData, lParam);
+ UpdateSelection(GuiData, NULL, &GuiData->dwSelectionCursor);
break;
}
}
/* Clear the selection */
- UpdateSelection(GuiData, NULL);
+ UpdateSelection(GuiData, NULL, NULL);
}
VOID
PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to the active screen buffer (then maybe the previous Console member is redundant?? Or not...) */
CONSOLE_SELECTION_INFO Selection; /* Contains information about the selection */
COORD dwSelectionCursor; /* Selection cursor position, most of the time different from Selection.dwSelectionAnchor */
+ BOOL LineSelection; /* TRUE if line-oriented selection (a la *nix terminals), FALSE if block-oriented selection (default on Windows) */
GUI_CONSOLE_INFO GuiInfo; /* GUI terminal settings */
} GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA;
selWidth = GuiData->Selection.srSelection.Right - GuiData->Selection.srSelection.Left + 1;
selHeight = GuiData->Selection.srSelection.Bottom - GuiData->Selection.srSelection.Top + 1;
- DPRINT1("Selection is (%d|%d) to (%d|%d)\n",
+ DPRINT("Selection is (%d|%d) to (%d|%d)\n",
GuiData->Selection.srSelection.Left,
GuiData->Selection.srSelection.Top,
GuiData->Selection.srSelection.Right,
VOID
SwitchFullScreen(PGUI_CONSOLE_DATA GuiData, BOOL FullScreen);
-
+VOID
+CreateSysMenu(HWND hWnd);
static LRESULT CALLBACK
GuiConsoleNotifyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
GuiConsoleMoveWindow(GuiData); // FIXME: This MUST be done via the CreateWindowExW call.
SendMessageW(GuiData->hWindow, PM_RESIZE_TERMINAL, 0, 0);
+ // FIXME: HACK: Potential HACK for CORE-8129; see revision 63595.
+ CreateSysMenu(GuiData->hWindow);
+
/* Switch to full-screen mode if necessary */
// FIXME: Move elsewhere, it cause misdrawings of the window.
if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE);
GuiData->CmdIdLow = GuiData->CmdIdHigh = 0;
/* Initialize the selection */
- RtlZeroMemory(&GuiData->Selection, sizeof(CONSOLE_SELECTION_INFO));
+ RtlZeroMemory(&GuiData->Selection, sizeof(GuiData->Selection));
GuiData->Selection.dwFlags = CONSOLE_NO_SELECTION;
+ RtlZeroMemory(&GuiData->dwSelectionCursor, sizeof(GuiData->dwSelectionCursor));
+ GuiData->LineSelection = FALSE; // Default to block selection
+ // TODO: Retrieve the selection mode via the registry.
/*
* We need to wait until the GUI has been fully initialized
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Eingabeaufforderung"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Marquage"
+ IDS_SELECT_TITLE "Sélection"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
* https://sourceforge.net/projects/reactospl
* Translation update by Olaf Siejka (Caemyr), Apr 2011
* UTF-8 conversion by Caemyr (May, 2011)
+ * Update by wojo664 (June 2014)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
*/
IDS_TERMINAL_TITLE "Konsola ReactOS"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Zaznacz"
+ IDS_SELECT_TITLE "Wybierz"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "Consola ReactOS"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
*/
IDS_TERMINAL_TITLE "ReactOS Console"
END
+
+STRINGTABLE
+BEGIN
+ IDS_MARK_TITLE "Mark"
+ IDS_SELECT_TITLE "Select"
+END
#define ID_SYSTEM_DEFAULTS 0xFFF6
#define ID_SYSTEM_PROPERTIES 0xFFF7
-#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
-#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
+#define IDS_MARK_TITLE 220
+#define IDS_SELECT_TITLE 221
// Scrollbar resource ids. Unused.
/*
#include "guiterm.h"
+/* GLOBALS ********************************************************************/
+
+#define IS_WHITESPACE(c) ((c) == L'\0' || (c) == L' ' || (c) == L'\t')
+
/* FUNCTIONS ******************************************************************/
COLORREF PaletteRGBFromAttrib(PCONSOLE Console, WORD Attribute)
return PALETTERGB(pe.peRed, pe.peGreen, pe.peBlue);
}
-VOID
-GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
- PGUI_CONSOLE_DATA GuiData)
+static VOID
+CopyBlock(PTEXTMODE_SCREEN_BUFFER Buffer,
+ PSMALL_RECT Selection)
{
- /*
- * This function supposes that the system clipboard was opened.
- */
-
/*
* Pressing the Shift key while copying text, allows us to copy
* text without newline characters (inline-text copy mode).
*/
- BOOL InlineCopyMode = (GetKeyState(VK_SHIFT) & 0x8000);
+ BOOL InlineCopyMode = !!(GetKeyState(VK_SHIFT) & 0x8000);
HANDLE hData;
PCHAR_INFO ptr;
LPWSTR data, dstPos;
ULONG selWidth, selHeight;
- ULONG xPos, yPos, size;
+ ULONG xPos, yPos;
+ ULONG size;
- selWidth = GuiData->Selection.srSelection.Right - GuiData->Selection.srSelection.Left + 1;
- selHeight = GuiData->Selection.srSelection.Bottom - GuiData->Selection.srSelection.Top + 1;
- DPRINT("Selection is (%d|%d) to (%d|%d)\n",
- GuiData->Selection.srSelection.Left,
- GuiData->Selection.srSelection.Top,
- GuiData->Selection.srSelection.Right,
- GuiData->Selection.srSelection.Bottom);
+ DPRINT("CopyBlock(%u, %u, %u, %u)\n",
+ Selection->Left, Selection->Top, Selection->Right, Selection->Bottom);
-#ifdef IS_WHITESPACE
-#undef IS_WHITESPACE
-#endif
-#define IS_WHITESPACE(c) ((c) == L'\0' || (c) == L' ' || (c) == L'\t')
+ /* Prevent against empty blocks */
+ if (Selection == NULL) return;
+ if (Selection->Left > Selection->Right || Selection->Top > Selection->Bottom)
+ return;
+
+ selWidth = Selection->Right - Selection->Left + 1;
+ selHeight = Selection->Bottom - Selection->Top + 1;
/* Basic size for one line... */
size = selWidth;
*/
size += (selWidth + (!InlineCopyMode ? 2 : 0)) * (selHeight - 1);
}
+ else
+ {
+ DPRINT1("This case must never happen, because selHeight is at least == 1\n");
+ }
+
size += 1; /* Null-termination */
size *= sizeof(WCHAR);
ULONG length = selWidth;
ptr = ConioCoordToPointer(Buffer,
- GuiData->Selection.srSelection.Left,
- GuiData->Selection.srSelection.Top + yPos);
+ Selection->Left,
+ Selection->Top + yPos);
/* Trim whitespace from the right */
while (length > 0)
* Sometimes, applications can put NULL chars into the screen-buffer
* (this behaviour is allowed). Detect this and replace by a space.
*/
- dstPos[xPos] = (ptr[xPos].Char.UnicodeChar ? ptr[xPos].Char.UnicodeChar : L' ');
+ *dstPos++ = (ptr[xPos].Char.UnicodeChar ? ptr[xPos].Char.UnicodeChar : L' ');
}
- dstPos += length;
/* Add newline characters if we are not in inline-text copy mode */
if (!InlineCopyMode)
{
if (yPos != (selHeight - 1))
{
- wcscat(data, L"\r\n");
+ wcscat(dstPos, L"\r\n");
dstPos += 2;
}
}
SetClipboardData(CF_UNICODETEXT, hData);
}
+static VOID
+CopyLines(PTEXTMODE_SCREEN_BUFFER Buffer,
+ PCOORD Begin,
+ PCOORD End)
+{
+ HANDLE hData;
+ PCHAR_INFO ptr;
+ LPWSTR data, dstPos;
+ ULONG NumChars, size;
+ ULONG xPos, yPos, xBeg, xEnd;
+
+ DPRINT("CopyLines((%u, %u) ; (%u, %u))\n",
+ Begin->X, Begin->Y, End->X, End->Y);
+
+ /* Prevent against empty blocks... */
+ if (Begin == NULL || End == NULL) return;
+ /* ... or malformed blocks */
+ if (Begin->Y > End->Y || (Begin->Y == End->Y && Begin->X > End->X)) return;
+
+ /* Compute the number of characters to copy */
+ if (End->Y == Begin->Y) // top == bottom
+ {
+ NumChars = End->X - Begin->X + 1;
+ }
+ else // if (End->Y > Begin->Y)
+ {
+ NumChars = Buffer->ScreenBufferSize.X - Begin->X;
+
+ if (End->Y >= Begin->Y + 2)
+ {
+ NumChars += (End->Y - Begin->Y - 1) * Buffer->ScreenBufferSize.X;
+ }
+
+ NumChars += End->X + 1;
+ }
+
+ size = (NumChars + 1) * sizeof(WCHAR); /* Null-terminated */
+
+ /* Allocate some memory area to be given to the clipboard, so it will not be freed here */
+ hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, size);
+ if (hData == NULL) return;
+
+ data = GlobalLock(hData);
+ if (data == NULL)
+ {
+ GlobalFree(hData);
+ return;
+ }
+
+ DPRINT("Copying %d characters\n", NumChars);
+ dstPos = data;
+
+ /*
+ * We need to walk per-lines, and not just looping in the big screen-buffer
+ * array, because of the way things are stored inside it. The downside is
+ * that it makes the code more complicated.
+ */
+ for (yPos = Begin->Y; (yPos <= End->Y) && (NumChars > 0); yPos++)
+ {
+ xBeg = (yPos == Begin->Y ? Begin->X : 0);
+ xEnd = (yPos == End->Y ? End->X : Buffer->ScreenBufferSize.X - 1);
+
+ ptr = ConioCoordToPointer(Buffer, 0, yPos);
+
+ /* Copy only the characters, leave attributes alone */
+ for (xPos = xBeg; (xPos <= xEnd) && (NumChars-- > 0); xPos++)
+ {
+ /*
+ * Sometimes, applications can put NULL chars into the screen-buffer
+ * (this behaviour is allowed). Detect this and replace by a space.
+ */
+ *dstPos++ = (ptr[xPos].Char.UnicodeChar ? ptr[xPos].Char.UnicodeChar : L' ');
+ }
+ }
+
+ DPRINT("Setting data <%S> to clipboard\n", data);
+ GlobalUnlock(hData);
+
+ EmptyClipboard();
+ SetClipboardData(CF_UNICODETEXT, hData);
+}
+
+
+VOID
+GetSelectionBeginEnd(PCOORD Begin, PCOORD End,
+ PCOORD SelectionAnchor,
+ PSMALL_RECT SmallRect);
+
+VOID
+GuiCopyFromTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
+ PGUI_CONSOLE_DATA GuiData)
+{
+ /*
+ * This function supposes that the system clipboard was opened.
+ */
+
+ BOOL LineSelection = GuiData->LineSelection;
+
+ DPRINT("Selection is (%d|%d) to (%d|%d) in %s mode\n",
+ GuiData->Selection.srSelection.Left,
+ GuiData->Selection.srSelection.Top,
+ GuiData->Selection.srSelection.Right,
+ GuiData->Selection.srSelection.Bottom,
+ (LineSelection ? "line" : "block"));
+
+ if (!LineSelection)
+ {
+ CopyBlock(Buffer, &GuiData->Selection.srSelection);
+ }
+ else
+ {
+ COORD Begin, End;
+
+ GetSelectionBeginEnd(&Begin, &End,
+ &GuiData->Selection.dwSelectionAnchor,
+ &GuiData->Selection.srSelection);
+
+ CopyLines(Buffer, &Begin, &End);
+ }
+}
+
VOID
GuiPasteToTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
PGUI_CONSOLE_DATA GuiData)
WPARAM wParam,
LPARAM lParam)
{
+ DPRINT1("KeyboardHookProc Processing!\n");
return CallNextHookEx(hhk, nCode, wParam, lParam);
}
/*** END - HACK from win32csr... ***/