forked from Mirrors/wine-wine
Compare commits
9 Commits
master
...
feature/de
Author | SHA1 | Date |
---|---|---|
Marko Semet | 9162745496 | |
Marko Semet | d361a52e51 | |
Marko Semet | 7f0b8eca21 | |
Marko Semet | 29472b1e55 | |
Marko Semet | 9715f3e73d | |
Marko Semet | 6c5b40382b | |
Marko Semet | 1b87584bf5 | |
Marko Semet | cb6fcfc2bb | |
Marko Semet | b072c8a345 |
938
ANNOUNCE
938
ANNOUNCE
|
@ -1,17 +1,18 @@
|
|||
The Wine development release 5.11 is now available.
|
||||
The Wine development release 5.10 is now available.
|
||||
|
||||
What's new in this release (see below for details):
|
||||
- Wine Mono engine updated to 5.1.0, with WpfGfx library support.
|
||||
- More work on the separate Unix library for NTDLL.
|
||||
- Beginnings of a NetIO kernel driver implementation.
|
||||
- Initial support for the Print Ticket API.
|
||||
- Removal of the obsolete 32-bit PowerPC architecture.
|
||||
- More progress on the WineD3D Vulkan backend.
|
||||
- Beginnings of a separate Unix library for NTDLL.
|
||||
- Better support for anti-cheat kernel drivers.
|
||||
- More glyph substitutions in DirectWrite.
|
||||
- Support for DSS private keys.
|
||||
- ARM64 exception handling fixes.
|
||||
- Various bug fixes.
|
||||
|
||||
The source is available from the following locations:
|
||||
|
||||
https://dl.winehq.org/wine/source/5.x/wine-5.11.tar.xz
|
||||
http://mirrors.ibiblio.org/wine/source/5.x/wine-5.11.tar.xz
|
||||
https://dl.winehq.org/wine/source/5.x/wine-5.10.tar.xz
|
||||
http://mirrors.ibiblio.org/wine/source/5.x/wine-5.10.tar.xz
|
||||
|
||||
Binary packages for various distributions will be available from:
|
||||
|
||||
|
@ -27,487 +28,526 @@ AUTHORS in the distribution for the complete list.
|
|||
|
||||
----------------------------------------------------------------
|
||||
|
||||
Bugs fixed in 5.11 (total 57):
|
||||
Bugs fixed in 5.10 (total 47):
|
||||
|
||||
10325 Avencast: Rise of the Mage crash on attempt to play startup video
|
||||
18762 Supreme Commander slows down to 1 frame every 60 sec
|
||||
26146 WRC FIA World Rally Championship Demo fails to start, can't play video
|
||||
26258 Light of Altair demo crashes in-game when shaders enabled (built-in d3dx9_30)
|
||||
27105 Mega Man Legends for PC crashes on startup
|
||||
28203 Warrior Kings can't play music without native quartz
|
||||
28850 Airstrike (Eagles of WWII): choppy music playback
|
||||
29320 KMPlayer 3 does not play videos
|
||||
30188 Megaman X8 freezes / fails to play intro movie
|
||||
31581 Supreme Commander (steam version) shows a black screen on start when bloom rendering enabled
|
||||
31910 anti-cheat software Battleye 1.176 expects call to KiUserExceptionDispatcher during exception handling (user mode SEH dispatcher)(Arma2, DayZ)
|
||||
35215 Age of empires II HD Steam version: no video at start
|
||||
35800 Dust An Elysian Tail (Steam) (.NET 4.0 XNA game) fails to play intro videos
|
||||
35903 CED1401 USB function driver fails to install (setupapi should use the original INF path as a default source path when copying files)
|
||||
38035 GSpot v2.70 doesn't find Cinepak codec
|
||||
38086 ArmA: Combat Operations needs d3dx9_36.dll.D3DXCreateFragmentLinker
|
||||
39669 Dishonored crashes at start with Steam Launcher
|
||||
40986 DirectX11 application fails with error message "Failed to create IDXGIFactory2"
|
||||
41101 Her Story: crash on playing video clip
|
||||
41207 DX11 Demo "AMD Ladybug" freezes on the splash screen
|
||||
41972 "Elite: Dangerous" client crashes when starting
|
||||
42053 Grand Theft Auto III fails to lauch from Steam
|
||||
43232 Test Drive 6 - track is black
|
||||
44498 Legend of Kay: Anniversary Edition does not play cutscenes (needs {48e2ed0f-98c2-4a37-bed5-166312ddd83f} CLSID_MFReadWriteClassFactory)
|
||||
44957 Kea Coloring Book crashes (needs IAudioMediaStream::GetFormat() implementation)
|
||||
45093 mpc-hc player produces no audio output
|
||||
45571 League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtCreateThread/Ex)
|
||||
45572 League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtContinue)
|
||||
45667 League of Legends 8.15+ fails due to missing implementation of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
|
||||
46396 valgrind shows an invalid free in devenum/tests/devenum.c
|
||||
46955 Performance regression after 3.20 in Assetto Corsa
|
||||
48256 pwsh.exe (from Powershell-6.*) crashes after 20~50 sec: System.EntryPointNotFoundException: Unable to find an entry point named 'FreeAddrInfoEx' in DLL 'ws2_32.dll'.
|
||||
48405 Battle.Net Launcher Beta crashes with Windows version set to 10
|
||||
48716 Logos Bible Software - Printer is recognized but will not print (PTOpenProviderEx is a stub)
|
||||
48773 mimalloc needs ntdll.dll.RtlQueryEnvironmentVariable
|
||||
48779 Secret Files 3 crashes at launch (needs d3dx9_skin_info_Clone)
|
||||
49062 Dolphin EasyReader for Windows 6.04 (TTS app) crashes on startup
|
||||
49093 Relocation of 32-bit PE builtin 'ntoskrnl.exe' causes kernel driver load failures (imports fixup recursion in load_driver_module)
|
||||
49123 Multiple games crash or hang on startup since Wine 5.7
|
||||
49147 Microsoft Teams 1.3.x crashes on unimplemented function setupapi.dll.CM_Get_Device_Interface_AliasW
|
||||
49151 Wine 5.7 Multiple mono programs freeze with high CPU
|
||||
49225 FreeBSD assertion failure / memory corruption regression from not checking mmap() return value correctly
|
||||
49237 Final Fantasy XI increased speed
|
||||
49269 Wine 5.9 causes slower walk speed in Heroes of Might & Magic III
|
||||
49314 Wine segfaults with too many command-line arguments
|
||||
49322 cmudpro334 pops up errorwindow "OLE error 80004001"
|
||||
49329 critical section timeout on prefix creation
|
||||
49351 PowerShell-7.0.1-win-x64.msi fails to install
|
||||
49352 JamKazam 1.0.3744 msi installer fails at 'InstallFiles' action (incorrect handling of administrative image with compressed source files)
|
||||
49372 winedump crashes for sltg typelib files
|
||||
49375 Test Drive 6 demo crashes when starting a race
|
||||
49379 Altium Designer 20 crashes on missing d2d1.dll.D2D1CreateDevice
|
||||
49380 wine unable to load kernelbase.dll
|
||||
49387 Game "101 Ways to die" start with a black screen.
|
||||
49388 MultiSync installation crashes (msado15.dll needs IConnectionPoint::Advise)
|
||||
49391 Star Trek Armada crashes on start on Wine 5.6 but not Wine 5.5
|
||||
49407 Display device initialization fails due to vkGetRandROutputDisplayEXT() causing X exception on dual Nvidia / Intel GPU configuration (regression).
|
||||
7102 Microsoft Word 6.0 for Windows: copy/paste causes crash on unimplemented function ole2.dll16.OLEISCURRENTCLIPBOARD
|
||||
26171 BVRP classic phone tools installer reports error 'Insufficient buffer' when trying to install print processor (AddPrintProcessorA stub should be symmetric to AddPrintProcessorW)
|
||||
26489 GetKeyState does not work correctly with toggle keys (VK_CAPITAL, VK_NUMLOCK, VK_SCROLL)
|
||||
32483 Windows Sysinternals 'PsInfo' tool fails to retrieve video driver description due to missing registry data for 'Video' device class '{4D36E968-E325-11CE-BFC1-08002BE10318}'
|
||||
33194 Multiple applications ported to WinRT/ARM using MSVCR110.dll require msvcrt.__C_specific_handler
|
||||
34842 Multiple .NET 3.5 apps occasionally fail to run when late-bound 'riched20.dll' prelink address is already occupied and PE mapped into >2 GiB address range (Garmin BaseCamp 4.1.2, GZDoom Builder 2.3)
|
||||
38020 Foxit Reader 6.12 crashes on unimplemented function msasn1.dll.ASN1_CreateModule during validation of digital signatures
|
||||
38587 RF:G is Incredibly Laggy, Then Crashes
|
||||
44115 vcrun2012's vcredist_arm.exe crashes in riched20::isurlneutral()
|
||||
44432 AArch64: assertion fail in alloc_pages_vprot with qemu_aarch64 Ubuntu 16.04
|
||||
44925 Multiple kernel drivers require 'ntoskrnl.exe.ExCreateCallback' stub to return STATUS_SUCCESS (StarForce v3, TrackMania Nations ESWC. Denuvo Anti-Cheat)
|
||||
45536 Total Commander 9.x crashes on unimplemented function usp10.dll.ScriptGetFontAlternateGlyphs when Wine is not detected via named export 'ntdll.wine_get_version'
|
||||
46788 RtlIpv6AddressToStringA is not supported
|
||||
49045 Japanese eroge called Koikatsu crashes after upgrading to Wine 5.7
|
||||
49117 Virtual memory allocation gets slower when large number of views are allocated (We Happy Few)
|
||||
49160 Unity: SystemInfo.deviceUniqueIdentifier always the same under Wine
|
||||
49178 Spitfire Audio 3.x crashes on start due to 'WTSQuerySessionInformationA' stub not initializing out parameters
|
||||
49179 winetest.exe fails to run on windows arm (surface rt / armv7): procedure entry point NtCurrentTeb could not be located in the dynamic link library C:\Users\User\Desktop\winetest.exe
|
||||
49189 Auslogics Registry Cleaner 8.x crashes and shows "OLE error 80004001" (SetCurrentProcessExplicitAppUserModelID stub needs to return S_OK)
|
||||
49194 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' fails to load, needs 'netio.sys' stub driver (Winsock Kernel Sockets API / WSK)
|
||||
49198 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes in entry point (incorrect page protection restored during relocation processing)
|
||||
49208 Wine fails to load explorer.exe or wineboot.exe with status c0000018 (kernelbase.dll mapping exceeds 4 MiB and is loaded in main executable address space)
|
||||
49211 Multiple games and applications crash due to NULL device notification handle passed to 'user32.UnregisterDeviceNotification' (BandLab Cakewalk 2020.04, Glorious Model O control software)
|
||||
49216 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.KdRefreshDebuggerNotPresent
|
||||
49217 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.KeQueryActiveProcessorCountEx
|
||||
49219 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.KeSetSystemAffinityThreadEx
|
||||
49221 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes due to unhandled emulation of MSR register reads related to CPU / virtualization features (returning zero value is sufficient)
|
||||
49222 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.KeRevertToUserAffinityThreadEx
|
||||
49224 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.{KeGenericCallDpc,KeSignalCallDpcSynchronize,KeSignalCallDpcDone}
|
||||
49228 Mouse movements are reversed/erratic for multiple games (Gothic 2, The Elder Scrolls V: Skyrim SE; Oblivion, Machinarium)
|
||||
49230 Multiple kernel drivers crash on unimplemented function ntoskrnl.exe.KeSetTimer (Denuvo Anti-Cheat 'denuvo-anti-cheat.sys')
|
||||
49235 Multiple .NET 4.x applications crash with stack overflow in IDWriteTextAnalyzer::GetGdiCompatibleGlyphPlacements (Microsoft Visual Studio 2010 Express, Win10 SDK installer)
|
||||
49251 Mouse cursor leaves a trail when anti-aliasing enabled (Secret Files 1-2, Fahrenheit, Ufo:Extraterrestrials)
|
||||
49257 Avast Free Antivirus 20.3 crashes before installing due to unimplemented function rpcrt4.dll.RpcIfInqId
|
||||
49262 Heap debugging (WINEDEBUG=+heap) broken since wine-5.7-30-gba1495f7c2
|
||||
49264 MultiSync installation crashes (needs _Command::get/put_CommandText)
|
||||
49267 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' needs support for CustomTimerDpc via ntoskrnl.exe.KeSetTimer{Ex}
|
||||
49272 MultiSync installation crashes (msado15.dll needs {b196b284-bab4-101a-b69c-00aa00341d07} IConnectionPointContainer)
|
||||
49281 FinanceExplorer crashes inside msado15.dll
|
||||
49283 Some win10 run into : err:module:import_dll Library api-ms-win-core-libraryloader-l2-1-0.dll not found
|
||||
49289 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.ExRegisterCallback
|
||||
49291 Denuvo Anti-Cheat 'denuvo-anti-cheat.sys' crashes on unimplemented function ntoskrnl.exe.ExUnregisterCallback when unloading
|
||||
49295 Prefix creation freezes
|
||||
49299 PowerToys for Windows 10 crashes on unimplemented function KERNEL32.dll.GetPackageFamilyName
|
||||
49300 Multiple debuggers/tools from Windows 10 SDK want api-ms-win-downlevel-kernel32-l2-1-0.dll
|
||||
49303 MultiSync installation crashes (msado15.dll needs IConnectionPointContainer::FindConnectionPoint)
|
||||
49305 Sniper Elite V2 (Sniper Elite 3, Zombie Army Trilogy) fails to start on Steam
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
Changes since 5.10:
|
||||
Changes since 5.9:
|
||||
|
||||
Aaro Altonen (3):
|
||||
include: Add ConnectionEventsVt definition.
|
||||
msado15/tests: Add tests for IConnectionPoint::Advise/Unadvise.
|
||||
msado15: Implement IConnectionPoint::Advise/Unadvise.
|
||||
Aaro Altonen (5):
|
||||
msado15: Implement _Command get/put CommandType.
|
||||
msado15: Implement _Command get/put CommandText.
|
||||
msado15: Add IConnectionPointContainer stub to _Connection.
|
||||
msado15: Add IConnectionPoint stub to _Connection.
|
||||
msado15: Implement IConnectionPointContainer_FindConnectionPoint.
|
||||
|
||||
Akihiro Sagawa (1):
|
||||
winegstreamer: Also wait for EOS events when retrieving duration.
|
||||
Akihiro Sagawa (2):
|
||||
gdi32: Handle vertical faces in the fontconfig fallback.
|
||||
gdi32: Add a vertical font replacement if it's a DBCS font.
|
||||
|
||||
Alex Henrie (1):
|
||||
advapi32: Add RegEnableReflectionKey stub.
|
||||
Alex Henrie (12):
|
||||
ntdll: Increase size of IPv6 address string buffers.
|
||||
include: Add RtlIpv4AddressToString(Ex)[AW].
|
||||
include: Add more RTL functions.
|
||||
ntdll/tests: Drop RTL function workarounds for Windows <= 2000.
|
||||
ntdll/tests: Add more RtlIpv6AddressToString tests.
|
||||
ntdll: Implement RtlIpv6AddressToString(Ex)[AW].
|
||||
ws2_32: Reimplement inet_ntop on top of ntdll functions.
|
||||
ws2_32/tests: Put WSAAddressToString tests in tables.
|
||||
ntdll/tests: Make RtlIpv6AddressToString test data static and constant.
|
||||
kernelbase: Add GetPackageFamilyName stub.
|
||||
kernel32/tests: Fix GetNLSVersion test failure on Windows Server 2003.
|
||||
quartz/tests: Fix overflow in 32-bit time calculation.
|
||||
|
||||
Alexandre Julliard (50):
|
||||
ntdll: Move NtRaiseException() implementation to the Unix library.
|
||||
ntdll: Implement NtContinue() in the Unix library.
|
||||
ntdll: Use NtContinue() to restore context after an exception.
|
||||
ntdll: Use NtContinue() to set the thread initial context.
|
||||
kernel32: Use a vectored exception handler to catch Ctrl-C.
|
||||
ntdll: Remove support for setting custom signal handlers.
|
||||
itss: Fix potentially uninitialized variable compiler warnings.
|
||||
mciseq: Fix potentially uninitialized variable compiler warnings.
|
||||
riched20: Fix potentially uninitialized variable compiler warnings.
|
||||
twain_32: Fix potentially uninitialized variable compiler warnings.
|
||||
kernel32/tests: Avoid some more compiler warning for HeapAlloc() invalid parameter tests.
|
||||
ntdll: Move signal handlers to the Unix library.
|
||||
ntdll: Move some more thread functions to the Unix library.
|
||||
ntdll: Move the futex-based SRW lock implementation to the Unix library.
|
||||
ntdll: Move the futex-based condition variable implementation to the Unix library.
|
||||
ntdll: Move the wait on address implementation to the Unix library.
|
||||
ntdll: Move the futex-based critical section implementation to the Unix library.
|
||||
ntdll: Avoid overflowing the command line buffer.
|
||||
ntdll: Avoid referencing security descriptor functions from the Unix library.
|
||||
ntdll: Implement NtCreateUserProcess().
|
||||
ntdll: Move Nt system time functions to the Unix library.
|
||||
ntdll: Move the creation of the initial environment to the Unix library.
|
||||
ntdll: Move the locales initialization to the Unix library.
|
||||
dmloader: Check for invalid class in EnableCache().
|
||||
ntdll: Move fork and exec support to the Unix library.
|
||||
ntdll: Load the case mapping table in the Unix library.
|
||||
ntdll: Move the directory functions to the Unix library.
|
||||
ntdll: Move a few file functions to the Unix library.
|
||||
makefiles: Also build import libs for extra test modules.
|
||||
ntdll: Move the IO completion functions to the Unix library.
|
||||
ntdll: Move the job functions to the Unix library.
|
||||
ntdll: Move the get/set file information functions to the Unix library.
|
||||
ntdll: Initialize file redirects only after the server is connected.
|
||||
setupapi: Avoid storing uninitialized data in the registry.
|
||||
ntdll: Move the NtCreateUserProcess() implementation to the Unix library.
|
||||
ntdll: Move the process information functions to the Unix library.
|
||||
ntdll: Move the file read/write functions to the Unix library.
|
||||
ntdll: Move the device I/O control functions to the Unix library.
|
||||
ntdll: Move the Unix to NT file name conversion support to the Unix library.
|
||||
ntdll: Dynamically load callback functions from the Unix library.
|
||||
ntdll: Move the current directory initialization to the Unix library.
|
||||
ntdll: Remove support for PPC32.
|
||||
ntdll: Move the remaining process functions to the Unix library.
|
||||
ntdll: Move the thread get/set information functions to the Unix library.
|
||||
ntdll: Move the WoW64 thread context functions to the Unix library.
|
||||
ntdll: Move the image address initialization to the Unix library.
|
||||
ntdll: Move the volume information functions to the Unix library.
|
||||
ntdll: Move the directory change functions to the Unix library.
|
||||
winebuild: Make the 32-bit side of a 16-bit module always a DLL.
|
||||
ntdll: Actually return an NT path in wine_unix_to_nt_file_name() for relative paths.
|
||||
Alexandre Julliard (48):
|
||||
server: Update shared user data timestamps on every request.
|
||||
kernel32: Leave some more space for kernelbase.
|
||||
kernel32: Use set_ntstatus() in more places.
|
||||
ntdll: Implement ProcessImageInformation class in NtQueryInformationProcess().
|
||||
kernel32: Reimplement GetProcessVersion() in kernelbase.
|
||||
kernel32: Reimplement DosDateTimeToFileTime/FileTimeToDosDateTime using ntdll functions.
|
||||
kernel32: Remove actctx.c.
|
||||
kernel32: Remove cpu.c.
|
||||
kernel32: Remove environ.c.
|
||||
kernel32: Remove time.c.
|
||||
kernel32: Remove string.c.
|
||||
ntdll: Fix off-by-one buffer size error.
|
||||
ntdll: Don't call terminate_thread request if not necessary.
|
||||
ntdll: Create user shared data section in the server, and initialize it in wineboot.
|
||||
ntdll: Don't include ntdll_misc.h from the Unix library.
|
||||
ntdll: Move server initialization functions to the Unix library.
|
||||
ntdll: Move fd cache functions to the Unix library.
|
||||
ntdll: Move server call functions to the Unix library.
|
||||
ntdll: Move NtClose() and NtDuplicateObject() to the Unix library.
|
||||
ntdll: Add missing server_init_process_done() call.
|
||||
ntdll: Move the threading initialization functions to the Unix library.
|
||||
ntdll: Use the actual zero_bits parameter in the server requests.
|
||||
ntdll: Move server wait functions to the Unix library.
|
||||
ntdll: Properly reset the stack environment at thread exit on ARM64.
|
||||
ntdll: Move NtSetContextThread() implementation to the Unix library.
|
||||
ntdll: Move NtGetContextThread() implementation to the Unix library.
|
||||
ntdll: Move the virtual memory functions to the Unix library.
|
||||
ntdll: Use the local server_send_fd() function in the Unix library.
|
||||
kernel32: Move SetConsoleCtrlHandler() implementation to kernelbase.
|
||||
ntdll: Move the thread startup code to the Unix library.
|
||||
ntdll: Move the thread creation code to the Unix library.
|
||||
ntdll: Move more of the thread exit code to the Unix library.
|
||||
ntdll: Consolidate some of the init routines into the init_threading() entry point.
|
||||
ntdll: Move mapping of the user shared data to the Unix library.
|
||||
ntdll: Move some wait functions to the Unix library.
|
||||
ntdll: Move the semaphore functions to the Unix library.
|
||||
ntdll: Move the event functions to the Unix library.
|
||||
ntdll: Move the mutex functions to the Unix library.
|
||||
ntdll: Move the timer functions to the Unix library.
|
||||
ntdll: Move the keyed event functions to the Unix library.
|
||||
ntdll: Move the section object functions to the Unix library.
|
||||
ntdll: Move the rest of the thread creation code to the Unix library.
|
||||
ntdll: Implement RtlCreateUserThread() on top of NtCreateThreadEx().
|
||||
ntdll: Use NtCreateThreadEx() for remote thread creation.
|
||||
ntdll: Move NtCreateThreadEx() to the Unix library.
|
||||
ntdll: Move DbgUiIssueRemoteBreakin() to the Unix library.
|
||||
secur32/tests: Update for new WineHQ certificate.
|
||||
wininet/tests: Update for new WineHQ certificate.
|
||||
|
||||
Alistair Leslie-Hughes (10):
|
||||
include: Add winhttp web socket defines.
|
||||
winhttp: Add WinHttpWebSocket* function stubs.
|
||||
directmanipulation: New stub dll.
|
||||
directmanipulation: Register the DirectManipulationManager and DirectManipulationSharedManager classes.
|
||||
uuid: Add directmanipulation.h.
|
||||
winhttp/tests: Add WebSocket tests.
|
||||
winhttp: Status HTTP_STATUS_SWITCH_PROTOCOLS doesn't have any content.
|
||||
directmanipulation: Create DirectManipulationManager and DirectManipulationSharedManager objects.
|
||||
directmanipulation: Implement IDirectManipulationManager2::GetUpdateManager.
|
||||
directmanipulation/tests: Initial tests.
|
||||
Alistair Leslie-Hughes (1):
|
||||
include/ddk: Add wsk.h file.
|
||||
|
||||
André Hentschel (15):
|
||||
winex11.drv: Change whitelist to a more neutral word.
|
||||
winedbg: Remove support for PPC32.
|
||||
winetest: Remove support for PPC32.
|
||||
libport: Remove support for PPC32.
|
||||
dbghelp: Remove support for PPC32.
|
||||
kernel32/tests: Remove support for PPC32.
|
||||
setupapi: Remove support for PPC32.
|
||||
include: Add else cases for __cdecl.
|
||||
include: Define PCONTEXT for all architectures.
|
||||
winemenubuilder: Change blacklist to a more neutral word.
|
||||
winevulkan: Change blacklist to a more neutral word.
|
||||
krnl386.exe16: Simply clean a comment from master/slave.
|
||||
winex11.drv: Change slave to a more neutral word.
|
||||
ntdll: Change master/slave to more neutral words.
|
||||
comctl32: Clarify a comment.
|
||||
Anton Baskanov (11):
|
||||
amstream: Don't crash if parent is NULL in AMAudioStream:: and AMDirectDrawStream::GetMultiMediaStream.
|
||||
amstream: Move initialization code from audio_stream_create into AMAudioStream::Initialize and ::JoinAMMultiMediaStream.
|
||||
amstream: Move initialization code from ddraw_stream_create into AMDirectDrawStream::Initialize and ::JoinAMMultiMediaStream.
|
||||
amstream: Move initialization calls from *_stream_create into AMMultiMediaStream::AddMediaStream.
|
||||
amstream: Allow AMAudioStream and AMDirectDrawStream to be created by CoCreateInstance.
|
||||
amstream: Add tests for IAMMediaStream::Initialize and ::JoinAMMultiMediaStream.
|
||||
amstream: Leave critical section on error in MediaStreamFilter::EnumPins().
|
||||
amstream: Implement AMAudioStream::BeginFlush() and ::EndFlush().
|
||||
amstream: Implement MediaStreamFilter::SupportSeeking().
|
||||
amstream: Implement MediaStreamFilter::SetPositions().
|
||||
amstream: Call MediaStreamFilter::SupportSeeking() in AMMultiMediaStream::OpenFile().
|
||||
|
||||
Anton Baskanov (7):
|
||||
winegstreamer: Commit allocator before pausing the stream.
|
||||
quartz/filtergraph: Always try to query IMediaSeeking if it's not cached yet.
|
||||
quartz/filtergraph: Count renderers in IMediaControl::Pause and ::Run.
|
||||
quartz/filtergraph: Always sort filter list before use.
|
||||
amstream: Implement MediaStreamFilter::GetCurrentStreamTime.
|
||||
amstream: Implement IAudioStreamSample::GetSampleTimes.
|
||||
amstream: Implement AMAudioStream::NewSegment.
|
||||
Arkadiusz Hiler (2):
|
||||
user32: Move *RegisterDeviceNotification*() to input.c.
|
||||
user32: Fix NULL dereference in UnregisterDeviceNotification.
|
||||
|
||||
Brendan Shanks (5):
|
||||
kernel32/tests: Fix handle leak.
|
||||
kernel32/tests: Add RegisterWaitForSingleObject() WT_EXECUTEINWAITTHREAD tests.
|
||||
winex11.drv: Ensure output IDs are unique for mirrored displays.
|
||||
winemac.drv: Ensure output IDs are unique for mirrored displays.
|
||||
winhttp: Treat a partial certificate chain as having an unknown/invalid CA.
|
||||
Aurimas Fišeras (2):
|
||||
po: Update Lithuanian translation.
|
||||
po: Update Lithuanian translation.
|
||||
|
||||
Damjan Jovanovic (1):
|
||||
ntdll: Interpretation of l_addr depends on FreeBSD version.
|
||||
Austin English (1):
|
||||
api-ms-win-downlevel-kernel32-l2-1-0: New dll.
|
||||
|
||||
Daniel Lehman (1):
|
||||
server: Fail if non-empty directory marked for deletion.
|
||||
Biswapriyo Nath (2):
|
||||
include: Add missing structures in dcommon.idl.
|
||||
include: Add include guard in d2dbasetypes.h.
|
||||
|
||||
Derek Lesho (1):
|
||||
server: Partially implement JobObjectBasicAccountingInformation.
|
||||
Brendan Shanks (4):
|
||||
winex11.drv: Set GPU LUID property for monitors.
|
||||
winex11.drv: Set output id property for monitors.
|
||||
winemac.drv: Set GPU LUID property for monitors.
|
||||
winemac.drv: Set output id property for monitors.
|
||||
|
||||
Dmitry Timoshkov (31):
|
||||
rpcrt4/tests: Fix compilation with MS VC.
|
||||
rpcrt4/tests: Add some tests for marshalling embedded conformant arrays.
|
||||
crypt32: Store CRYPT_KEY_PROV_INFO in a platform independent way.
|
||||
prntvpt: Implement PTOpenProviderEx.
|
||||
prntvpt: Implement PTOpenProvider.
|
||||
prntvpt: Implement PTCloseProvider.
|
||||
prntvpt: Add some tests for PTOpenProvider and PTOpenProviderEx.
|
||||
prntvpt: Implement PTReleaseMemory.
|
||||
prntvpt: Implement PTConvertPrintTicketToDevMode.
|
||||
prntvpt: Add support for PageOutputColor to ticket XML reader.
|
||||
prntvpt: Add support for PageScaling to ticket XML reader.
|
||||
prntvpt: Add support for PageResolution to ticket XML reader.
|
||||
prntvpt: Add support for PageOrientation to ticket XML reader.
|
||||
prntvpt: Add support for DocumentCollate to ticket XML reader.
|
||||
prntvpt: Add support for JobInputBin to ticket XML reader.
|
||||
prntvpt: Add support for JobCopies to ticket XML reader.
|
||||
prntvpt: Add support for custom scaling to ticket XML reader.
|
||||
winedump: Fix parsing of SLTG typelib created with some old tool.
|
||||
prntvpt: Implement PTConvertDevModeToPrintTicket.
|
||||
prntvpt: Add support for PageOutputColor to ticket XML writer.
|
||||
prntvpt: Add support for PageScaling to ticket XML writer.
|
||||
prntvpt: Add support for PageResolution to ticket XML writer.
|
||||
prntvpt: Add support for PageOrientation to ticket XML writer.
|
||||
prntvpt: Add support for DocumentCollate to ticket XML writer.
|
||||
prntvpt: Add support for JobInputBin to ticket XML writer.
|
||||
prntvpt: Add support for JobCopies to ticket XML writer.
|
||||
prntvpt: Add support for custom scaling to ticket XML writer.
|
||||
prntvpt: Initialize ticket from printer defaults.
|
||||
prntvpt: Implement PTMergeAndValidatePrintTicket.
|
||||
prntvpt: Add initial implementation of PTGetPrintCapabilities.
|
||||
ieframe: Implement IPersistStorage::GetClassID().
|
||||
Damjan Jovanovic (2):
|
||||
libwine: Fix a regression in the return value check for mmap() on FreeBSD.
|
||||
ntdll: Reserve the area whenever possible in reserve_area() on FreeBSD.
|
||||
|
||||
Esme Povirk (1):
|
||||
mscoree: Update Wine Mono to 5.1.0.
|
||||
Daniel Lehman (6):
|
||||
vcruntime140_1: Support unwind handler with frame.
|
||||
vcruntime140_1: Change pointer math in decode_uint.
|
||||
vcruntime140_1: Skip unwind if already at last level.
|
||||
vcruntime140_1: Don't terminate on state of -1.
|
||||
vcruntime140_1: Unwind state 0.
|
||||
vcruntime140_1: Don't terminate on -1 trylevel.
|
||||
|
||||
Gabriel Ivăncescu (5):
|
||||
gdi32: Skip scan conversion on overflow.
|
||||
msscript.ocx: Add IScriptModuleCollection stub implementation.
|
||||
msscript.ocx: Add initial IScriptModule stub implementation.
|
||||
msscript.ocx/tests: Add initial tests for Script Modules.
|
||||
msscript.ocx: Implement IScriptModuleCollection::get_Count.
|
||||
François Gouget (1):
|
||||
winex11.drv: Avoid using the mailing list address in error messages.
|
||||
|
||||
Gerald Pfeifer (2):
|
||||
ntdll: Replicate InterlockedCompareExchange64 to the Unix library.
|
||||
ntdll: Include <signal.h> where needed in the Unix library.
|
||||
Gerald Pfeifer (1):
|
||||
ntdll: Include <stdarg.h> in unix/debug.c.
|
||||
|
||||
Gijs Vermeulen (7):
|
||||
msado15: Ignore IRunnableObject interface in recordset/connection_QueryInterface.
|
||||
msado15: Improve _Connection_Open/Close stubs.
|
||||
quartz/filtergraph: Add a stub IVideoFrameStep interface.
|
||||
d3dx9: Implement ID3DXSkinInfo_Clone().
|
||||
amstream: Get rid of the IDirectDrawStreamSampleImpl typedef.
|
||||
amstream/tests: Add IDirectDrawStreamSample::GetMediaStream() tests.
|
||||
amstream: Don't crash on NULL ddraw in IDirectDrawMediaStream::GetDirectDraw().
|
||||
Gijs Vermeulen (6):
|
||||
include: Add cfg.h.
|
||||
wuapi: Add UpdateInstaller coclass.
|
||||
wuapi: Fake success in IUpdateInstaller::get_IsBusy.
|
||||
wtsapi32: Implement WTSQuerySessionInformationA.
|
||||
wtsapi32: Improve WTSQuerySessionInformationW stub.
|
||||
winemac: Cast buffer to const WCHAR* in insert_clipboard_format.
|
||||
|
||||
Hans Leidekker (2):
|
||||
msi: Fix installing from administrative image with compressed source files.
|
||||
winhttp: Implement WinHttpWebSocketCompleteUpgrade.
|
||||
Hans Leidekker (8):
|
||||
mountmgr: Return the disk serial from IOCTL_STORAGE_QUERY_PROPERTY(StorageDeviceProperty).
|
||||
wbemprox: Get the disk drive serial number from mountmgr.
|
||||
bcrypt: Implement BCryptDeriveKeyCapi.
|
||||
bcrypt: Add support for BCRYPT_DSA_ALGORITHM.
|
||||
msado15: Fix NULL pointer dereference in close_recordset.
|
||||
bcrypt: Add support for importing and exporting DSS private keys.
|
||||
mountmgr: Fix buffer length check.
|
||||
bcrypt: Handle different sized R/S signature components.
|
||||
|
||||
Henri Verbeet (3):
|
||||
wined3d: Do not explicitly check 3D depth/stencil capabilities in wined3d_check_device_format().
|
||||
wined3d: Get rid of WINED3D_QUIRK_SET_TEXCOORD_W.
|
||||
wined3d: Get rid of the special format handling in wined3d_check_depth_stencil_format().
|
||||
Henri Verbeet (39):
|
||||
wined3d: Move the swapchain logo texture blit to wined3d_cs_exec_present().
|
||||
wined3d: Move the swapchain cursor texture blit to wined3d_cs_exec_present().
|
||||
wined3d: Implement occlusion queries for the Vulkan adapter.
|
||||
wined3d: Implement timestamp queries for the Vulkan adapter.
|
||||
wined3d: Implement timestamp disjoint queries for the Vulkan adapter.
|
||||
wined3d: Implement event queries for the Vulkan adapter.
|
||||
wined3d: Implement pipeline statistics queries for the Vulkan adapter.
|
||||
wined3d: Map vkGetPhysicalDeviceFeatures2() to vkGetPhysicalDeviceFeatures2KHR().
|
||||
wined3d: Also load the index buffer in wined3d_context_vk_apply_draw_state() if STATE_INDEXBUFFER was invalidated.
|
||||
wined3d: Use wined3d_buffer_vk_get_buffer_info() when binding the Vulkan index buffer.
|
||||
wined3d: Use wined3d_buffer_vk_get_buffer_info() when binding Vulkan vertex buffers.
|
||||
wined3d: Initialise more caps and limits in wined3d_adapter_vk_init_d3d_info().
|
||||
wined3d: Map Vulkan adapter bo's persistently on 64-bit architectures.
|
||||
wined3d: Move swapchain buffer discarding to wined3d_cs_exec_present().
|
||||
wined3d: Implement swapchains for the Vulkan adapter.
|
||||
wined3d: Wait for the command stream to finish before removing the context in adapter_no3d_uninit_3d().
|
||||
wined3d: Create WINED3D_NO3D swapchain surfaces without GPU access.
|
||||
wined3d: Check for GPU access before attempting an upload blit in texture2d_blt().
|
||||
wined3d: Explicitly check for WINED3D_NO3D instead of "d3d_initialized" in surface_convert_format().
|
||||
wined3d: Set "device->d3d_initialized" in wined3d_device_set_implicit_swapchain().
|
||||
wined3d: Get rid of the "d3d_initialized" check in wined3d_device_reset().
|
||||
wined3d: Get rid of the "d3d_initialized" check in context_resource_released().
|
||||
wined3d: Get rid of the "d3d_initialized" check in device_resource_released().
|
||||
wined3d: Get rid of the "d3d_initialized" check in wined3d_texture_update_map_binding().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in arbfp_blit_supported().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in glsl_blitter_supported().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in ffp_blit_supported().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in wined3d_texture_blt().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in texture2d_blt().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in texture2d_depth_blt_fbo().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in fbo_blitter_blit().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache.
|
||||
wined3d: Use "depth_size" to check for a depth format in resolve_depth_buffer().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in query_internal_format().
|
||||
wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in create_and_bind_fbo_attachment().
|
||||
wined3d: Introduce WINED3DFMT_FLAG_DEPTH_STENCIL.
|
||||
wined3d: Clear WINED3DFMT_FLAG_DEPTH_STENCIL if the format is not supported as FBO attachment.
|
||||
wined3d: Reference the back buffer in wined3d_swapchain_vk_blit().
|
||||
wined3d: Partially implement adapter_vk_clear_uav().
|
||||
|
||||
Huw D. M. Davies (2):
|
||||
gdi32: Move the scan conversion to a helper function.
|
||||
oleaut32: Return early if there is no matching funcdesc.
|
||||
Huw D. M. Davies (3):
|
||||
ntdll: Use the correct size when the read spans a page boundary.
|
||||
ntdll: Remove unnecessary page variable.
|
||||
bcrypt: Add stubs for DSS private key functions on macOS.
|
||||
|
||||
Jacek Caban (29):
|
||||
winnt.h: Add BitScanForward and BitScanReverse implementation.
|
||||
ntdll: Reimplement _aulldiv using 32-bit arithmetic.
|
||||
ntdll: Reimplement _aullrem using 32-bit arithmetic.
|
||||
ntdll: Reimplement _alldiv using 32-bit arithmetic.
|
||||
ntdll: Reimplement _allrem using 32-bit arithmetic.
|
||||
ntdll: Reimplement _allmul using 32-bit arithmetic.
|
||||
ntdll/tests: Add long long builtins tests.
|
||||
ntdll: Export builtin functions as cdecl.
|
||||
mshtml: Use DISPID_UNKNOWN for compat dispids not supported in compat mode.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnCount property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnWidth property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnWidth property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnFill property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnSpan property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnRuleColor property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnRuleStyle property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnRuleWidth property semi-stub implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::columnRule property semi-stub implementation.
|
||||
mshtml: Expose IHTMLCSSStyleDeclaration2 to scripts.
|
||||
mshtml: Use proper compat mode in IHTMLWindow7::getComputedStyle.
|
||||
ntoskrnl: Use loader notification callback to perform relocations.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::perspective implementation.
|
||||
msvcp: Use BitScanReverse in log2i.
|
||||
dwrite: Use BitScanForward instead of dwrite_ctz.
|
||||
dwrite: Use BitScanReverse instead of dwrite_log2i.
|
||||
d3dx9: Use BitScanReverse in make_pow2.
|
||||
msscript: Reimplement state property using embedded script engine state.
|
||||
msscript/tests: Add more script state tests.
|
||||
msscript: Parse script host object instead of control to parse_script_text.
|
||||
Jacek Caban (41):
|
||||
rpcndr.h: Avoid error_status_t redefinition.
|
||||
winegcc: Store main arguments in strarray.
|
||||
winegcc: Add support for @file arguments.
|
||||
winegcc: Add support for -Wl,--whole-archive option.
|
||||
setjmp.h: Use __intrinsic_setjmpex when using ucrt.
|
||||
winnt.h: Provide inline NtCurrentTeb implementation for mingw arm builds.
|
||||
dmusic/tests: Introduce compare_time helper.
|
||||
kernel32/tests: Remove workaround for NT4.
|
||||
kernel32/tests: Avoid using abs on ULONGLONG values.
|
||||
wintab32: Fix -Wabsolute-value warning.
|
||||
taskmgr: Introduce size_diff helper.
|
||||
d3d9/tests: Use int for indexes in generate_bumpmap_textures.
|
||||
mshtml: Use return_nsstr_variant in HTMLTable_get_width.
|
||||
mshtml: Add IHTMLTableCell::height property implementation.
|
||||
mshtml: Add IHTMLTableCell::width property implementation.
|
||||
gdiplus/tests: Introduce compare_uint helper.
|
||||
ieframe: Return S_FALSE in IWebBrowser2::get_Document when returning NULL.
|
||||
gdiplus: Introduce absdiff helper.
|
||||
quartz/tests: Fix -Wabsolute-value warnings.
|
||||
jscript: Support ES5 Array.prototype.sort arguments handling.
|
||||
jscript: Support context argument in Array.prototype.forEach.
|
||||
jscript: Throw proper exception in RegExp.prototype.toString when called on non-RegExp object.
|
||||
mshtml/tests: Introduce sync_test helper.
|
||||
winmm/tests: Introduce compare_uint helper.
|
||||
winmm: Introduce compare_uint helper.
|
||||
configure: Enable -Wabsolute-value on cross compiler.
|
||||
jscript: Inline add_eval implementation.
|
||||
jscript: Don't realloc interpreter stack.
|
||||
jscript: Throw proper stack overflow exception.
|
||||
mshtml/tests: Improve tests exception handling.
|
||||
jscript: Add Object.keys implementation.
|
||||
jscript: Use wide string literals in array.c.
|
||||
jscript: Add Array.prototype.reduce implementation.
|
||||
jscript: Support passing non-string pattern to RegExp constructor.
|
||||
jscript: Support passing non-string flags to RegExp constructor.
|
||||
jscript: Add Object.preventExtensions semi-stub implementation.
|
||||
mshtml: Use return_nsstr_variant in IHTMLBodyElement::get_bgColor.
|
||||
mshtml: Use default white value in IHTMLDocument2::get_bgColor.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::transform property implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::animationName property implementation.
|
||||
mshtml: Add IHTMLCSSStyleDeclaration2::transition property implementation.
|
||||
|
||||
Jeff Smith (10):
|
||||
kernelbase: Output message ID as hex in debug messages.
|
||||
gdiplus/tests: Test hatch brush patterns.
|
||||
gdiplus: Fix most hatch brush patterns.
|
||||
gdiplus: Fix hatch brush patterns that require anti-aliasing.
|
||||
gdiplus: Handle additional hatch styles.
|
||||
d3drm: Set light alpha to 1.0 in d3drm_light_SetColor().
|
||||
d3drm/tests: Test IDirect3DRM_CreateLight().
|
||||
d3drm: Get rid of the "partial stub" FIXMEs in the light creation functions.
|
||||
gdiplus/tests: Test that hatch fill uses rendering origin.
|
||||
gdiplus: Handle rendering origin during hatch fill.
|
||||
Ken Thomases (1):
|
||||
winemac: Fix a string format warning for tick counts in update_clipboard().
|
||||
|
||||
Lauri Kenttä (1):
|
||||
po: Update Finnish translation.
|
||||
Liam Middlebrook (1):
|
||||
winevulkan: Update to VK spec version 1.2.142.
|
||||
|
||||
Louis Lenders (2):
|
||||
pwrshplugin: New stub dll.
|
||||
ws2_32: Add FreeAddrInfoEx.
|
||||
Louis Lenders (5):
|
||||
usp10: Add stub for ScriptGetFontAlternateGlyphs.
|
||||
api-ms-win-core-libraryloader-l2-1-0: Add new dll.
|
||||
api-ms-win-core-memory-l1-1-4: Add new dll.
|
||||
api-ms-win-core-localization-l1-2-2: Add new dll.
|
||||
explorerframe: Return S_OK in ITaskbarList::SetOverlayIcon.
|
||||
|
||||
Martin Storsjo (1):
|
||||
widl: Make decl_needs_parens static.
|
||||
Martin Storsjo (12):
|
||||
configure: Pass -fasynchronous-unwind-tables to the compiler.
|
||||
ntdll: Fix handling of the save_lrpair unwind opcode.
|
||||
ntdll: Fix byte vs register units in unwind_packed_data.
|
||||
ntdll: Pass a nonnull handler_data in when continuing after a collided unwind.
|
||||
ntdll: Store the real stack pointer in RtlCaptureContext.
|
||||
ntdll: Fix unwinding functions that end with a branch instruction.
|
||||
wine/asm.h: Use __ASM_CFI on clang too, despite not defining __GCC_HAVE_DWARF2_CFI_ASM.
|
||||
ntdll: Implement RtlRestoreContext.
|
||||
ntdll: Keep the previous iteration of NonVolatileRegisters in call_function_handlers.
|
||||
ntdll: Fix unwinding through raise_generic_exception.
|
||||
ntdll: Implement RtlRaiseException in assembly to fix continuing from exceptions.
|
||||
wine/asm.h: Don't define __ASM_CFI when using clang as cross compiler.
|
||||
|
||||
Matteo Bruni (2):
|
||||
d3dcompiler: Print float constants with more precision.
|
||||
d3dcompiler: Check shader for NULL.
|
||||
Matteo Bruni (3):
|
||||
ntdll: Use memcpy() in set_float_reg().
|
||||
user32: Add missing WM_WINE_CLIPCURSOR message type name.
|
||||
user32: Make sure update_window_state() is always executed on the owner thread.
|
||||
|
||||
Nikolay Sivov (46):
|
||||
dwrite: Sort feature tags returned from GetTypographicFeatures().
|
||||
dwrite: Remove fixme from CreateFontFallback().
|
||||
dwrite: Implement CheckTypographicFeature().
|
||||
dwrite: Unify context lookup helpers.
|
||||
dwrite: Implement contextual positional lookups.
|
||||
dwrite: Limit recursion level for context lookups.
|
||||
dwrite: Disallow recursing to reverse chaining substitution.
|
||||
dwrite: Do not require fontface object for HasCharacter().
|
||||
dwrite: Remove unused field from fontface data structure.
|
||||
dwrite: Get rid of cmap cache.
|
||||
dwrite: Return ranges for selected cmap.
|
||||
dwrite: Implement GetVerticalGlyphVariants().
|
||||
dwrite: Silence HasVariations() fixme.
|
||||
dwrite: Fix CreateInMemoryFontFileLoader() prototype.
|
||||
dwrite: Share same cluster for bases and following diacritics in initial map.
|
||||
dwrite: Update clustermap once after all features have been applied.
|
||||
dwrite: Set initial canBreakShapingAfter flags.
|
||||
dwrite: Normalize glyph data before passing it to matching function.
|
||||
dwrite: Implement ligature substitution.
|
||||
dwrite: Implement another GetFontFamily() variant.
|
||||
ntdll: Fix a typo in security descriptor flags.
|
||||
ntdll: Use single field for misc flags in ComClass redirection section.
|
||||
ntdll: Create class section for proxy-stub interface entries.
|
||||
ole32: Remove workaround for creating objects from context proxy-stub descriptions.
|
||||
dwrite: Keep current lookup feature mask in context.
|
||||
dwrite: Remove some unused types.
|
||||
dwrite: Use single table pointer in GPOS handlers.
|
||||
dwrite: Implement mark to ligature attachment (GPOS lookup 5).
|
||||
dwrite: Use mark array helper in mark to base attachment handler.
|
||||
dwrite: Use mark array helper in mark to mark attachment handler.
|
||||
dwrite: Add missing script tags.
|
||||
dwrite: Simplify single substitution handler.
|
||||
dwrite: Simplify multiple substitution handler.
|
||||
dwrite: Simplify alternate substitution handler.
|
||||
dwrite: Simplify ligature substitution handler.
|
||||
evr/tests: Add basic creation test for default mixer object.
|
||||
evr: Add IMFTransform stub for default video mixer.
|
||||
evr: Add IMFVideoDeviceID to default mixer.
|
||||
evr: Add IMFTopologyServiceLookupClient stub for default mixer.
|
||||
d2d1: Implement D2D1CreateDevice().
|
||||
evr: Implement stream managment methods for default mixer.
|
||||
evr: Create attributes for input mixer streams.
|
||||
evr: Add IMFVideoMixerControl2 stub for the mixer.
|
||||
mf: Set clipping window attribute for EVR activator.
|
||||
mfplat: Add EVR activator attributes to tracing.
|
||||
evr/tests: Add some tests for surface samples.
|
||||
Nikolay Sivov (68):
|
||||
dwrite: Fix array indexing when merging features.
|
||||
dwrite: Set glyph class for all initial glyphs.
|
||||
dwrite: Set glyph class properties when applying GPOS.
|
||||
dwrite: Use prefetched glyph class to match with lookup mask.
|
||||
dwrite: Simplify single substitution helper.
|
||||
include: Add IMFMediaEngineEx definition.
|
||||
mfplat: Add Media Engine attributes to tracing.
|
||||
include: Add CResamplerMediaObject class id.
|
||||
dwrite: Update glyph properties on single substitution.
|
||||
dwrite: Only enable single substitution lookups for chained substitution.
|
||||
dwrite: Use temporary buffers for GetGlyphs().
|
||||
dwrite: Prefetch all lookup entry fields when collecting them.
|
||||
dwrite: Use global cursor to glyph array for substitutions.
|
||||
dwrite: Reference currently used layout table in context.
|
||||
dwrite: Handle extension substitution (GSUB lookup 7).
|
||||
dwrite: Implement alternate substitution (GSUB lookup 3).
|
||||
dwrite: Use cluster map to apply use feature ranges.
|
||||
dwrite: Mark some of default ignorables as ZWS.
|
||||
dwrite: Keep text properties zero initialized.
|
||||
dwrite: Use GPOS handlers for subtables, not whole lookups.
|
||||
dwrite: Implement multiple substitution (GSUB lookup 2).
|
||||
dwrite: Update glyph component count on multiple substitution.
|
||||
dwrite: Add stub handler for ligature substitution.
|
||||
include: Add Media Engine events constants.
|
||||
mfmediaengine/tests: Use global factory instance.
|
||||
mfmediaengine/tests: Add some tests for shutdown state.
|
||||
mfmediaengine: Add shut down state.
|
||||
mfmediaengine: Keep auto-play flag.
|
||||
mfmediaengine: Keep loop flag.
|
||||
dwrite: Simplify glyph properties helpers by using current glyph buffer.
|
||||
dwrite: Implement mark glyph filtering.
|
||||
dwrite/tests: Enable glyph class tests on Wine.
|
||||
dwrite: Add matching callback support for iterators.
|
||||
dwrite: Use iterator matching for chain substitution.
|
||||
dwrite: Implement chaining contextual substitution of format 1.
|
||||
dwrite: Implement chaining contextual substitution of format 2.
|
||||
mfmediaengine: Create media session instance.
|
||||
mfmediaengine: Send "play" event on Play().
|
||||
mfmediaengine: Send "pause" event on Pause().
|
||||
dwrite: Fix lookup collection when no suitable script was found.
|
||||
dwrite: Add properties for recently added scripts.
|
||||
dwrite: Implement contextual subsitution (GSUB lookup 5).
|
||||
dwrite: Fix offsets when stepping through chain rule fields.
|
||||
dwrite: Add main loop variant for reverse substitution.
|
||||
mfmediaengine: Send "ratechange" event for both default and playback rate changes.
|
||||
mfmediaengine: Send "volumechange" event on muted state change.
|
||||
mfmediaengine: Send "volumechange" event on volume change.
|
||||
mfmediaengine: Propagate error out on missing callback attribute.
|
||||
mfmediaengine: Duplicate configuration attributes.
|
||||
mfmediaengine: Forward buffering events to user callback.
|
||||
mf/session: Handle source buffering events.
|
||||
dwrite: Implement reverse chain contextual substitution (GSUB lookup 8).
|
||||
dwrite: Use lookup fitering for context matching.
|
||||
dwrite: Include required feature when collecting lookups.
|
||||
dwrite: Enable lookups from non-global features too.
|
||||
dwrite: Partially implement GetBaseline().
|
||||
include: Add more Media Foundation error codes.
|
||||
mfmediaengine: Set media type flags on source resolution.
|
||||
mfmediaengine: Set presentation duration attribute.
|
||||
mfmediaengine/tests: Add some tests for error property.
|
||||
mfmediaengine: Implement error object.
|
||||
mfmediaengine: Implement error property.
|
||||
mfmediaengine: Fully initialize error state.
|
||||
mfmediaengine: Implement GetCurrentSource().
|
||||
mfmediaengine: Update ready state property during resolution.
|
||||
mfmediaengine: Set up audio output branch.
|
||||
dwrite: Fix global feature mask to match its shift.
|
||||
dwrite: Use correct glyph array offset for alternate substitution table output.
|
||||
|
||||
Paul Gofman (29):
|
||||
ntdll: Perform fsync() in client for files and directories.
|
||||
ntoskrnl.exe/tests: Move test functions to the new utils.h header.
|
||||
include/ddk: Define MAKE_WSK_VERSION macro.
|
||||
include/ddk: Add WSK timeout constants definitions.
|
||||
ntoskrnl.exe/tests: Add initial test for netio.sys.
|
||||
netio.sys: Add WSK provider stub interface.
|
||||
netio.sys: Implement wsk_get_address_info() function.
|
||||
netio.sys: Implement wsk_free_address_info() function.
|
||||
ntoskrnl.exe/tests: Add test for wsk_get_address_info().
|
||||
include: Add CMSGHDR, PCMSGHDR defintion.
|
||||
include/ddk: Add definition for WSK socket interfaces.
|
||||
netio.sys: Implement wsk_socket() function for listen sockets.
|
||||
netio.sys: Implement wsk_close_socket() function.
|
||||
ntoskrnl/tests: Add initial test for WSK listen socket.
|
||||
wined3d: Merge _USER_MEMORY and _SYSMEM locations.
|
||||
ddraw: Update texture_memory when setting new texture parent in ddraw_surface7_Flip().
|
||||
wined3d: Set user memory separately for texture sub resources.
|
||||
ddraw/tests: Add more tests for _SetSurfaceDesc with mipmaps.
|
||||
ddraw/tests: Port _SetSurfaceDesc() tests for mipmaps and DDSD_LPSURFACE for ddraw4.
|
||||
ddraw/tests: Port _SetSurfaceDesc() tests for mipmaps and DDSD_LPSURFACE for ddraw2.
|
||||
ws2_32: Optimize interface_bind_check() by caching adapter addresses.
|
||||
netio.sys: Add stub interface for connection sockets.
|
||||
netio.sys: Implement wsk_bind() function.
|
||||
netio.sys: Implement wsk_accept() function.
|
||||
ntoskrnl/tests: Add test for WskAccept().
|
||||
winex11.drv: Handle X error from vkGetRandROutputDisplayEXT().
|
||||
netio.sys: Support multiple simultaneous async operations for socket.
|
||||
netio.sys: Implement wsk_{send|receive}().
|
||||
ntoskrnl/tests: Add test for WSK send and receive.
|
||||
Paul Gofman (50):
|
||||
ntoskrnl.exe: Add KdRefreshDebuggerNotPresent() function.
|
||||
include/ddk: Add prototype for KeQueryActiveProcessors().
|
||||
include: Add prototype for GetActiveProcessorCount().
|
||||
ntoskrnl.exe: Add KeQueryActiveProcessorCountEx() function.
|
||||
include/ddk: Fix struct _KUSER_SHARED_DATA definition.
|
||||
ntdll: Fill ActiveProcessorCount field in _KUSER_SHARED_DATA.
|
||||
ntdll: Fill ActiveGroupCount field in _KUSER_SHARED_DATA.
|
||||
ntoskrnl.exe: Return zero for unknown msr registers.
|
||||
ntoskrnl.exe: Fix KeQueryActiveProcessors() function.
|
||||
ntoskrnl.exe: Add KeSetSystemAffinityThreadEx() function.
|
||||
ntoskrnl.exe: Implement KeSetSystemAffinityThread() function.
|
||||
ntoskrnl.exe: Implement KeRevertToUserAffinityThreadEx() function.
|
||||
ntoskrnl.exe: Implement KeRevertToUserAffinityThread() function.
|
||||
ntoskrnl.exe: Import KeGetCurrentProcessorNumber() function.
|
||||
ntoskrnl.exe: Add KeSignalCallDpcDone() function.
|
||||
ntoskrnl.exe: Add KeGenericCallDpc() function.
|
||||
ntoskrnl.exe: Add KeSignalCallDpcSynchronize() function.
|
||||
ntoskrnl.exe/tests: Add basic test for DPC call.
|
||||
wined3d: Use a single wined3d_texture_is_full_rect() function.
|
||||
wined3d: Prepare/load the destination resource location in glsl_blitter_blit().
|
||||
wined3d: Allow multisample destination locations for all colour blits.
|
||||
wined3d: Allow multisample source locations for all colour blits.
|
||||
ntoskrnl.exe: Partially implement KeInitializeDpc() function.
|
||||
ntoskrnl.exe: Add KeSetTimer() function.
|
||||
ntoskrnl.exe: Reimplement KeSetTimerEx() on top of thread pool.
|
||||
ntoskrnl.exe: Avoid leaking events on multipe KeSetTimerEx() calls.
|
||||
ntoskrnl.exe: Cancel active timer before setting it.
|
||||
ntoskrnl.exe: Support DPCs with timers.
|
||||
ntoskrnl.exe/tests: Add more timer tests.
|
||||
ntoskrnl.exe: Fix ObRegisterCallbacks() function parameter definition.
|
||||
ntoskrnl.exe: Return STATUS_SUCCESS from ExCreateCallback() stub.
|
||||
ntoskrnl.exe: Add stub for ExRegisterCallback() function.
|
||||
ntoskrnl.exe: Add stub for ExUnregisterCallback() function.
|
||||
ntoskrnl.exe: Implement IoReuseIrp() function.
|
||||
include/ddk: Update the IMAGE_INFO structure.
|
||||
ntoskrnl.exe: Implement image load notify routines registration.
|
||||
include: Add RTL_QUERY_REGISTRY_TYPECHECK defines.
|
||||
ntoskrnl.exe: Call load image notify routines for driver modules.
|
||||
ntoskrnl.exe: Implement PsGetProcessSectionBaseAddress() function.
|
||||
ntoskrnl.exe: Zero copied size in MmCopyVirtualMemory() stub.
|
||||
include/ddk: Add _KAPC_STATE structure definition.
|
||||
ntoskrnl.exe: Add stub for KeStackAttachProcess().
|
||||
ntoskrnl.exe: Add stub for KeUnstackDetachProcess().
|
||||
ntoskrnl.exe/tests: Add a test for accessing process memory.
|
||||
ntoskrnl.exe/tests: Avoid race condition in test driver.
|
||||
netio.sys: Add driver stub.
|
||||
netio.sys: Add stub for WskRegister().
|
||||
netio.sys: Add stub for WskDeregister().
|
||||
netio.sys: Add stub for WskCaptureProviderNPI().
|
||||
netio.sys: Add stub for WskReleaseProviderNPI().
|
||||
|
||||
Piotr Caban (7):
|
||||
msvcrt: Use internal sprintf implementation.
|
||||
msvcrt: Reimplement special doubles printing.
|
||||
msvcrt: Reimplement %a printf format handling.
|
||||
ucrtbase: Add printf %a format tests.
|
||||
ucrtbase: Add more inf,nan,ind printf tests.
|
||||
vcruntime140_1: Add support for pointer to object in unwind info.
|
||||
msvcrt: Reset buffer in fflush on error.
|
||||
Rémi Bernon (9):
|
||||
ntdll: Introduce free_ranges indexing sequence.
|
||||
ntdll: Use the free ranges in find_reserved_free_area.
|
||||
d3d10core: Directly call DXGID3D10CreateDevice().
|
||||
d3d11: Stop advertising the ID3D10Device interface on devices created by d3d11.
|
||||
crypt32/tests: Fix signed integral cast warning.
|
||||
dxgi/tests: Fix signed integral cast warning.
|
||||
sxs: Fix uninitialized variable warning.
|
||||
msvcirt/tests: Fix signed integral cast warning.
|
||||
msvcp120/tests: Fix signed integral cast warning.
|
||||
|
||||
Porot Mo (3):
|
||||
oleaut32/tests: Add tests for ITypeInfo::GetDllEntry().
|
||||
oleaut32: Match funcdesc using both memberid and invkind.
|
||||
wshom.ocx: Expand environment string before executing command through CreateProcessW.
|
||||
Serge Gautherie (3):
|
||||
advpack: RegQueryValueExW() wants bytes, not chars.
|
||||
shlwapi: RegQueryValueExW() wants bytes, not chars.
|
||||
mscoree: RegQueryValueExW() wants bytes, not chars.
|
||||
|
||||
Rémi Bernon (3):
|
||||
dinput: Stop sending WM_WINE_NOTIFY_ACTIVITY on every input.
|
||||
dinput: Use a single list for all acquired devices.
|
||||
dinput: Use dedicated list for mouse and keyboard.
|
||||
Thomas Faber (1):
|
||||
ntdll/tests: Fix a test failure on Server 2003.
|
||||
|
||||
Vijay Kiran Kamuju (5):
|
||||
include: Add wownt16.h.
|
||||
include: Add IMarkupServices2, IMarkupContainer2 and IMarkupPointer2 related interfaces.
|
||||
oleaut32: Merge four DWORDs into a GUID.
|
||||
oleaut32: Include the leading '\1' in the CompObj stream name.
|
||||
include: Add missing packing, structs and defines for xact3wb.h.
|
||||
Torge Matthies (1):
|
||||
joy.cpl: Fix pulsing buttons in joystick button state display.
|
||||
|
||||
Zebediah Figura (38):
|
||||
ntdll: Avoid leaking "drive" on error paths from get_mountmgr_fs_info() (Valgrind).
|
||||
d3dcompiler/tests: Add a test for struct assignment.
|
||||
strmbase: Clear the debug info before calling DeleteCriticalSection (Valgrind).
|
||||
strmbase: Avoid leaking the media type on failure in IEnumMediaTypes::Next().
|
||||
quartz/tests: Avoid leaking the media type from IPin::ConnectionMediaType() (Valgrind).
|
||||
quartz: Free type libraries on process detach (Valgrind).
|
||||
qedit: Free type libraries on process detach (Valgrind).
|
||||
qasf: Free type libraries on process detach (Valgrind).
|
||||
evr: Free type libraries on process detach (Valgrind).
|
||||
strmbase: Release the allocator in IPin::Disconnect() (Valgrind).
|
||||
winegstreamer: Don't query our own source pad to convert duration.
|
||||
winegstreamer: Calculate duration independently per pin.
|
||||
winegstreamer: Try to convert the duration from bytes if the pad doesn't support querying time directly.
|
||||
setupapi: Reset the source file pointer when comparing files.
|
||||
setupapi: Store the original INF file path in a .pnf file.
|
||||
setupapi: Use the original INF source path if possible when copying files.
|
||||
d3dcompiler: Use the cached scalar type in expr_common_type() where possible.
|
||||
d3dcompiler: Cache vector types.
|
||||
d3dcompiler: Emit constructors as sequences of stores to a synthetic variable.
|
||||
d3dcompiler: Allow hlsl_ir_constant to contain only numeric types.
|
||||
d3dcompiler: Check for missing return value semantics on the entry point.
|
||||
d3dcompiler: Return an HRESULT from parse_hlsl().
|
||||
include: Correct the name of WAVEBANKMINIWAVEFORMAT.
|
||||
quartz/vmr9: Trace the arguments to IVMRWindowlessControl9::SetVideoPosition().
|
||||
quartz/vmr9: Implement IVMRWindowlessControl9::SetAspectRatioMode().
|
||||
quartz/vmr9: Get rid of VMR9_ImagePresenter_PresentOffscreenSurface().
|
||||
quartz/tests: Relax some timings.
|
||||
ntoskrnl.exe/tests: Test completion callback parameters.
|
||||
ntoskrnl.exe: Call completion callbacks with the correct device.
|
||||
quartz: Try to connect all source pins when autoplugging from the registry.
|
||||
quartz/tests: Test autoplugging order.
|
||||
quartz: Combine IGraphBuilder::Render() and IGraphBuilder::Connect() into a single helper.
|
||||
quartz: Implement IFilterGraph2::RenderEx().
|
||||
d3dcompiler/tests: Add a test for struct field semantics.
|
||||
d3dcompiler/tests: Add a couple of extra tests for struct declaration syntax.
|
||||
d3dcompiler/tests: Add a simple test for global variable initializers.
|
||||
d3dcompiler: Factor out hlsl_ir_var allocation.
|
||||
winegstreamer: Clear the "colorimetry" and "chroma-site" fields in amt_to_gst_caps_video().
|
||||
Vijay Kiran Kamuju (4):
|
||||
msasn1: Add stub for ASN1_Decode function.
|
||||
include: Add missing enum, function and packing to msasn1.h.
|
||||
ole2.dll16: Add stub OleIsCurrentClipboard function.
|
||||
winspool.drv: Implement AddPrintProcessorA via AddPrintProcessorW.
|
||||
|
||||
Zebediah Figura (23):
|
||||
amstream: Simplify flush_receive_queue() a bit.
|
||||
amstream: Don't duplicate IMediaStream method implementations.
|
||||
quartz/vmr9: Fake success from IVMRMixerConrol9::SetMixingPrefs().
|
||||
quartz/vmr9: Use TRACE for some implemented methods.
|
||||
quartz/vmr9: Don't query for IVMRSurfaceAllocatorEx9.
|
||||
quartz/vmr9: Don't expose IVMRSurfaceAllocatorEx9 from the default presenter.
|
||||
quartz/vmr9: Remove the unused "allocator_mon" field.
|
||||
quartz/vmr9: Get rid of CreateRenderingWindow().
|
||||
quartz/vmr9: Trace argument values instead of omitting them.
|
||||
d3dcompiler: Store derefs as an offset to a variable.
|
||||
d3dcompiler: Rename HLSL_IR_DEREF to HLSL_IR_LOAD.
|
||||
d3dcompiler: Store some builtin types in the hlsl_ctx structure.
|
||||
d3dcompiler: Don't add a record deref to the instruction list twice.
|
||||
d3dcompiler: Create assignment instructions more directly in struct_var_initializer().
|
||||
d3dcompiler: Pass the semantic and location parameters to new_func_decl().
|
||||
d3dcompiler: Also check the type class when checking for void.
|
||||
d3dcompiler: Write to the function return value using a separate instruction.
|
||||
amstream/tests: Define and use a global variable holding an audio media type.
|
||||
d3dcompiler: Fix up the swizzle data type when unwrapping it from the assignment LHS.
|
||||
d3dcompiler: Remove a redundant check for writemasks on non-numeric types.
|
||||
d3dcompiler: Coerce the RHS before unwrapping swizzles.
|
||||
d3dcompiler: Fix matrix dimension declaration for matrix<...> syntax.
|
||||
d3dcompiler: Use hlsl_report_message() where possible.
|
||||
|
||||
Zhipeng Zhao (1):
|
||||
ole32: Deal with WM_RENDERFORMAT if the clipboard is empty.
|
||||
wlanapi: Add WlanQueryInterface stub implementation.
|
||||
|
||||
Zhiyi Zhang (15):
|
||||
winex11.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings.
|
||||
gdi32/tests: Remove tests for VidPnSourceId.
|
||||
winemac.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings.
|
||||
explorer: Initialize registry display settings for all adapters.
|
||||
winex11.drv: Support multiple adapter display settings in registry.
|
||||
gdi32: Support LUID in D3DKMTOpenAdapterFromGdiDisplayName().
|
||||
user32/tests: Test changing to a 1Hz display mode.
|
||||
winex11.drv: Use the default frequency in ChangeDisplaySettingsExW() if dmDisplayFrequency is 1.
|
||||
winemac.drv: Use the default frequency in ChangeDisplaySettingsExW() if dmDisplayFrequency is 1.
|
||||
user32: Change slave to a more neutral word.
|
||||
winemac.drv: Use helpers to get and release display device init mutex.
|
||||
winemac.drv: Support multiple adapter display settings in registry.
|
||||
winex11.drv: Add a Vulkan UUID property for GPUs.
|
||||
winevulkan: Thunk vkGetPhysicalDeviceProperties2 and vkGetPhysicalDeviceProperties2KHR.
|
||||
winevulkan: Fill Vulkan device LUID property.
|
||||
Zhiyi Zhang (6):
|
||||
user32: Handle NULL device and mode parameters in ChangeDisplaySettingsExW().
|
||||
winex11.drv: Fake success for changing non-primary adapter settings.
|
||||
winemac.drv: Fake success for changing non-primary adapter settings.
|
||||
user32: Fake success for detaching adapters.
|
||||
ddraw: Get new window size from the primary output after display mode changes.
|
||||
rpcrt4: Implement RpcIfInqId().
|
||||
|
||||
Ziqing Hui (8):
|
||||
windowscodecs: Initialize block data in DdsDecoder_Dds_GetFrame().
|
||||
windowscodecs/tests: Add a DXT3 test image for DDS decoder.
|
||||
windowscodecs/tests: Add more tests for DdsFrameDecode_Dds_CopyBlocks() when "boundsInBlocks" is NULL.
|
||||
windowscodecs: Implement DdsFrameDecode_Dds_CopyBlocks().
|
||||
windowscodecs/tests: Add tests for DdsFrameDecode_GetPixelFormat().
|
||||
windowscodecs/tests: Add decoder info tests for DDS decoder.
|
||||
windowscodecs: Fix MIME types of DDS decoder.
|
||||
d3dx10/tests: Add tests for D3DX10GetImageInfoFromMemory().
|
||||
Ziqing Hui (10):
|
||||
windowscodecs: Get DDS parameters when initialize.
|
||||
windowscodecs: Implement DdsDecoder_Dds_GetFrame().
|
||||
windowscodecs: Implement DdsFrameDecode_GetSize().
|
||||
windowscodecs: Check NULL parameters for DdsFrameDecode_GetSize().
|
||||
windowscodecs/tests: Add tests for DdsFrameDecode_Dds_GetFormatInfo().
|
||||
windowscodecs: Implement DdsFrameDecode_Dds_GetFormatInfo().
|
||||
windowscodecs/tests: Add tests for DdsFrameDecode_Dds_GetSizeInBlocks().
|
||||
windowscodecs: Implement DdsFrameDecode_Dds_GetSizeInBlocks().
|
||||
windowscodecs: Add tests for DdsFrameDecode_Dds_CopyBlocks().
|
||||
windowscodecs/tests: Add more tests for DdsFrameDecode_Dds_CopyBlocks().
|
||||
|
||||
--
|
||||
Alexandre Julliard
|
||||
|
|
1
AUTHORS
1
AUTHORS
|
@ -1338,7 +1338,6 @@ Pim Bollen
|
|||
Piotr Caban
|
||||
Piotr Chruściel
|
||||
Piotr Pawłow
|
||||
Porot Mo
|
||||
Przemysław Białek
|
||||
Przemyslaw Bruski
|
||||
Qian Hong
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for Wine 5.11.
|
||||
# Generated by GNU Autoconf 2.69 for Wine 5.10.
|
||||
#
|
||||
# Report bugs to <wine-devel@winehq.org>.
|
||||
#
|
||||
|
@ -580,8 +580,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='Wine'
|
||||
PACKAGE_TARNAME='wine'
|
||||
PACKAGE_VERSION='5.11'
|
||||
PACKAGE_STRING='Wine 5.11'
|
||||
PACKAGE_VERSION='5.10'
|
||||
PACKAGE_STRING='Wine 5.10'
|
||||
PACKAGE_BUGREPORT='wine-devel@winehq.org'
|
||||
PACKAGE_URL='https://www.winehq.org'
|
||||
|
||||
|
@ -2467,7 +2467,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures Wine 5.11 to adapt to many kinds of systems.
|
||||
\`configure' configures Wine 5.10 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
@ -2537,7 +2537,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of Wine 5.11:";;
|
||||
short | recursive ) echo "Configuration of Wine 5.10:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
@ -2787,7 +2787,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
Wine configure 5.11
|
||||
Wine configure 5.10
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
@ -3471,7 +3471,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by Wine $as_me 5.11, which was
|
||||
It was created by Wine $as_me 5.10, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
@ -20683,7 +20683,6 @@ wine_fn_config_makefile dlls/dxgi enable_dxgi
|
|||
wine_fn_config_makefile dlls/dxgi/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dxguid enable_dxguid
|
||||
wine_fn_config_makefile dlls/dxva2 enable_dxva2
|
||||
wine_fn_config_makefile dlls/dxva2/tests enable_tests
|
||||
wine_fn_config_makefile dlls/esent enable_esent
|
||||
wine_fn_config_makefile dlls/evr enable_evr
|
||||
wine_fn_config_makefile dlls/evr/tests enable_tests
|
||||
|
@ -22062,7 +22061,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by Wine $as_me 5.11, which was
|
||||
This file was extended by Wine $as_me 5.10, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
@ -22133,7 +22132,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
Wine config.status 5.11
|
||||
Wine config.status 5.10
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
@ -3269,7 +3269,6 @@ WINE_CONFIG_MAKEFILE(dlls/dxgi)
|
|||
WINE_CONFIG_MAKEFILE(dlls/dxgi/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dxguid)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dxva2)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dxva2/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/esent)
|
||||
WINE_CONFIG_MAKEFILE(dlls/evr)
|
||||
WINE_CONFIG_MAKEFILE(dlls/evr/tests)
|
||||
|
|
|
@ -34,7 +34,6 @@ struct queued_receive
|
|||
DWORD length;
|
||||
BYTE *pointer;
|
||||
DWORD position;
|
||||
STREAM_TIME start_time;
|
||||
};
|
||||
|
||||
struct audio_stream
|
||||
|
@ -56,7 +55,6 @@ struct audio_stream
|
|||
AM_MEDIA_TYPE mt;
|
||||
WAVEFORMATEX format;
|
||||
FILTER_STATE state;
|
||||
REFERENCE_TIME segment_start;
|
||||
BOOL eos;
|
||||
BOOL flushing;
|
||||
struct list receive_queue;
|
||||
|
@ -68,8 +66,6 @@ typedef struct {
|
|||
LONG ref;
|
||||
struct audio_stream *parent;
|
||||
IAudioData *audio_data;
|
||||
STREAM_TIME start_time;
|
||||
STREAM_TIME end_time;
|
||||
HANDLE update_event;
|
||||
|
||||
struct list entry;
|
||||
|
@ -106,12 +102,6 @@ static void flush_receive_queue(struct audio_stream *stream)
|
|||
remove_queued_receive(LIST_ENTRY(entry, struct queued_receive, entry));
|
||||
}
|
||||
|
||||
static STREAM_TIME stream_time_from_position(struct audio_stream *stream, struct queued_receive *receive)
|
||||
{
|
||||
const WAVEFORMATEX *format = (WAVEFORMATEX *)stream->mt.pbFormat;
|
||||
return receive->start_time + (receive->position * 10000000 + format->nAvgBytesPerSec / 2) / format->nAvgBytesPerSec;
|
||||
}
|
||||
|
||||
static void process_update(IAudioStreamSampleImpl *sample, struct queued_receive *receive)
|
||||
{
|
||||
DWORD advance;
|
||||
|
@ -119,14 +109,9 @@ static void process_update(IAudioStreamSampleImpl *sample, struct queued_receive
|
|||
advance = min(receive->length - receive->position, sample->length - sample->position);
|
||||
memcpy(&sample->pointer[sample->position], &receive->pointer[receive->position], advance);
|
||||
|
||||
if (!sample->position)
|
||||
sample->start_time = stream_time_from_position(sample->parent, receive);
|
||||
|
||||
receive->position += advance;
|
||||
sample->position += advance;
|
||||
|
||||
sample->end_time = stream_time_from_position(sample->parent, receive);
|
||||
|
||||
sample->update_hr = (sample->position == sample->length) ? S_OK : MS_S_PENDING;
|
||||
}
|
||||
|
||||
|
@ -219,19 +204,9 @@ static HRESULT WINAPI IAudioStreamSampleImpl_GetMediaStream(IAudioStreamSample *
|
|||
static HRESULT WINAPI IAudioStreamSampleImpl_GetSampleTimes(IAudioStreamSample *iface, STREAM_TIME *start_time,
|
||||
STREAM_TIME *end_time, STREAM_TIME *current_time)
|
||||
{
|
||||
IAudioStreamSampleImpl *sample = impl_from_IAudioStreamSample(iface);
|
||||
FIXME("(%p)->(%p,%p,%p): stub\n", iface, start_time, end_time, current_time);
|
||||
|
||||
TRACE("sample %p, start_time %p, end_time %p, current_time %p.\n", sample, start_time, end_time, current_time);
|
||||
|
||||
if (current_time)
|
||||
IMediaStreamFilter_GetCurrentStreamTime(sample->parent->filter, current_time);
|
||||
|
||||
if (start_time)
|
||||
*start_time = sample->start_time;
|
||||
if (end_time)
|
||||
*end_time = sample->end_time;
|
||||
|
||||
return S_OK;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IAudioStreamSampleImpl_SetSampleTimes(IAudioStreamSample *iface, const STREAM_TIME *start_time,
|
||||
|
@ -1159,18 +1134,9 @@ static HRESULT WINAPI audio_sink_EndFlush(IPin *iface)
|
|||
|
||||
static HRESULT WINAPI audio_sink_NewSegment(IPin *iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
|
||||
{
|
||||
struct audio_stream *stream = impl_from_IPin(iface);
|
||||
|
||||
TRACE("stream %p, start %s, stop %s, rate %0.16e\n",
|
||||
stream, wine_dbgstr_longlong(start), wine_dbgstr_longlong(stop), rate);
|
||||
|
||||
EnterCriticalSection(&stream->cs);
|
||||
|
||||
stream->segment_start = start;
|
||||
|
||||
LeaveCriticalSection(&stream->cs);
|
||||
|
||||
return S_OK;
|
||||
FIXME("iface %p, start %s, stop %s, rate %0.16e, stub!\n",
|
||||
iface, wine_dbgstr_longlong(start), wine_dbgstr_longlong(stop), rate);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IPinVtbl audio_sink_vtbl =
|
||||
|
@ -1262,8 +1228,6 @@ static HRESULT WINAPI audio_meminput_Receive(IMemInputPin *iface, IMediaSample *
|
|||
{
|
||||
struct audio_stream *stream = impl_from_IMemInputPin(iface);
|
||||
struct queued_receive *receive;
|
||||
REFERENCE_TIME start_time = 0;
|
||||
REFERENCE_TIME end_time = 0;
|
||||
BYTE *pointer;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -1289,8 +1253,6 @@ static HRESULT WINAPI audio_meminput_Receive(IMemInputPin *iface, IMediaSample *
|
|||
return hr;
|
||||
}
|
||||
|
||||
IMediaSample_GetTime(sample, &start_time, &end_time);
|
||||
|
||||
receive = calloc(1, sizeof(*receive));
|
||||
if (!receive)
|
||||
{
|
||||
|
@ -1301,7 +1263,6 @@ static HRESULT WINAPI audio_meminput_Receive(IMemInputPin *iface, IMediaSample *
|
|||
receive->length = IMediaSample_GetActualDataLength(sample);
|
||||
receive->pointer = pointer;
|
||||
receive->sample = sample;
|
||||
receive->start_time = start_time + stream->segment_start;
|
||||
IMediaSample_AddRef(receive->sample);
|
||||
list_add_tail(&stream->receive_queue, &receive->entry);
|
||||
|
||||
|
|
|
@ -377,9 +377,6 @@ static HRESULT WINAPI ddraw_IDirectDrawMediaStream_GetDirectDraw(IDirectDrawMedi
|
|||
|
||||
TRACE("(%p)->(%p)\n", iface, ddraw);
|
||||
|
||||
if (!ddraw)
|
||||
return E_POINTER;
|
||||
|
||||
*ddraw = NULL;
|
||||
if (!This->ddraw)
|
||||
{
|
||||
|
@ -955,22 +952,21 @@ HRESULT ddraw_stream_create(IUnknown *outer, void **out)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
struct ddraw_sample
|
||||
{
|
||||
typedef struct {
|
||||
IDirectDrawStreamSample IDirectDrawStreamSample_iface;
|
||||
LONG ref;
|
||||
IMediaStream *parent;
|
||||
IDirectDrawSurface *surface;
|
||||
RECT rect;
|
||||
};
|
||||
} IDirectDrawStreamSampleImpl;
|
||||
|
||||
static inline struct ddraw_sample *impl_from_IDirectDrawStreamSample(IDirectDrawStreamSample *iface)
|
||||
static inline IDirectDrawStreamSampleImpl *impl_from_IDirectDrawStreamSample(IDirectDrawStreamSample *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct ddraw_sample, IDirectDrawStreamSample_iface);
|
||||
return CONTAINING_RECORD(iface, IDirectDrawStreamSampleImpl, IDirectDrawStreamSample_iface);
|
||||
}
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI ddraw_sample_QueryInterface(IDirectDrawStreamSample *iface,
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_QueryInterface(IDirectDrawStreamSample *iface,
|
||||
REFIID riid, void **ret_iface)
|
||||
{
|
||||
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface);
|
||||
|
@ -990,43 +986,43 @@ static HRESULT WINAPI ddraw_sample_QueryInterface(IDirectDrawStreamSample *iface
|
|||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ddraw_sample_AddRef(IDirectDrawStreamSample *iface)
|
||||
static ULONG WINAPI IDirectDrawStreamSampleImpl_AddRef(IDirectDrawStreamSample *iface)
|
||||
{
|
||||
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
|
||||
ULONG ref = InterlockedIncrement(&sample->ref);
|
||||
IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface);
|
||||
ULONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p)->(): new ref = %u\n", iface, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ddraw_sample_Release(IDirectDrawStreamSample *iface)
|
||||
static ULONG WINAPI IDirectDrawStreamSampleImpl_Release(IDirectDrawStreamSample *iface)
|
||||
{
|
||||
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
|
||||
ULONG ref = InterlockedDecrement(&sample->ref);
|
||||
IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface);
|
||||
ULONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p)->(): new ref = %u\n", iface, ref);
|
||||
|
||||
if (!ref)
|
||||
{
|
||||
if (sample->surface)
|
||||
IDirectDrawSurface_Release(sample->surface);
|
||||
IMediaStream_Release(sample->parent);
|
||||
HeapFree(GetProcessHeap(), 0, sample);
|
||||
if (This->surface)
|
||||
IDirectDrawSurface_Release(This->surface);
|
||||
IMediaStream_Release(This->parent);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
/*** IStreamSample methods ***/
|
||||
static HRESULT WINAPI ddraw_sample_GetMediaStream(IDirectDrawStreamSample *iface, IMediaStream **media_stream)
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetMediaStream(IDirectDrawStreamSample *iface, IMediaStream **media_stream)
|
||||
{
|
||||
FIXME("(%p)->(%p): stub\n", iface, media_stream);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ddraw_sample_GetSampleTimes(IDirectDrawStreamSample *iface, STREAM_TIME *start_time,
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSampleTimes(IDirectDrawStreamSample *iface, STREAM_TIME *start_time,
|
||||
STREAM_TIME *end_time, STREAM_TIME *current_time)
|
||||
{
|
||||
FIXME("(%p)->(%p,%p,%p): stub\n", iface, start_time, end_time, current_time);
|
||||
|
@ -1034,7 +1030,7 @@ static HRESULT WINAPI ddraw_sample_GetSampleTimes(IDirectDrawStreamSample *iface
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ddraw_sample_SetSampleTimes(IDirectDrawStreamSample *iface, const STREAM_TIME *start_time,
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetSampleTimes(IDirectDrawStreamSample *iface, const STREAM_TIME *start_time,
|
||||
const STREAM_TIME *end_time)
|
||||
{
|
||||
FIXME("(%p)->(%p,%p): stub\n", iface, start_time, end_time);
|
||||
|
@ -1042,7 +1038,7 @@ static HRESULT WINAPI ddraw_sample_SetSampleTimes(IDirectDrawStreamSample *iface
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ddraw_sample_Update(IDirectDrawStreamSample *iface, DWORD flags, HANDLE event,
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_Update(IDirectDrawStreamSample *iface, DWORD flags, HANDLE event,
|
||||
PAPCFUNC func_APC, DWORD APC_data)
|
||||
{
|
||||
FIXME("(%p)->(%x,%p,%p,%u): stub\n", iface, flags, event, func_APC, APC_data);
|
||||
|
@ -1050,7 +1046,7 @@ static HRESULT WINAPI ddraw_sample_Update(IDirectDrawStreamSample *iface, DWORD
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ddraw_sample_CompletionStatus(IDirectDrawStreamSample *iface, DWORD flags, DWORD milliseconds)
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_CompletionStatus(IDirectDrawStreamSample *iface, DWORD flags, DWORD milliseconds)
|
||||
{
|
||||
FIXME("(%p)->(%x,%u): stub\n", iface, flags, milliseconds);
|
||||
|
||||
|
@ -1058,27 +1054,27 @@ static HRESULT WINAPI ddraw_sample_CompletionStatus(IDirectDrawStreamSample *ifa
|
|||
}
|
||||
|
||||
/*** IDirectDrawStreamSample methods ***/
|
||||
static HRESULT WINAPI ddraw_sample_GetSurface(IDirectDrawStreamSample *iface, IDirectDrawSurface **ddraw_surface,
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSurface(IDirectDrawStreamSample *iface, IDirectDrawSurface **ddraw_surface,
|
||||
RECT *rect)
|
||||
{
|
||||
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
|
||||
IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface);
|
||||
|
||||
TRACE("(%p)->(%p,%p)\n", iface, ddraw_surface, rect);
|
||||
|
||||
if (ddraw_surface)
|
||||
{
|
||||
*ddraw_surface = sample->surface;
|
||||
*ddraw_surface = This->surface;
|
||||
if (*ddraw_surface)
|
||||
IDirectDrawSurface_AddRef(*ddraw_surface);
|
||||
}
|
||||
|
||||
if (rect)
|
||||
*rect = sample->rect;
|
||||
*rect = This->rect;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ddraw_sample_SetRect(IDirectDrawStreamSample *iface, const RECT *rect)
|
||||
static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetRect(IDirectDrawStreamSample *iface, const RECT *rect)
|
||||
{
|
||||
FIXME("(%p)->(%p): stub\n", iface, rect);
|
||||
|
||||
|
@ -1088,24 +1084,24 @@ static HRESULT WINAPI ddraw_sample_SetRect(IDirectDrawStreamSample *iface, const
|
|||
static const struct IDirectDrawStreamSampleVtbl DirectDrawStreamSample_Vtbl =
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
ddraw_sample_QueryInterface,
|
||||
ddraw_sample_AddRef,
|
||||
ddraw_sample_Release,
|
||||
IDirectDrawStreamSampleImpl_QueryInterface,
|
||||
IDirectDrawStreamSampleImpl_AddRef,
|
||||
IDirectDrawStreamSampleImpl_Release,
|
||||
/*** IStreamSample methods ***/
|
||||
ddraw_sample_GetMediaStream,
|
||||
ddraw_sample_GetSampleTimes,
|
||||
ddraw_sample_SetSampleTimes,
|
||||
ddraw_sample_Update,
|
||||
ddraw_sample_CompletionStatus,
|
||||
IDirectDrawStreamSampleImpl_GetMediaStream,
|
||||
IDirectDrawStreamSampleImpl_GetSampleTimes,
|
||||
IDirectDrawStreamSampleImpl_SetSampleTimes,
|
||||
IDirectDrawStreamSampleImpl_Update,
|
||||
IDirectDrawStreamSampleImpl_CompletionStatus,
|
||||
/*** IDirectDrawStreamSample methods ***/
|
||||
ddraw_sample_GetSurface,
|
||||
ddraw_sample_SetRect
|
||||
IDirectDrawStreamSampleImpl_GetSurface,
|
||||
IDirectDrawStreamSampleImpl_SetRect
|
||||
};
|
||||
|
||||
static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawSurface *surface,
|
||||
const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample)
|
||||
{
|
||||
struct ddraw_sample *object;
|
||||
IDirectDrawStreamSampleImpl *object;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)\n", ddraw_stream_sample);
|
||||
|
|
|
@ -2006,44 +2006,44 @@ static void test_media_types(void)
|
|||
|
||||
static void test_IDirectDrawStreamSample(void)
|
||||
{
|
||||
IDirectDrawMediaStream *ddraw_stream = NULL;
|
||||
IDirectDrawStreamSample *sample = NULL;
|
||||
IDirectDrawSurface *surface, *surface2;
|
||||
IMediaStream *stream2, *stream = NULL;
|
||||
DDSURFACEDESC desc = { sizeof(desc) };
|
||||
IAMMultiMediaStream *mmstream;
|
||||
IAMMultiMediaStream *pams;
|
||||
HRESULT hr;
|
||||
IMediaStream *pvidstream = NULL;
|
||||
IDirectDrawMediaStream *pddstream = NULL;
|
||||
IDirectDrawStreamSample *pddsample = NULL;
|
||||
IDirectDrawSurface7 *surface7;
|
||||
IDirectDrawSurface *surface, *surface2;
|
||||
IDirectDraw *ddraw, *ddraw2;
|
||||
IDirectDraw7 *ddraw7;
|
||||
HRESULT hr;
|
||||
RECT rect;
|
||||
|
||||
if (!(mmstream = create_ammultimediastream()))
|
||||
if (!(pams = create_ammultimediastream()))
|
||||
return;
|
||||
if (!create_directdraw())
|
||||
{
|
||||
IAMMultiMediaStream_Release(mmstream);
|
||||
IAMMultiMediaStream_Release(pams);
|
||||
return;
|
||||
}
|
||||
|
||||
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL);
|
||||
hr = IAMMultiMediaStream_Initialize(pams, STREAMTYPE_READ, 0, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IAMMultiMediaStream_AddMediaStream(mmstream, (IUnknown*)pdd7, &MSPID_PrimaryVideo, 0, NULL);
|
||||
hr = IAMMultiMediaStream_AddMediaStream(pams, (IUnknown*)pdd7, &MSPID_PrimaryVideo, 0, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IAMMultiMediaStream_GetMediaStream(mmstream, &MSPID_PrimaryVideo, &stream);
|
||||
hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryVideo, &pvidstream);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
if (FAILED(hr)) goto error;
|
||||
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IDirectDrawMediaStream, (LPVOID*)&ddraw_stream);
|
||||
hr = IMediaStream_QueryInterface(pvidstream, &IID_IDirectDrawMediaStream, (LPVOID*)&pddstream);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
if (FAILED(hr)) goto error;
|
||||
|
||||
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw);
|
||||
hr = IDirectDrawMediaStream_GetDirectDraw(pddstream, &ddraw);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IDirectDrawMediaStream_GetDirectDraw(ddraw_stream, &ddraw2);
|
||||
hr = IDirectDrawMediaStream_GetDirectDraw(pddstream, &ddraw2);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(ddraw == ddraw2, "got %p, %p\n", ddraw, ddraw2);
|
||||
|
||||
|
@ -2055,26 +2055,14 @@ static void test_IDirectDrawStreamSample(void)
|
|||
IDirectDraw_Release(ddraw2);
|
||||
IDirectDraw_Release(ddraw);
|
||||
|
||||
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample);
|
||||
hr = IDirectDrawMediaStream_CreateSample(pddstream, NULL, NULL, 0, &pddsample);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
surface = NULL;
|
||||
hr = IDirectDrawStreamSample_GetSurface(sample, &surface, &rect);
|
||||
hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface, &rect);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(surface != NULL, "got %p\n", surface);
|
||||
|
||||
/* Crashes on native. */
|
||||
if (0)
|
||||
{
|
||||
hr = IDirectDrawStreamSample_GetMediaStream(sample, NULL);
|
||||
ok(hr == E_POINTER, "got 0x%08x\n", hr);
|
||||
}
|
||||
|
||||
hr = IDirectDrawStreamSample_GetMediaStream(sample, &stream2);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
todo_wine ok(stream2 == stream, "Expected stream %p, got %p.\n", stream, stream2);
|
||||
if (hr == S_OK) IMediaStream_Release(stream2);
|
||||
|
||||
hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (void **)&surface7);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
IDirectDrawSurface7_Release(surface7);
|
||||
|
@ -2086,39 +2074,39 @@ static void test_IDirectDrawStreamSample(void)
|
|||
ok(desc.ddpfPixelFormat.dwFlags == DDPF_RGB, "format flags %08x\n", desc.ddpfPixelFormat.dwFlags);
|
||||
ok(desc.ddpfPixelFormat.dwRGBBitCount, "dwRGBBitCount %d\n", desc.ddpfPixelFormat.dwRGBBitCount);
|
||||
IDirectDrawSurface_Release(surface);
|
||||
IDirectDrawStreamSample_Release(sample);
|
||||
IDirectDrawStreamSample_Release(pddsample);
|
||||
|
||||
hr = IDirectDrawSurface7_QueryInterface(pdds7, &IID_IDirectDrawSurface, (void **)&surface);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
EXPECT_REF(surface, 1);
|
||||
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, surface, NULL, 0, &sample);
|
||||
hr = IDirectDrawMediaStream_CreateSample(pddstream, surface, NULL, 0, &pddsample);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
EXPECT_REF(surface, 2);
|
||||
|
||||
surface2 = NULL;
|
||||
SetRectEmpty(&rect);
|
||||
hr = IDirectDrawStreamSample_GetSurface(sample, &surface2, &rect);
|
||||
hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface2, &rect);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(surface == surface2, "got %p\n", surface2);
|
||||
ok(rect.right > 0 && rect.bottom > 0, "got %d, %d\n", rect.right, rect.bottom);
|
||||
EXPECT_REF(surface, 3);
|
||||
IDirectDrawSurface_Release(surface2);
|
||||
|
||||
hr = IDirectDrawStreamSample_GetSurface(sample, NULL, NULL);
|
||||
hr = IDirectDrawStreamSample_GetSurface(pddsample, NULL, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
IDirectDrawStreamSample_Release(sample);
|
||||
IDirectDrawStreamSample_Release(pddsample);
|
||||
IDirectDrawSurface_Release(surface);
|
||||
|
||||
error:
|
||||
if (ddraw_stream)
|
||||
IDirectDrawMediaStream_Release(ddraw_stream);
|
||||
if (stream)
|
||||
IMediaStream_Release(stream);
|
||||
if (pddstream)
|
||||
IDirectDrawMediaStream_Release(pddstream);
|
||||
if (pvidstream)
|
||||
IMediaStream_Release(pvidstream);
|
||||
|
||||
release_directdraw();
|
||||
IAMMultiMediaStream_Release(mmstream);
|
||||
IAMMultiMediaStream_Release(pams);
|
||||
}
|
||||
|
||||
static IUnknown *create_audio_data(void)
|
||||
|
@ -3440,6 +3428,10 @@ static void test_audiostream_begin_flush_end_flush(void)
|
|||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
}
|
||||
|
||||
static void CALLBACK apc_func(ULONG_PTR param)
|
||||
{
|
||||
}
|
||||
|
||||
static IMediaSample *audiostream_allocate_sample(struct testfilter *source, const BYTE *input_data, DWORD input_length)
|
||||
{
|
||||
IMediaSample *sample;
|
||||
|
@ -3460,120 +3452,6 @@ static IMediaSample *audiostream_allocate_sample(struct testfilter *source, cons
|
|||
return sample;
|
||||
}
|
||||
|
||||
static void test_audiostream_new_segment(void)
|
||||
{
|
||||
IAMMultiMediaStream *mmstream = create_ammultimediastream();
|
||||
static const BYTE test_data[8] = { 0 };
|
||||
IAudioStreamSample *stream_sample;
|
||||
IAudioMediaStream *audio_stream;
|
||||
IMemInputPin *mem_input_pin;
|
||||
IMediaSample *media_sample;
|
||||
struct testfilter source;
|
||||
IAudioData *audio_data;
|
||||
STREAM_TIME start_time;
|
||||
STREAM_TIME end_time;
|
||||
IGraphBuilder *graph;
|
||||
IMediaStream *stream;
|
||||
HRESULT hr;
|
||||
ULONG ref;
|
||||
IPin *pin;
|
||||
|
||||
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(graph != NULL, "Expected non-NULL graph.\n");
|
||||
testfilter_init(&source);
|
||||
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &stream_sample);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAudioData_SetBuffer(audio_data, 5, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IPin_NewSegment(pin, 11111111, 22222222, 1.0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
media_sample = audiostream_allocate_sample(&source, test_data, 5);
|
||||
start_time = 12345678;
|
||||
end_time = 23456789;
|
||||
hr = IMediaSample_SetTime(media_sample, &start_time, &end_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMemInputPin_Receive(mem_input_pin, media_sample);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
IMediaSample_Release(media_sample);
|
||||
|
||||
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
start_time = 0xdeadbeefdeadbeef;
|
||||
end_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(start_time == 23456789, "Got start time %s.\n", wine_dbgstr_longlong(start_time));
|
||||
ok(end_time == 23459057, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
|
||||
|
||||
hr = IPin_NewSegment(pin, 11111111, 22222222, 2.0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
media_sample = audiostream_allocate_sample(&source, test_data, 5);
|
||||
start_time = 12345678;
|
||||
end_time = 23456789;
|
||||
hr = IMediaSample_SetTime(media_sample, &start_time, &end_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMemInputPin_Receive(mem_input_pin, media_sample);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
IMediaSample_Release(media_sample);
|
||||
|
||||
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
start_time = 0xdeadbeefdeadbeef;
|
||||
end_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(start_time == 23456789, "Got start time %s.\n", wine_dbgstr_longlong(start_time));
|
||||
ok(end_time == 23459057, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
|
||||
|
||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
IGraphBuilder_Disconnect(graph, pin);
|
||||
IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
|
||||
|
||||
ref = IAudioStreamSample_Release(stream_sample);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IAudioData_Release(audio_data);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IAMMultiMediaStream_Release(mmstream);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IGraphBuilder_Release(graph);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
IPin_Release(pin);
|
||||
IMemInputPin_Release(mem_input_pin);
|
||||
IAudioMediaStream_Release(audio_stream);
|
||||
ref = IMediaStream_Release(stream);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
}
|
||||
|
||||
static void CALLBACK apc_func(ULONG_PTR param)
|
||||
{
|
||||
}
|
||||
|
||||
static IPin *audiostream_pin;
|
||||
static IMemInputPin *audiostream_mem_input_pin;
|
||||
static IMediaSample *audiostream_media_sample;
|
||||
|
@ -3973,186 +3851,6 @@ void test_audiostreamsample_completion_status(void)
|
|||
CloseHandle(event);
|
||||
}
|
||||
|
||||
static void test_audiostreamsample_get_sample_times(void)
|
||||
{
|
||||
IAMMultiMediaStream *mmstream = create_ammultimediastream();
|
||||
static const BYTE test_data[8] = { 0 };
|
||||
IAudioStreamSample *stream_sample;
|
||||
IMediaFilter *graph_media_filter;
|
||||
IAudioMediaStream *audio_stream;
|
||||
STREAM_TIME filter_start_time;
|
||||
IMemInputPin *mem_input_pin;
|
||||
IMediaStreamFilter *filter;
|
||||
IMediaSample *media_sample;
|
||||
struct testfilter source;
|
||||
STREAM_TIME current_time;
|
||||
struct testclock clock;
|
||||
IAudioData *audio_data;
|
||||
STREAM_TIME start_time;
|
||||
STREAM_TIME end_time;
|
||||
IGraphBuilder *graph;
|
||||
IMediaStream *stream;
|
||||
HRESULT hr;
|
||||
ULONG ref;
|
||||
IPin *pin;
|
||||
|
||||
hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(!!filter, "Expected non-null filter.\n");
|
||||
hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IAudioMediaStream, (void **)&audio_stream);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMediaStream_QueryInterface(stream, &IID_IMemInputPin, (void **)&mem_input_pin);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(graph != NULL, "Expected non-NULL graph.\n");
|
||||
hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&graph_media_filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
testfilter_init(&source);
|
||||
hr = IGraphBuilder_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAudioMediaStream_CreateSample(audio_stream, audio_data, 0, &stream_sample);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAudioData_SetBuffer(audio_data, 5, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
testclock_init(&clock);
|
||||
|
||||
clock.time = 12345678;
|
||||
|
||||
current_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(current_time == 0, "Got current time %s.\n", wine_dbgstr_longlong(current_time));
|
||||
|
||||
IMediaFilter_SetSyncSource(graph_media_filter, &clock.IReferenceClock_iface);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
current_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(current_time == 0, "Got current time %s.\n", wine_dbgstr_longlong(current_time));
|
||||
|
||||
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &audio_mt);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IMediaStreamFilter_GetCurrentStreamTime(filter, &filter_start_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
clock.get_time_hr = E_FAIL;
|
||||
|
||||
current_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(current_time == 0xdeadbeefddf15da1 + filter_start_time, "Expected current time %s, got %s.\n",
|
||||
wine_dbgstr_longlong(0xdeadbeefddf15da1 + filter_start_time), wine_dbgstr_longlong(current_time));
|
||||
|
||||
clock.get_time_hr = S_OK;
|
||||
|
||||
current_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(current_time == filter_start_time, "Expected current time %s, got %s.\n",
|
||||
wine_dbgstr_longlong(filter_start_time), wine_dbgstr_longlong(current_time));
|
||||
|
||||
clock.time = 23456789;
|
||||
|
||||
current_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, NULL, NULL, ¤t_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(current_time == filter_start_time + 11111111, "Expected current time %s, got %s.\n",
|
||||
wine_dbgstr_longlong(filter_start_time + 11111111), wine_dbgstr_longlong(current_time));
|
||||
|
||||
start_time = 0xdeadbeefdeadbeef;
|
||||
end_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(start_time == 0, "Got start time %s.\n", wine_dbgstr_longlong(start_time));
|
||||
ok(end_time == 0, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
|
||||
|
||||
media_sample = audiostream_allocate_sample(&source, test_data, 8);
|
||||
start_time = 12345678;
|
||||
end_time = 23456789;
|
||||
hr = IMediaSample_SetTime(media_sample, &start_time, &end_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMemInputPin_Receive(mem_input_pin, media_sample);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
IMediaSample_Release(media_sample);
|
||||
|
||||
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
start_time = 0xdeadbeefdeadbeef;
|
||||
end_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(start_time == 12345678, "Got start time %s.\n", wine_dbgstr_longlong(start_time));
|
||||
ok(end_time == 12347946, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
|
||||
|
||||
media_sample = audiostream_allocate_sample(&source, test_data, 6);
|
||||
start_time = 12345678;
|
||||
end_time = 23456789;
|
||||
hr = IMediaSample_SetTime(media_sample, &start_time, &end_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
hr = IMemInputPin_Receive(mem_input_pin, media_sample);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
IMediaSample_Release(media_sample);
|
||||
|
||||
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
start_time = 0xdeadbeefdeadbeef;
|
||||
end_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(start_time == 12347946, "Got start time %s.\n", wine_dbgstr_longlong(start_time));
|
||||
ok(end_time == 12346585, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
|
||||
|
||||
hr = IPin_EndOfStream(pin);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IAudioStreamSample_Update(stream_sample, 0, NULL, NULL, 0);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
start_time = 0xdeadbeefdeadbeef;
|
||||
end_time = 0xdeadbeefdeadbeef;
|
||||
hr = IAudioStreamSample_GetSampleTimes(stream_sample, &start_time, &end_time, NULL);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(start_time == 12346585, "Got start time %s.\n", wine_dbgstr_longlong(start_time));
|
||||
ok(end_time == 12348399, "Got end time %s.\n", wine_dbgstr_longlong(end_time));
|
||||
|
||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
IGraphBuilder_Disconnect(graph, pin);
|
||||
IGraphBuilder_Disconnect(graph, &source.source.pin.IPin_iface);
|
||||
|
||||
ref = IAudioStreamSample_Release(stream_sample);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IAudioData_Release(audio_data);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IAMMultiMediaStream_Release(mmstream);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
IMediaFilter_Release(graph_media_filter);
|
||||
ref = IGraphBuilder_Release(graph);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IMediaStreamFilter_Release(filter);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
IPin_Release(pin);
|
||||
IMemInputPin_Release(mem_input_pin);
|
||||
IAudioMediaStream_Release(audio_stream);
|
||||
ref = IMediaStream_Release(stream);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
}
|
||||
|
||||
static void test_ddrawstream_initialize(void)
|
||||
{
|
||||
IDirectDrawMediaStream *ddraw_stream;
|
||||
|
@ -4809,11 +4507,9 @@ START_TEST(amstream)
|
|||
test_audiostream_receive();
|
||||
test_audiostream_initialize();
|
||||
test_audiostream_begin_flush_end_flush();
|
||||
test_audiostream_new_segment();
|
||||
|
||||
test_audiostreamsample_update();
|
||||
test_audiostreamsample_completion_status();
|
||||
test_audiostreamsample_get_sample_times();
|
||||
|
||||
test_ddrawstream_initialize();
|
||||
|
||||
|
|
|
@ -2381,37 +2381,16 @@ static void test_BcryptDeriveKeyCapi(void)
|
|||
}
|
||||
|
||||
ret = pBCryptDeriveKeyCapi(NULL, NULL, NULL, 0, 0);
|
||||
ok(ret == STATUS_INVALID_PARAMETER || ret == STATUS_INVALID_HANDLE /* win7 */, "got %08x\n", ret);
|
||||
ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptDeriveKeyCapi(hash, NULL, NULL, 0, 0);
|
||||
ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptDestroyHash(hash);
|
||||
ok(!ret, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
|
||||
ok(!ret, "got %08x\n", ret);
|
||||
ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptDeriveKeyCapi(hash, NULL, key, 0, 0);
|
||||
ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %08x\n", ret);
|
||||
ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptDestroyHash(hash);
|
||||
ok(!ret, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
|
||||
ok(!ret, "got %08x\n", ret);
|
||||
|
||||
memset(key, 0, sizeof(key));
|
||||
ret = pBCryptDeriveKeyCapi(hash, NULL, key, 41, 0);
|
||||
ok(ret == STATUS_INVALID_PARAMETER || !ret /* win7 */, "got %08x\n", ret);
|
||||
if (!ret)
|
||||
ok(!memcmp(key, expect, sizeof(expect) - 1), "wrong key data\n");
|
||||
|
||||
ret = pBCryptDestroyHash(hash);
|
||||
ok(!ret, "got %08x\n", ret);
|
||||
|
||||
ret = pBCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0);
|
||||
ok(!ret, "got %08x\n", ret);
|
||||
ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
|
||||
|
||||
memset(key, 0, sizeof(key));
|
||||
ret = pBCryptDeriveKeyCapi(hash, NULL, key, 20, 0);
|
||||
|
|
|
@ -36,13 +36,3 @@ coclass DirectManipulationSharedManager
|
|||
interface IDirectManipulationManager2;
|
||||
[default] interface IDirectManipulationManager;
|
||||
}
|
||||
|
||||
[
|
||||
uuid(79dea627-a08a-43ac-8ef5-6900b9299126),
|
||||
threading(both)
|
||||
]
|
||||
coclass DCompManipulationCompositor
|
||||
{
|
||||
[default] interface IDirectManipulationCompositor;
|
||||
interface IDirectManipulationFrameInfoProvider;
|
||||
}
|
||||
|
|
|
@ -337,175 +337,6 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct directcompositor
|
||||
{
|
||||
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
|
||||
IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface;
|
||||
IDirectManipulationUpdateManager *manager;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
static inline struct directcompositor *impl_from_IDirectManipulationCompositor(IDirectManipulationCompositor *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface);
|
||||
}
|
||||
|
||||
static inline struct directcompositor *impl_from_IDirectManipulationFrameInfoProvider(IDirectManipulationFrameInfoProvider *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationFrameInfoProvider_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IDirectManipulationCompositor))
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
*ppv = iface;
|
||||
return S_OK;
|
||||
}
|
||||
else if(IsEqualGUID(riid, &IID_IDirectManipulationFrameInfoProvider))
|
||||
{
|
||||
IUnknown_AddRef(iface);
|
||||
*ppv = &This->IDirectManipulationFrameInfoProvider_iface;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI compositor_AddRef(IDirectManipulationCompositor *iface)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
ULONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI compositor_Release(IDirectManipulationCompositor *iface)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
ULONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n", This, ref);
|
||||
|
||||
if (!ref)
|
||||
{
|
||||
if(This->manager)
|
||||
IDirectManipulationUpdateManager_Release(This->manager);
|
||||
heap_free(This);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI compositor_AddContent(IDirectManipulationCompositor *iface, IDirectManipulationContent *content,
|
||||
IUnknown *device, IUnknown *parent, IUnknown *child)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
FIXME("%p, %p, %p, %p, %p\n", This, content, device, parent, child);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI compositor_RemoveContent(IDirectManipulationCompositor *iface, IDirectManipulationContent *content)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
FIXME("%p, %p\n", This, content);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI compositor_SetUpdateManager(IDirectManipulationCompositor *iface, IDirectManipulationUpdateManager *manager)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
TRACE("%p, %p\n", This, manager);
|
||||
|
||||
if(!manager)
|
||||
return E_INVALIDARG;
|
||||
|
||||
This->manager = manager;
|
||||
IDirectManipulationUpdateManager_AddRef(This->manager);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI compositor_Flush(IDirectManipulationCompositor *iface)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const struct IDirectManipulationCompositorVtbl compositorVtbl =
|
||||
{
|
||||
compositor_QueryInterface,
|
||||
compositor_AddRef,
|
||||
compositor_Release,
|
||||
compositor_AddContent,
|
||||
compositor_RemoveContent,
|
||||
compositor_SetUpdateManager,
|
||||
compositor_Flush
|
||||
};
|
||||
|
||||
static HRESULT WINAPI provider_QueryInterface(IDirectManipulationFrameInfoProvider *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
return IDirectManipulationCompositor_QueryInterface(&This->IDirectManipulationCompositor_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI provider_AddRef(IDirectManipulationFrameInfoProvider *iface)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
return IDirectManipulationCompositor_AddRef(&This->IDirectManipulationCompositor_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI provider_Release(IDirectManipulationFrameInfoProvider *iface)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
return IDirectManipulationCompositor_Release(&This->IDirectManipulationCompositor_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI provider_GetNextFrameInfo(IDirectManipulationFrameInfoProvider *iface, ULONGLONG *time,
|
||||
ULONGLONG *process, ULONGLONG *composition)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
FIXME("%p, %p, %p, %p\n", This, time, process, composition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const struct IDirectManipulationFrameInfoProviderVtbl providerVtbl =
|
||||
{
|
||||
provider_QueryInterface,
|
||||
provider_AddRef,
|
||||
provider_Release,
|
||||
provider_GetNextFrameInfo
|
||||
};
|
||||
|
||||
static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
struct directcompositor *object;
|
||||
HRESULT ret;
|
||||
|
||||
TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
if (!object)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl;
|
||||
object->IDirectManipulationFrameInfoProvider_iface.lpVtbl = &providerVtbl;
|
||||
object->ref = 1;
|
||||
|
||||
ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv);
|
||||
compositor_Release(&object->IDirectManipulationCompositor_iface);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
|
@ -549,16 +380,7 @@ static const IClassFactoryVtbl DirectFactoryVtbl = {
|
|||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static const IClassFactoryVtbl DirectCompositorVtbl = {
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
DirectCompositor_CreateInstance,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory direct_factory = { &DirectFactoryVtbl };
|
||||
static IClassFactory compositor_factory = { &DirectCompositorVtbl };
|
||||
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
|
@ -567,10 +389,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|||
TRACE("(CLSID_DirectManipulationManager %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&direct_factory, riid, ppv);
|
||||
}
|
||||
else if(IsEqualGUID(&CLSID_DCompManipulationCompositor, rclsid)) {
|
||||
TRACE("(CLSID_DCompManipulationCompositor %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&compositor_factory, riid, ppv);
|
||||
}
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
MODULE = dxva2.dll
|
||||
IMPORTS = uuid
|
||||
IMPORTLIB = dxva2
|
||||
MODULE = dxva2.dll
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
|
|
|
@ -16,421 +16,19 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "d3d9.h"
|
||||
#include "dxva2api.h"
|
||||
#include "physicalmonitorenumerationapi.h"
|
||||
#include "lowlevelmonitorconfigurationapi.h"
|
||||
#include "highlevelmonitorconfigurationapi.h"
|
||||
#include "initguid.h"
|
||||
#include "dxva2api.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(dxva2);
|
||||
|
||||
enum device_handle_flags
|
||||
{
|
||||
HANDLE_FLAG_OPEN = 0x1,
|
||||
HANDLE_FLAG_INVALID = 0x2,
|
||||
};
|
||||
|
||||
struct device_handle
|
||||
{
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
struct device_manager
|
||||
{
|
||||
IDirect3DDeviceManager9 IDirect3DDeviceManager9_iface;
|
||||
IDirectXVideoProcessorService IDirectXVideoProcessorService_iface;
|
||||
LONG refcount;
|
||||
|
||||
IDirect3DDevice9 *device;
|
||||
UINT token;
|
||||
|
||||
struct device_handle *handles;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
static BOOL dxva_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
|
||||
{
|
||||
size_t new_capacity, max_capacity;
|
||||
void *new_elements;
|
||||
|
||||
if (count <= *capacity)
|
||||
return TRUE;
|
||||
|
||||
max_capacity = ~(SIZE_T)0 / size;
|
||||
if (count > max_capacity)
|
||||
return FALSE;
|
||||
|
||||
new_capacity = max(4, *capacity);
|
||||
while (new_capacity < count && new_capacity <= max_capacity / 2)
|
||||
new_capacity *= 2;
|
||||
if (new_capacity < count)
|
||||
new_capacity = max_capacity;
|
||||
|
||||
if (!(new_elements = heap_realloc(*elements, new_capacity * size)))
|
||||
return FALSE;
|
||||
|
||||
*elements = new_elements;
|
||||
*capacity = new_capacity;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static struct device_manager *impl_from_IDirect3DDeviceManager9(IDirect3DDeviceManager9 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct device_manager, IDirect3DDeviceManager9_iface);
|
||||
}
|
||||
|
||||
static struct device_manager *impl_from_IDirectXVideoProcessorService(IDirectXVideoProcessorService *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct device_manager, IDirectXVideoProcessorService_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_QueryInterface(IDirectXVideoProcessorService *iface,
|
||||
REFIID riid, void **obj)
|
||||
{
|
||||
if (IsEqualIID(riid, &IID_IDirectXVideoProcessorService) ||
|
||||
IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
*obj = iface;
|
||||
IDirectXVideoProcessorService_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Unsupported interface %s.\n", debugstr_guid(riid));
|
||||
*obj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI device_manager_processor_service_AddRef(IDirectXVideoProcessorService *iface)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirectXVideoProcessorService(iface);
|
||||
return IDirect3DDeviceManager9_AddRef(&manager->IDirect3DDeviceManager9_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI device_manager_processor_service_Release(IDirectXVideoProcessorService *iface)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirectXVideoProcessorService(iface);
|
||||
return IDirect3DDeviceManager9_Release(&manager->IDirect3DDeviceManager9_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_CreateSurface(IDirectXVideoProcessorService *iface,
|
||||
UINT width, UINT height, UINT backbuffers, D3DFORMAT format, D3DPOOL pool, DWORD usage, DWORD dxvaType,
|
||||
IDirect3DSurface9 **surface, HANDLE *shared_handle)
|
||||
{
|
||||
FIXME("%p, %u, %u, %u, %u, %u, %u, %u, %p, %p.\n", iface, width, height, backbuffers, format, pool, usage, dxvaType,
|
||||
surface, shared_handle);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_RegisterVideoProcessorSoftwareDevice(
|
||||
IDirectXVideoProcessorService *iface, void *callbacks)
|
||||
{
|
||||
FIXME("%p, %p.\n", iface, callbacks);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorDeviceGuids(
|
||||
IDirectXVideoProcessorService *iface, const DXVA2_VideoDesc *video_desc, UINT *count, GUID **guids)
|
||||
{
|
||||
FIXME("%p, %p, %p, %p.\n", iface, video_desc, count, guids);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorRenderTargets(
|
||||
IDirectXVideoProcessorService *iface, REFGUID deviceguid, const DXVA2_VideoDesc *video_desc, UINT *count,
|
||||
D3DFORMAT **formats)
|
||||
{
|
||||
FIXME("%p, %s, %p, %p, %p.\n", iface, debugstr_guid(deviceguid), video_desc, count, formats);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorSubStreamFormats(
|
||||
IDirectXVideoProcessorService *iface, REFGUID deviceguid, const DXVA2_VideoDesc *video_desc,
|
||||
D3DFORMAT rt_format, UINT *count, D3DFORMAT **formats)
|
||||
{
|
||||
FIXME("%p, %s, %p, %u, %p, %p.\n", iface, debugstr_guid(deviceguid), video_desc, rt_format, count, formats);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorCaps(
|
||||
IDirectXVideoProcessorService *iface, REFGUID deviceguid, const DXVA2_VideoDesc *video_desc,
|
||||
D3DFORMAT rt_format, DXVA2_VideoProcessorCaps *caps)
|
||||
{
|
||||
FIXME("%p, %s, %p, %u, %p.\n", iface, debugstr_guid(deviceguid), video_desc, rt_format, caps);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_processor_service_GetProcAmpRange(
|
||||
IDirectXVideoProcessorService *iface, REFGUID deviceguid, const DXVA2_VideoDesc *video_desc,
|
||||
D3DFORMAT rt_format, UINT ProcAmpCap, DXVA2_ValueRange *range)
|
||||
{
|
||||
FIXME("%p, %s, %p, %u, %u, %p.\n", iface, debugstr_guid(deviceguid), video_desc, rt_format, ProcAmpCap, range);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IDirectXVideoProcessorServiceVtbl device_manager_processor_service_vtbl =
|
||||
{
|
||||
device_manager_processor_service_QueryInterface,
|
||||
device_manager_processor_service_AddRef,
|
||||
device_manager_processor_service_Release,
|
||||
device_manager_processor_service_CreateSurface,
|
||||
device_manager_processor_service_RegisterVideoProcessorSoftwareDevice,
|
||||
device_manager_processor_service_GetVideoProcessorDeviceGuids,
|
||||
device_manager_processor_service_GetVideoProcessorRenderTargets,
|
||||
device_manager_processor_service_GetVideoProcessorSubStreamFormats,
|
||||
device_manager_processor_service_GetVideoProcessorCaps,
|
||||
device_manager_processor_service_GetProcAmpRange,
|
||||
};
|
||||
|
||||
static HRESULT WINAPI device_manager_QueryInterface(IDirect3DDeviceManager9 *iface, REFIID riid, void **obj)
|
||||
{
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
|
||||
|
||||
if (IsEqualIID(&IID_IDirect3DDeviceManager9, riid) ||
|
||||
IsEqualIID(&IID_IUnknown, riid))
|
||||
{
|
||||
*obj = iface;
|
||||
IDirect3DDeviceManager9_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Unsupported interface %s.\n", debugstr_guid(riid));
|
||||
*obj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI device_manager_AddRef(IDirect3DDeviceManager9 *iface)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
ULONG refcount = InterlockedIncrement(&manager->refcount);
|
||||
|
||||
TRACE("%p, refcount %u.\n", iface, refcount);
|
||||
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static ULONG WINAPI device_manager_Release(IDirect3DDeviceManager9 *iface)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
ULONG refcount = InterlockedDecrement(&manager->refcount);
|
||||
|
||||
TRACE("%p, refcount %u.\n", iface, refcount);
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
if (manager->device)
|
||||
IDirect3DDevice9_Release(manager->device);
|
||||
DeleteCriticalSection(&manager->cs);
|
||||
heap_free(manager->handles);
|
||||
heap_free(manager);
|
||||
}
|
||||
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_ResetDevice(IDirect3DDeviceManager9 *iface, IDirect3DDevice9 *device,
|
||||
UINT token)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
size_t i;
|
||||
|
||||
TRACE("%p, %p, %#x.\n", iface, device, token);
|
||||
|
||||
if (token != manager->token)
|
||||
return E_INVALIDARG;
|
||||
|
||||
EnterCriticalSection(&manager->cs);
|
||||
if (manager->device)
|
||||
{
|
||||
for (i = 0; i < manager->count; ++i)
|
||||
manager->handles[i].flags |= HANDLE_FLAG_INVALID;
|
||||
IDirect3DDevice9_Release(manager->device);
|
||||
}
|
||||
manager->device = device;
|
||||
IDirect3DDevice9_AddRef(manager->device);
|
||||
LeaveCriticalSection(&manager->cs);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_OpenDeviceHandle(IDirect3DDeviceManager9 *iface, HANDLE *hdevice)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
HRESULT hr = S_OK;
|
||||
size_t i;
|
||||
|
||||
TRACE("%p, %p.\n", iface, hdevice);
|
||||
|
||||
*hdevice = NULL;
|
||||
|
||||
EnterCriticalSection(&manager->cs);
|
||||
if (!manager->device)
|
||||
hr = DXVA2_E_NOT_INITIALIZED;
|
||||
else
|
||||
{
|
||||
for (i = 0; i < manager->count; ++i)
|
||||
{
|
||||
if (!(manager->handles[i].flags & HANDLE_FLAG_OPEN))
|
||||
{
|
||||
manager->handles[i].flags |= HANDLE_FLAG_OPEN;
|
||||
*hdevice = ULongToHandle(i + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dxva_array_reserve((void **)&manager->handles, &manager->capacity, manager->count + 1,
|
||||
sizeof(*manager->handles)))
|
||||
{
|
||||
*hdevice = ULongToHandle(manager->count + 1);
|
||||
manager->handles[manager->count].flags |= HANDLE_FLAG_OPEN;
|
||||
manager->count++;
|
||||
}
|
||||
else
|
||||
hr = E_OUTOFMEMORY;
|
||||
}
|
||||
LeaveCriticalSection(&manager->cs);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT device_manager_get_handle_index(struct device_manager *manager, HANDLE hdevice, size_t *idx)
|
||||
{
|
||||
if (hdevice > ULongToHandle(manager->count))
|
||||
return E_HANDLE;
|
||||
*idx = (ULONG_PTR)hdevice - 1;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_CloseDeviceHandle(IDirect3DDeviceManager9 *iface, HANDLE hdevice)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
HRESULT hr;
|
||||
size_t idx;
|
||||
|
||||
TRACE("%p, %p.\n", iface, hdevice);
|
||||
|
||||
EnterCriticalSection(&manager->cs);
|
||||
if (SUCCEEDED(hr = device_manager_get_handle_index(manager, hdevice, &idx)))
|
||||
{
|
||||
if (manager->handles[idx].flags & HANDLE_FLAG_OPEN)
|
||||
{
|
||||
manager->handles[idx].flags = 0;
|
||||
if (idx == manager->count - 1)
|
||||
manager->count--;
|
||||
}
|
||||
else
|
||||
hr = E_HANDLE;
|
||||
}
|
||||
LeaveCriticalSection(&manager->cs);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_TestDevice(IDirect3DDeviceManager9 *iface, HANDLE hdevice)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
HRESULT hr;
|
||||
size_t idx;
|
||||
|
||||
TRACE("%p, %p.\n", iface, hdevice);
|
||||
|
||||
EnterCriticalSection(&manager->cs);
|
||||
if (SUCCEEDED(hr = device_manager_get_handle_index(manager, hdevice, &idx)))
|
||||
{
|
||||
unsigned int flags = manager->handles[idx].flags;
|
||||
|
||||
if (flags & HANDLE_FLAG_INVALID)
|
||||
hr = DXVA2_E_NEW_VIDEO_DEVICE;
|
||||
else if (!(flags & HANDLE_FLAG_OPEN))
|
||||
hr = E_HANDLE;
|
||||
}
|
||||
LeaveCriticalSection(&manager->cs);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_LockDevice(IDirect3DDeviceManager9 *iface, HANDLE hdevice,
|
||||
IDirect3DDevice9 **device, BOOL block)
|
||||
{
|
||||
FIXME("%p, %p, %p, %d.\n", iface, hdevice, device, block);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_UnlockDevice(IDirect3DDeviceManager9 *iface, HANDLE hdevice, BOOL savestate)
|
||||
{
|
||||
FIXME("%p, %p, %d.\n", iface, hdevice, savestate);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI device_manager_GetVideoService(IDirect3DDeviceManager9 *iface, HANDLE hdevice, REFIID riid,
|
||||
void **obj)
|
||||
{
|
||||
struct device_manager *manager = impl_from_IDirect3DDeviceManager9(iface);
|
||||
HRESULT hr;
|
||||
size_t idx;
|
||||
|
||||
TRACE("%p, %p, %s, %p.\n", iface, hdevice, debugstr_guid(riid), obj);
|
||||
|
||||
EnterCriticalSection(&manager->cs);
|
||||
if (SUCCEEDED(hr = device_manager_get_handle_index(manager, hdevice, &idx)))
|
||||
{
|
||||
unsigned int flags = manager->handles[idx].flags;
|
||||
|
||||
if (flags & HANDLE_FLAG_INVALID)
|
||||
hr = DXVA2_E_NEW_VIDEO_DEVICE;
|
||||
else if (!(flags & HANDLE_FLAG_OPEN))
|
||||
hr = E_HANDLE;
|
||||
else if (IsEqualIID(riid, &IID_IDirectXVideoProcessorService))
|
||||
{
|
||||
*obj = &manager->IDirectXVideoProcessorService_iface;
|
||||
IUnknown_AddRef((IUnknown *)*obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
WARN("Unsupported service %s.\n", debugstr_guid(riid));
|
||||
hr = E_UNEXPECTED;
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&manager->cs);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static const IDirect3DDeviceManager9Vtbl device_manager_vtbl =
|
||||
{
|
||||
device_manager_QueryInterface,
|
||||
device_manager_AddRef,
|
||||
device_manager_Release,
|
||||
device_manager_ResetDevice,
|
||||
device_manager_OpenDeviceHandle,
|
||||
device_manager_CloseDeviceHandle,
|
||||
device_manager_TestDevice,
|
||||
device_manager_LockDevice,
|
||||
device_manager_UnlockDevice,
|
||||
device_manager_GetVideoService,
|
||||
};
|
||||
|
||||
BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buffer, DWORD length )
|
||||
{
|
||||
FIXME("(%p, %p, %d): stub\n", monitor, buffer, length);
|
||||
|
@ -439,27 +37,11 @@ BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buf
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9(UINT *token, IDirect3DDeviceManager9 **manager)
|
||||
HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9( UINT *resetToken, IDirect3DDeviceManager9 **dxvManager )
|
||||
{
|
||||
struct device_manager *object;
|
||||
FIXME("(%p, %p): stub\n", resetToken, dxvManager);
|
||||
|
||||
TRACE("%p, %p.\n", token, manager);
|
||||
|
||||
*manager = NULL;
|
||||
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
object->IDirect3DDeviceManager9_iface.lpVtbl = &device_manager_vtbl;
|
||||
object->IDirectXVideoProcessorService_iface.lpVtbl = &device_manager_processor_service_vtbl;
|
||||
object->refcount = 1;
|
||||
object->token = GetTickCount();
|
||||
InitializeCriticalSection(&object->cs);
|
||||
|
||||
*token = object->token;
|
||||
*manager = &object->IDirect3DDeviceManager9_iface;
|
||||
|
||||
return S_OK;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI DXVA2CreateVideoService( IDirect3DDevice9 *device, REFIID riid, void **ppv )
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
TESTDLL = dxva2.dll
|
||||
IMPORTS = dxva2 user32 d3d9
|
||||
|
||||
C_SRCS = \
|
||||
dxva2.c
|
|
@ -1,164 +0,0 @@
|
|||
/*
|
||||
* Copyright 2020 Nikolay Sivov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
#include "wine/test.h"
|
||||
#include "d3d9.h"
|
||||
|
||||
#include "initguid.h"
|
||||
#include "dxva2api.h"
|
||||
|
||||
static int get_refcount(IUnknown *object)
|
||||
{
|
||||
IUnknown_AddRef(object);
|
||||
return IUnknown_Release(object);
|
||||
}
|
||||
|
||||
static HWND create_window(void)
|
||||
{
|
||||
RECT r = {0, 0, 640, 480};
|
||||
|
||||
AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW | WS_VISIBLE, FALSE);
|
||||
|
||||
return CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
0, 0, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND focus_window)
|
||||
{
|
||||
D3DPRESENT_PARAMETERS present_parameters = {0};
|
||||
IDirect3DDevice9 *device = NULL;
|
||||
|
||||
present_parameters.BackBufferWidth = 640;
|
||||
present_parameters.BackBufferHeight = 480;
|
||||
present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
|
||||
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||
present_parameters.hDeviceWindow = focus_window;
|
||||
present_parameters.Windowed = TRUE;
|
||||
present_parameters.EnableAutoDepthStencil = TRUE;
|
||||
present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
|
||||
|
||||
IDirect3D9_CreateDevice(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, focus_window,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
static void test_device_manager(void)
|
||||
{
|
||||
IDirectXVideoProcessorService *processor_service;
|
||||
IDirect3DDevice9 *device, *device2;
|
||||
IDirect3DDeviceManager9 *manager;
|
||||
int refcount, refcount2;
|
||||
HANDLE handle, handle1;
|
||||
IDirect3D9 *d3d;
|
||||
HWND window;
|
||||
UINT token;
|
||||
HRESULT hr;
|
||||
|
||||
window = create_window();
|
||||
d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
if (!(device = create_device(d3d, window)))
|
||||
{
|
||||
skip("Failed to create a D3D device, skipping tests.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
hr = DXVA2CreateDirect3DDeviceManager9(&token, &manager);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
|
||||
ok(hr == DXVA2_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Invalid token. */
|
||||
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token + 1);
|
||||
ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_ResetDevice(manager, device, token);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
refcount = get_refcount((IUnknown *)device);
|
||||
|
||||
handle1 = NULL;
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle1);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
refcount2 = get_refcount((IUnknown *)device);
|
||||
ok(refcount2 == refcount, "Unexpected refcount %d.\n", refcount);
|
||||
|
||||
handle = NULL;
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(handle != handle1, "Unexpected handle.\n");
|
||||
|
||||
hr = IDirect3DDeviceManager9_CloseDeviceHandle(manager, handle);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Already closed. */
|
||||
hr = IDirect3DDeviceManager9_CloseDeviceHandle(manager, handle);
|
||||
ok(hr == E_HANDLE, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
handle = NULL;
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_CloseDeviceHandle(manager, handle1);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_TestDevice(manager, handle1);
|
||||
ok(hr == E_HANDLE, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
handle = NULL;
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
handle1 = NULL;
|
||||
hr = IDirect3DDeviceManager9_OpenDeviceHandle(manager, &handle1);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_GetVideoService(manager, handle, &IID_IDirectXVideoProcessorService,
|
||||
(void **)&processor_service);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
IDirectXVideoProcessorService_Release(processor_service);
|
||||
|
||||
device2 = create_device(d3d, window);
|
||||
hr = IDirect3DDeviceManager9_ResetDevice(manager, device2, token);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_GetVideoService(manager, handle, &IID_IDirectXVideoProcessorService,
|
||||
(void **)&processor_service);
|
||||
ok(hr == DXVA2_E_NEW_VIDEO_DEVICE, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDeviceManager9_TestDevice(manager, handle);
|
||||
ok(hr == DXVA2_E_NEW_VIDEO_DEVICE, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
IDirect3DDevice9_Release(device);
|
||||
IDirect3DDevice9_Release(device2);
|
||||
|
||||
IDirect3DDeviceManager9_Release(manager);
|
||||
|
||||
done:
|
||||
IDirect3D9_Release(d3d);
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
START_TEST(dxva2)
|
||||
{
|
||||
test_device_manager();
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
@ stub MFCreateVideoPresenter2
|
||||
@ stub MFCreateVideoPresenter
|
||||
@ stub MFCreateVideoSampleAllocator
|
||||
@ stdcall MFCreateVideoSampleFromSurface(ptr ptr)
|
||||
@ stub MFCreateVideoSampleFromSurface
|
||||
@ stub MFGetPlaneSize
|
||||
@ stub MFGetStrideForBitmapInfoHeader
|
||||
@ stub MFGetUncompressedVideoFormat
|
||||
|
|
|
@ -685,10 +685,3 @@ HRESULT evr_mixer_create(IUnknown *outer, void **out)
|
|||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sample)
|
||||
{
|
||||
FIXME("%p, %p.\n", surface, sample);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TESTDLL = evr.dll
|
||||
IMPORTS = mfuuid strmiids uuid dxguid ole32 oleaut32 evr d3d9 user32
|
||||
IMPORTS = mfuuid strmiids uuid dxguid ole32 oleaut32 evr
|
||||
|
||||
C_SRCS = \
|
||||
evr.c
|
||||
|
|
|
@ -29,36 +29,6 @@
|
|||
|
||||
static const WCHAR sink_id[] = {'E','V','R',' ','I','n','p','u','t','0',0};
|
||||
|
||||
static HWND create_window(void)
|
||||
{
|
||||
RECT r = {0, 0, 640, 480};
|
||||
|
||||
AdjustWindowRect(&r, WS_OVERLAPPEDWINDOW | WS_VISIBLE, FALSE);
|
||||
|
||||
return CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
0, 0, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND focus_window)
|
||||
{
|
||||
D3DPRESENT_PARAMETERS present_parameters = {0};
|
||||
IDirect3DDevice9 *device = NULL;
|
||||
|
||||
present_parameters.BackBufferWidth = 640;
|
||||
present_parameters.BackBufferHeight = 480;
|
||||
present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
|
||||
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||
present_parameters.hDeviceWindow = focus_window;
|
||||
present_parameters.Windowed = TRUE;
|
||||
present_parameters.EnableAutoDepthStencil = TRUE;
|
||||
present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
|
||||
|
||||
IDirect3D9_CreateDevice(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, focus_window,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
static IBaseFilter *create_evr(void)
|
||||
{
|
||||
IBaseFilter *filter = NULL;
|
||||
|
@ -515,117 +485,6 @@ static void test_default_mixer(void)
|
|||
IMFTransform_Release(transform);
|
||||
}
|
||||
|
||||
static void test_surface_sample(void)
|
||||
{
|
||||
IDirect3DSurface9 *backbuffer = NULL;
|
||||
IMFMediaBuffer *buffer, *buffer2;
|
||||
IDirect3DSwapChain9 *swapchain;
|
||||
IDirect3DDevice9 *device;
|
||||
DWORD count, length;
|
||||
IMFSample *sample;
|
||||
LONGLONG duration;
|
||||
IDirect3D9 *d3d;
|
||||
IUnknown *unk;
|
||||
HWND window;
|
||||
HRESULT hr;
|
||||
BYTE *data;
|
||||
|
||||
window = create_window();
|
||||
d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
if (!(device = create_device(d3d, window)))
|
||||
{
|
||||
skip("Failed to create a D3D device, skipping tests.\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain);
|
||||
ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08x)\n", hr);
|
||||
|
||||
hr = IDirect3DSwapChain9_GetBackBuffer(swapchain, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer);
|
||||
ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr);
|
||||
ok(backbuffer != NULL, "The back buffer is NULL\n");
|
||||
|
||||
IDirect3DSwapChain9_Release(swapchain);
|
||||
|
||||
hr = MFCreateVideoSampleFromSurface((IUnknown *)backbuffer, &sample);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Failed to create surface sample, hr %#x.\n", hr);
|
||||
if (FAILED(hr)) goto done;
|
||||
|
||||
hr = IMFSample_QueryInterface(sample, &IID_IMFTrackedSample, (void **)&unk);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = IMFSample_QueryInterface(sample, &IID_IMFDesiredSample, (void **)&unk);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = IMFSample_GetCount(sample, &count);
|
||||
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
|
||||
ok(!count, "Unexpected attribute count.\n");
|
||||
|
||||
hr = IMFSample_GetBufferCount(sample, &count);
|
||||
ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
|
||||
ok(count == 1, "Unexpected attribute count.\n");
|
||||
|
||||
hr = IMFSample_GetTotalLength(sample, &length);
|
||||
ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
|
||||
ok(!length, "Unexpected length %u.\n", length);
|
||||
|
||||
hr = IMFSample_GetSampleDuration(sample, &duration);
|
||||
ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_GetSampleTime(sample, &duration);
|
||||
ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFMediaBuffer_GetMaxLength(buffer, &length);
|
||||
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length);
|
||||
ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr);
|
||||
ok(!length, "Unexpected length %u.\n", length);
|
||||
|
||||
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
|
||||
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&unk);
|
||||
ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_AddBuffer(sample, buffer);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_GetBufferCount(sample, &count);
|
||||
ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
|
||||
ok(count == 2, "Unexpected attribute count.\n");
|
||||
|
||||
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer2);
|
||||
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_CopyToBuffer(sample, buffer);
|
||||
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_RemoveAllBuffers(sample);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSample_GetBufferCount(sample, &count);
|
||||
ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr);
|
||||
ok(!count, "Unexpected attribute count.\n");
|
||||
|
||||
IMFMediaBuffer_Release(buffer);
|
||||
|
||||
IMFSample_Release(sample);
|
||||
|
||||
done:
|
||||
if (backbuffer)
|
||||
IDirect3DSurface9_Release(backbuffer);
|
||||
IDirect3D9_Release(d3d);
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
START_TEST(evr)
|
||||
{
|
||||
CoInitialize(NULL);
|
||||
|
@ -636,7 +495,6 @@ START_TEST(evr)
|
|||
test_find_pin();
|
||||
test_pin_info();
|
||||
test_default_mixer();
|
||||
test_surface_sample();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
|
@ -159,8 +159,8 @@ static HBITMAP create_hatch_bitmap(const GpHatch *hatch, INT origin_x, INT origi
|
|||
* degree of shading needed. */
|
||||
for (y = 0; y < 8; y++)
|
||||
{
|
||||
const int hy = (y + origin_y) & 7;
|
||||
const int hx = origin_x & 7;
|
||||
const int hy = (((y + origin_y) % 8) + 8) % 8;
|
||||
const int hx = ((origin_x % 8) + 8) % 8;
|
||||
unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
|
||||
|
||||
for (x = 0; x < 8; x++, row >>= 1)
|
||||
|
@ -1198,13 +1198,13 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
|
|||
/* See create_hatch_bitmap for an explanation of how index is derived. */
|
||||
for (y = 0; y < fill_area->Height; y++, argb_pixels += cdwStride)
|
||||
{
|
||||
const int hy = ~(y + fill_area->Y - graphics->origin_y) & 7;
|
||||
const int hx = graphics->origin_x & 7;
|
||||
const int hy = (7 - ((y + fill_area->Y - graphics->origin_y) % 8)) % 8;
|
||||
const int hx = ((graphics->origin_x % 8) + 8) % 8;
|
||||
const unsigned int row = (0x10101 * hatch_data[hy]) >> hx;
|
||||
|
||||
for (x = 0; x < fill_area->Width; x++)
|
||||
{
|
||||
const unsigned int srow = row >> (~(x + fill_area->X) & 7);
|
||||
const unsigned int srow = row >> (7 - ((x + fill_area->X) % 8));
|
||||
int index;
|
||||
if (hatch_data[8])
|
||||
index = (srow & 1) ? 2 : (srow & 0x82) ? 1 : 0;
|
||||
|
@ -2536,12 +2536,6 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
|
|||
return stat;
|
||||
}
|
||||
|
||||
if (graphics->temp_hdc)
|
||||
{
|
||||
DeleteDC(graphics->temp_hdc);
|
||||
graphics->temp_hdc = NULL;
|
||||
}
|
||||
|
||||
if(graphics->owndc)
|
||||
ReleaseDC(graphics->hwnd, graphics->hdc);
|
||||
|
||||
|
@ -6668,15 +6662,7 @@ GpStatus WINGDIPAPI GdipGetDC(GpGraphics *graphics, HDC *hdc)
|
|||
if (!hbitmap)
|
||||
return GenericError;
|
||||
|
||||
if (!graphics->temp_hdc)
|
||||
{
|
||||
temp_hdc = CreateCompatibleDC(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_hdc = graphics->temp_hdc;
|
||||
}
|
||||
|
||||
temp_hdc = CreateCompatibleDC(0);
|
||||
if (!temp_hdc)
|
||||
{
|
||||
DeleteObject(hbitmap);
|
||||
|
@ -6737,7 +6723,9 @@ GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics *graphics, HDC hdc)
|
|||
graphics->temp_hbitmap_width * 4, PixelFormat32bppARGB);
|
||||
|
||||
/* Clean up. */
|
||||
DeleteDC(graphics->temp_hdc);
|
||||
DeleteObject(graphics->temp_hbitmap);
|
||||
graphics->temp_hdc = NULL;
|
||||
graphics->temp_hbitmap = NULL;
|
||||
}
|
||||
else if (hdc != graphics->hdc)
|
||||
|
|
|
@ -1814,8 +1814,8 @@ static void test_renderingOrigin(void)
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(tests); i++)
|
||||
{
|
||||
const INT exp_x = tests[i][0] & 7;
|
||||
const INT exp_y = tests[i][1] & 7;
|
||||
const INT exp_x = ((tests[i][0] % 8) + 8) % 8;
|
||||
const INT exp_y = ((tests[i][1] % 8) + 8) % 8;
|
||||
|
||||
status = GdipSetRenderingOrigin(graphics_image, tests[i][0], tests[i][1]);
|
||||
expect(Ok, status);
|
||||
|
|
|
@ -6792,97 +6792,6 @@ static void test_hdc_caching(void)
|
|||
DeleteObject(hbm);
|
||||
}
|
||||
|
||||
static void test_gdi_interop(void)
|
||||
{
|
||||
GpBitmap *bitmap;
|
||||
GpGraphics *graphics;
|
||||
GpMatrix *transform;
|
||||
GpBrush *brush;
|
||||
GpStatus stat;
|
||||
HDC hdc;
|
||||
HBRUSH hbrush, holdbrush;
|
||||
ARGB color;
|
||||
|
||||
stat = GdipCreateBitmapFromScan0(100, 100, 0, PixelFormat32bppARGB, NULL, &bitmap);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipCreateMatrix(&transform);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipSetMatrixElements(transform, 1.0, 0.0, 0.0, 1.0, 50.0, 50.0);
|
||||
expect(Ok, stat);
|
||||
|
||||
/* GDI+: Set world transform. Should not matter to GDI. */
|
||||
stat = GdipSetWorldTransform(graphics, transform);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipGetDC(graphics, &hdc);
|
||||
expect(Ok, stat);
|
||||
|
||||
hbrush = CreateSolidBrush(0xff0000);
|
||||
|
||||
holdbrush = SelectObject(hdc, hbrush);
|
||||
|
||||
/* GDI: Draw a rectangle at physical coords (5, 5) to (12, 10). */
|
||||
Rectangle(hdc, 5, 5, 12, 10);
|
||||
|
||||
holdbrush = SelectObject(hdc, holdbrush);
|
||||
|
||||
/* GDI: Set view port origin. Should not matter to GDI+. */
|
||||
SetViewportOrgEx(hdc, 20, 20, NULL);
|
||||
|
||||
GdipReleaseDC(graphics, hdc);
|
||||
|
||||
stat = GdipCreateSolidFill((ARGB)0xff0000ff, (GpSolidFill**)&brush);
|
||||
expect(Ok, stat);
|
||||
|
||||
/* GDI+: Draw a rectangle at physical coords (85, 85) to (88, 95). */
|
||||
stat = GdipFillRectangleI(graphics, brush, 35, 35, 3, 10);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipDeleteBrush(brush);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipGetDC(graphics, &hdc);
|
||||
expect(Ok, stat);
|
||||
|
||||
holdbrush = SelectObject(hdc, hbrush);
|
||||
|
||||
/* GDI: Draw a rectangle at physical coords (25, 25) to (30, 34).
|
||||
Updated view port origin should still be in effect. */
|
||||
Rectangle(hdc, 5, 5, 10, 14);
|
||||
|
||||
SelectObject(hdc, holdbrush);
|
||||
|
||||
DeleteObject(hbrush);
|
||||
stat = GdipReleaseDC(graphics, hdc);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipDeleteMatrix(transform);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipBitmapGetPixel(bitmap, 6, 6, &color);
|
||||
expect(Ok, stat);
|
||||
expect(0xff0000ff, color);
|
||||
|
||||
stat = GdipBitmapGetPixel(bitmap, 26, 26, &color);
|
||||
expect(Ok, stat);
|
||||
expect(0xff0000ff, color);
|
||||
|
||||
stat = GdipBitmapGetPixel(bitmap, 86, 86, &color);
|
||||
expect(Ok, stat);
|
||||
expect(0xff0000ff, color);
|
||||
|
||||
stat = GdipDeleteGraphics(graphics);
|
||||
expect(Ok, stat);
|
||||
|
||||
stat = GdipDisposeImage((GpImage*)bitmap);
|
||||
expect(Ok, stat);
|
||||
}
|
||||
|
||||
START_TEST(graphics)
|
||||
{
|
||||
struct GdiplusStartupInput gdiplusStartupInput;
|
||||
|
@ -6976,7 +6885,6 @@ START_TEST(graphics)
|
|||
test_GdipGraphicsSetAbort();
|
||||
test_cliphrgn_transform();
|
||||
test_hdc_caching();
|
||||
test_gdi_interop();
|
||||
|
||||
GdiplusShutdown(gdiplusToken);
|
||||
DestroyWindow( hwnd );
|
||||
|
|
|
@ -5913,7 +5913,7 @@ static void test_graphics_clear(void)
|
|||
if (!match)
|
||||
{
|
||||
bits = data.Scan0;
|
||||
trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppARGB,
|
||||
trace("format %#x, bits %02x,%02x,%02x,%02x %02x,%02x,%02x,%02x\n", PixelFormat32bppPARGB,
|
||||
bits[0], bits[1], bits[2], bits[3], bits[4], bits[5], bits[6], bits[7]);
|
||||
}
|
||||
status = GdipBitmapUnlockBits(bitmap, &data);
|
||||
|
|
|
@ -101,13 +101,14 @@ static const char hex[16] = "0123456789ABCDEF";
|
|||
* Copy the content of an entry into a buffer, removing quotes, and possibly
|
||||
* translating environment variables.
|
||||
*/
|
||||
static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len )
|
||||
static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len,
|
||||
BOOL strip_quote )
|
||||
{
|
||||
WCHAR quote = '\0';
|
||||
|
||||
if(!buffer) return;
|
||||
|
||||
if (*value == '\'' || *value == '\"')
|
||||
if (strip_quote && ((*value == '\'') || (*value == '\"')))
|
||||
{
|
||||
if (value[1] && (value[strlenW(value)-1] == *value)) quote = *value++;
|
||||
}
|
||||
|
@ -856,26 +857,16 @@ static BOOL PROFILE_Open( LPCWSTR filename, BOOL write_access )
|
|||
* Returns all keys of a section.
|
||||
* If return_values is TRUE, also include the corresponding values.
|
||||
*/
|
||||
static INT PROFILE_GetSection( const WCHAR *filename, LPCWSTR section_name,
|
||||
static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name,
|
||||
LPWSTR buffer, UINT len, BOOL return_values )
|
||||
{
|
||||
PROFILESECTION *section;
|
||||
PROFILEKEY *key;
|
||||
|
||||
if(!buffer) return 0;
|
||||
|
||||
TRACE("%s,%p,%u\n", debugstr_w(section_name), buffer, len);
|
||||
|
||||
EnterCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
if (!PROFILE_Open( filename, FALSE ))
|
||||
{
|
||||
LeaveCriticalSection( &PROFILE_CritSect );
|
||||
buffer[0] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (section = CurProfile->section; section; section = section->next)
|
||||
while (section)
|
||||
{
|
||||
if (!strcmpiW( section->name, section_name ))
|
||||
{
|
||||
|
@ -886,22 +877,19 @@ static INT PROFILE_GetSection( const WCHAR *filename, LPCWSTR section_name,
|
|||
if (!*key->name && !key->value) continue; /* Skip empty lines */
|
||||
if (IS_ENTRY_COMMENT(key->name)) continue; /* Skip comments */
|
||||
if (!return_values && !key->value) continue; /* Skip lines w.o. '=' */
|
||||
lstrcpynW( buffer, key->name, len - 1 );
|
||||
PROFILE_CopyEntry( buffer, key->name, len - 1, 0 );
|
||||
len -= strlenW(buffer) + 1;
|
||||
buffer += strlenW(buffer) + 1;
|
||||
if (len < 2)
|
||||
break;
|
||||
if (return_values && key->value) {
|
||||
buffer[-1] = '=';
|
||||
lstrcpynW( buffer, key->value, len - 1 );
|
||||
PROFILE_CopyEntry ( buffer, key->value, len - 1, 0 );
|
||||
len -= strlenW(buffer) + 1;
|
||||
buffer += strlenW(buffer) + 1;
|
||||
}
|
||||
}
|
||||
*buffer = '\0';
|
||||
|
||||
LeaveCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
if (len <= 1)
|
||||
/*If either lpszSection or lpszKey is NULL and the supplied
|
||||
destination buffer is too small to hold all the strings,
|
||||
|
@ -914,11 +902,9 @@ static INT PROFILE_GetSection( const WCHAR *filename, LPCWSTR section_name,
|
|||
}
|
||||
return oldlen - len;
|
||||
}
|
||||
section = section->next;
|
||||
}
|
||||
buffer[0] = buffer[1] = '\0';
|
||||
|
||||
LeaveCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -963,6 +949,64 @@ static INT PROFILE_GetSectionNames( LPWSTR buffer, UINT len )
|
|||
return buf-buffer;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROFILE_GetString
|
||||
*
|
||||
* Get a profile string.
|
||||
*
|
||||
* Tests with GetPrivateProfileString16, W95a,
|
||||
* with filled buffer ("****...") and section "set1" and key_name "1" valid:
|
||||
* section key_name def_val res buffer
|
||||
* "set1" "1" "x" 43 [data]
|
||||
* "set1" "1 " "x" 43 [data] (!)
|
||||
* "set1" " 1 "' "x" 43 [data] (!)
|
||||
* "set1" "" "x" 1 "x"
|
||||
* "set1" "" "x " 1 "x" (!)
|
||||
* "set1" "" " x " 3 " x" (!)
|
||||
* "set1" NULL "x" 6 "1\02\03\0\0"
|
||||
* "set1" "" "x" 1 "x"
|
||||
* NULL "1" "x" 0 "" (!)
|
||||
* "" "1" "x" 1 "x"
|
||||
* NULL NULL "" 0 ""
|
||||
*
|
||||
*
|
||||
*/
|
||||
static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name,
|
||||
LPCWSTR def_val, LPWSTR buffer, UINT len )
|
||||
{
|
||||
PROFILEKEY *key = NULL;
|
||||
static const WCHAR empty_strW[] = { 0 };
|
||||
|
||||
if(!buffer || !len) return 0;
|
||||
|
||||
if (!def_val) def_val = empty_strW;
|
||||
if (key_name)
|
||||
{
|
||||
key = PROFILE_Find( &CurProfile->section, section, key_name, FALSE, FALSE);
|
||||
PROFILE_CopyEntry( buffer, (key && key->value) ? key->value : def_val,
|
||||
len, TRUE );
|
||||
TRACE("(%s,%s,%s): returning %s\n",
|
||||
debugstr_w(section), debugstr_w(key_name),
|
||||
debugstr_w(def_val), debugstr_w(buffer) );
|
||||
return strlenW( buffer );
|
||||
}
|
||||
/* no "else" here ! */
|
||||
if (section)
|
||||
{
|
||||
INT ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, FALSE);
|
||||
if (!buffer[0]) /* no luck -> def_val */
|
||||
{
|
||||
PROFILE_CopyEntry(buffer, def_val, len, TRUE);
|
||||
ret = strlenW(buffer);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
buffer[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROFILE_SetString
|
||||
*
|
||||
|
@ -1043,57 +1087,45 @@ INT WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
|
|||
LPCWSTR def_val, LPWSTR buffer,
|
||||
UINT len, LPCWSTR filename )
|
||||
{
|
||||
static const WCHAR emptyW[] = {0};
|
||||
int ret;
|
||||
LPWSTR defval_tmp = NULL;
|
||||
const WCHAR *p;
|
||||
|
||||
TRACE("%s,%s,%s,%p,%u,%s\n", debugstr_w(section), debugstr_w(entry),
|
||||
debugstr_w(def_val), buffer, len, debugstr_w(filename));
|
||||
|
||||
if (!buffer || !len) return 0;
|
||||
if (!def_val) def_val = emptyW;
|
||||
if (!section) return GetPrivateProfileSectionNamesW( buffer, len, filename );
|
||||
if (!entry)
|
||||
{
|
||||
ret = PROFILE_GetSection( filename, section, buffer, len, FALSE );
|
||||
if (!buffer[0])
|
||||
{
|
||||
PROFILE_CopyEntry( buffer, def_val, len );
|
||||
ret = strlenW( buffer );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* strip any trailing ' ' of def_val. */
|
||||
p = def_val + strlenW(def_val) - 1;
|
||||
|
||||
while (p > def_val && *p == ' ') p--;
|
||||
|
||||
if (p >= def_val)
|
||||
if (def_val)
|
||||
{
|
||||
int vlen = (int)(p - def_val) + 1;
|
||||
LPCWSTR p = def_val + strlenW(def_val) - 1;
|
||||
|
||||
defval_tmp = HeapAlloc(GetProcessHeap(), 0, (vlen + 1) * sizeof(WCHAR));
|
||||
memcpy(defval_tmp, def_val, vlen * sizeof(WCHAR));
|
||||
defval_tmp[vlen] = '\0';
|
||||
def_val = defval_tmp;
|
||||
while (p > def_val && *p == ' ')
|
||||
p--;
|
||||
|
||||
if (p >= def_val)
|
||||
{
|
||||
int vlen = (int)(p - def_val) + 1;
|
||||
|
||||
defval_tmp = HeapAlloc(GetProcessHeap(), 0, (vlen + 1) * sizeof(WCHAR));
|
||||
memcpy(defval_tmp, def_val, vlen * sizeof(WCHAR));
|
||||
defval_tmp[vlen] = '\0';
|
||||
def_val = defval_tmp;
|
||||
}
|
||||
}
|
||||
|
||||
RtlEnterCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
if (PROFILE_Open( filename, FALSE ))
|
||||
{
|
||||
PROFILEKEY *key = PROFILE_Find( &CurProfile->section, section, entry, FALSE, FALSE );
|
||||
PROFILE_CopyEntry( buffer, (key && key->value) ? key->value : def_val, len );
|
||||
TRACE("-> %s\n", debugstr_w( buffer ));
|
||||
ret = strlenW( buffer );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PROFILE_Open( filename, FALSE )) {
|
||||
if (section == NULL)
|
||||
ret = PROFILE_GetSectionNames(buffer, len);
|
||||
else
|
||||
/* PROFILE_GetString can handle the 'entry == NULL' case */
|
||||
ret = PROFILE_GetString( section, entry, def_val, buffer, len );
|
||||
} else if (buffer && def_val) {
|
||||
lstrcpynW( buffer, def_val, len );
|
||||
ret = strlenW( buffer );
|
||||
}
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
RtlLeaveCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
|
@ -1242,6 +1274,8 @@ UINT WINAPI GetPrivateProfileIntA( LPCSTR section, LPCSTR entry,
|
|||
INT WINAPI GetPrivateProfileSectionW( LPCWSTR section, LPWSTR buffer,
|
||||
DWORD len, LPCWSTR filename )
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!section || !buffer)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
|
@ -1250,7 +1284,14 @@ INT WINAPI GetPrivateProfileSectionW( LPCWSTR section, LPWSTR buffer,
|
|||
|
||||
TRACE("(%s, %p, %d, %s)\n", debugstr_w(section), buffer, len, debugstr_w(filename));
|
||||
|
||||
return PROFILE_GetSection( filename, section, buffer, len, TRUE );
|
||||
RtlEnterCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
if (PROFILE_Open( filename, FALSE ))
|
||||
ret = PROFILE_GetSection(CurProfile->section, section, buffer, len, TRUE);
|
||||
|
||||
RtlLeaveCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -1092,77 +1092,6 @@ static void test_WritePrivateProfileString(void)
|
|||
DeleteFileA(path);
|
||||
}
|
||||
|
||||
static void test_profile_struct(void)
|
||||
{
|
||||
static const char expect_data[] = "[s]\r\nkey=616261637573006F\r\n";
|
||||
char buffer[20];
|
||||
BOOL ret;
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, sizeof(buffer), "./winetest.ini");
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError());
|
||||
|
||||
ret = WritePrivateProfileStructA("s", "key", (void *)"abacus", sizeof("abacus"), "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
ok(check_file_data("./winetest.ini", expect_data), "file doesn't match\n");
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 6, "./winetest.ini");
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 8, "./winetest.ini");
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError());
|
||||
|
||||
memset(buffer, 0xcc, sizeof(buffer));
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
ok(!strcmp(buffer, "abacus"), "data didn't match\n");
|
||||
|
||||
memset(buffer, 0xcc, sizeof(buffer));
|
||||
ret = GetPrivateProfileStringA("s", "key", "default", buffer, sizeof(buffer), "./winetest.ini");
|
||||
ok(ret == 16, "got size %u\n", ret);
|
||||
ok(!strcmp(buffer, "616261637573006F"), "got %s\n", debugstr_a(buffer));
|
||||
|
||||
ret = WritePrivateProfileStringA("s", "key", "636163747573006F", "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini");
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == ERROR_INVALID_DATA, "got error %u\n", GetLastError());
|
||||
|
||||
ret = WritePrivateProfileStringA("s", "key", "6361637475730083", "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
|
||||
memset(buffer, 0xcc, sizeof(buffer));
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
ok(!strcmp(buffer, "cactus"), "data didn't match\n");
|
||||
|
||||
ret = WritePrivateProfileStringA("s", "key", "636163747573008Q", "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini");
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == ERROR_INVALID_DATA, "got error %u\n", GetLastError());
|
||||
|
||||
ret = WritePrivateProfileStringA("s", "key", "16361637475730083", "./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetPrivateProfileStructA("s", "key", buffer, 7, "./winetest.ini");
|
||||
ok(!ret, "expected failure\n");
|
||||
todo_wine ok(GetLastError() == ERROR_BAD_LENGTH, "got error %u\n", GetLastError());
|
||||
|
||||
ret = DeleteFileA("./winetest.ini");
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
}
|
||||
|
||||
START_TEST(profile)
|
||||
{
|
||||
test_profile_int();
|
||||
|
@ -1190,5 +1119,4 @@ START_TEST(profile)
|
|||
"[section2]\r",
|
||||
"CR only");
|
||||
test_WritePrivateProfileString();
|
||||
test_profile_struct();
|
||||
}
|
||||
|
|
|
@ -1291,18 +1291,12 @@ static const struct activate_funcs evr_activate_funcs =
|
|||
|
||||
HRESULT WINAPI MFCreateVideoRendererActivate(HWND hwnd, IMFActivate **activate)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p, %p.\n", hwnd, activate);
|
||||
|
||||
if (!activate)
|
||||
return E_POINTER;
|
||||
|
||||
hr = create_activation_object(hwnd, &evr_activate_funcs, activate);
|
||||
if (SUCCEEDED(hr))
|
||||
IMFActivate_SetUINT64(*activate, &MF_ACTIVATE_VIDEO_WINDOW, (ULONG_PTR)hwnd);
|
||||
|
||||
return hr;
|
||||
return create_activation_object(hwnd, &evr_activate_funcs, activate);
|
||||
}
|
||||
|
||||
struct simple_type_handler
|
||||
|
|
|
@ -3228,8 +3228,7 @@ static void test_evr(void)
|
|||
{
|
||||
IMFMediaSink *sink, *sink2;
|
||||
IMFActivate *activate;
|
||||
DWORD flags, count;
|
||||
UINT64 value;
|
||||
DWORD flags;
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoInitialize(NULL);
|
||||
|
@ -3241,14 +3240,6 @@ static void test_evr(void)
|
|||
hr = MFCreateVideoRendererActivate(NULL, &activate);
|
||||
ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr);
|
||||
|
||||
hr = IMFActivate_GetCount(activate, &count);
|
||||
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
|
||||
ok(count == 1, "Unexpected count %u.\n", count);
|
||||
|
||||
hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &value);
|
||||
ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
|
||||
ok(!value, "Unexpected value.\n");
|
||||
|
||||
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
|
||||
|
|
|
@ -1646,18 +1646,12 @@ const char *debugstr_attr(const GUID *guid)
|
|||
X(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK),
|
||||
X(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE11),
|
||||
X(MF_MT_USER_DATA),
|
||||
X(MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID),
|
||||
X(MF_MT_MIN_MASTERING_LUMINANCE),
|
||||
X(MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE),
|
||||
X(MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS),
|
||||
X(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID),
|
||||
X(MF_EVENT_STREAM_METADATA_SYSTEMID),
|
||||
X(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE),
|
||||
X(MF_MT_AUDIO_CHANNEL_MASK),
|
||||
X(MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN),
|
||||
X(MF_READWRITE_DISABLE_CONVERTERS),
|
||||
X(MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE_EDGE),
|
||||
X(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS),
|
||||
X(MF_MT_MINIMUM_DISPLAY_APERTURE),
|
||||
X(MFSampleExtension_Token),
|
||||
X(MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY),
|
||||
|
@ -1812,7 +1806,6 @@ const char *debugstr_attr(const GUID *guid)
|
|||
X(MF_MEDIA_ENGINE_COREWINDOW),
|
||||
X(MF_SOURCE_READER_DISABLE_CAMERA_PLUGINS),
|
||||
X(MF_MT_MPEG4_TRACK_TYPE),
|
||||
X(MF_ACTIVATE_VIDEO_WINDOW),
|
||||
X(MF_MT_PAN_SCAN_APERTURE),
|
||||
X(MF_TOPOLOGY_RESOLUTION_STATUS),
|
||||
X(MF_MT_ORIGINAL_4CC),
|
||||
|
|
|
@ -37,7 +37,6 @@ struct media_type
|
|||
{
|
||||
struct attributes attributes;
|
||||
IMFMediaType IMFMediaType_iface;
|
||||
IMFVideoMediaType IMFVideoMediaType_iface;
|
||||
};
|
||||
|
||||
struct stream_desc
|
||||
|
@ -67,16 +66,11 @@ struct presentation_desc
|
|||
|
||||
static HRESULT presentation_descriptor_init(struct presentation_desc *object, DWORD count);
|
||||
|
||||
static struct media_type *impl_from_IMFMediaType(IMFMediaType *iface)
|
||||
static inline struct media_type *impl_from_IMFMediaType(IMFMediaType *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct media_type, IMFMediaType_iface);
|
||||
}
|
||||
|
||||
static struct media_type *impl_from_IMFVideoMediaType(IMFVideoMediaType *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct media_type, IMFVideoMediaType_iface);
|
||||
}
|
||||
|
||||
static inline struct stream_desc *impl_from_IMFStreamDescriptor(IMFStreamDescriptor *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct stream_desc, IMFStreamDescriptor_iface);
|
||||
|
@ -419,10 +413,13 @@ static HRESULT WINAPI mediatype_GetMajorType(IMFMediaType *iface, GUID *guid)
|
|||
return attributes_GetGUID(&media_type->attributes, &MF_MT_MAJOR_TYPE, guid);
|
||||
}
|
||||
|
||||
static HRESULT mediatype_is_compressed(struct media_type *media_type, BOOL *compressed)
|
||||
static HRESULT WINAPI mediatype_IsCompressedFormat(IMFMediaType *iface, BOOL *compressed)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFMediaType(iface);
|
||||
UINT32 value;
|
||||
|
||||
TRACE("%p, %p.\n", iface, compressed);
|
||||
|
||||
if (FAILED(attributes_GetUINT32(&media_type->attributes, &MF_MT_ALL_SAMPLES_INDEPENDENT, &value)))
|
||||
{
|
||||
value = 0;
|
||||
|
@ -433,19 +430,11 @@ static HRESULT mediatype_is_compressed(struct media_type *media_type, BOOL *comp
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mediatype_IsCompressedFormat(IMFMediaType *iface, BOOL *compressed)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFMediaType(iface);
|
||||
|
||||
TRACE("%p, %p.\n", iface, compressed);
|
||||
|
||||
return mediatype_is_compressed(media_type, compressed);
|
||||
}
|
||||
|
||||
static HRESULT media_type_is_equal(struct media_type *media_type, IMFMediaType *type, DWORD *flags)
|
||||
static HRESULT WINAPI mediatype_IsEqual(IMFMediaType *iface, IMFMediaType *type, DWORD *flags)
|
||||
{
|
||||
const DWORD full_equality_flags = MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_TYPES |
|
||||
MF_MEDIATYPE_EQUAL_FORMAT_DATA | MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA;
|
||||
struct media_type *media_type = impl_from_IMFMediaType(iface);
|
||||
struct comparand
|
||||
{
|
||||
IMFAttributes *type;
|
||||
|
@ -457,6 +446,8 @@ static HRESULT media_type_is_equal(struct media_type *media_type, IMFMediaType *
|
|||
unsigned int i;
|
||||
BOOL result;
|
||||
|
||||
TRACE("%p, %p, %p.\n", iface, type, flags);
|
||||
|
||||
*flags = 0;
|
||||
|
||||
left.type = &media_type->attributes.IMFAttributes_iface;
|
||||
|
@ -544,15 +535,6 @@ static HRESULT media_type_is_equal(struct media_type *media_type, IMFMediaType *
|
|||
return *flags == full_equality_flags ? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mediatype_IsEqual(IMFMediaType *iface, IMFMediaType *type, DWORD *flags)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFMediaType(iface);
|
||||
|
||||
TRACE("%p, %p, %p.\n", iface, type, flags);
|
||||
|
||||
return media_type_is_equal(media_type, type, flags);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mediatype_GetRepresentation(IMFMediaType *iface, GUID guid, void **representation)
|
||||
{
|
||||
FIXME("%p, %s, %p.\n", iface, debugstr_guid(&guid), representation);
|
||||
|
@ -609,425 +591,6 @@ static const IMFMediaTypeVtbl mediatypevtbl =
|
|||
mediatype_FreeRepresentation
|
||||
};
|
||||
|
||||
static HRESULT WINAPI video_mediatype_QueryInterface(IMFVideoMediaType *iface, REFIID riid, void **out)
|
||||
{
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), out);
|
||||
|
||||
if (IsEqualIID(riid, &IID_IMFVideoMediaType) ||
|
||||
IsEqualIID(riid, &IID_IMFMediaType) ||
|
||||
IsEqualIID(riid, &IID_IMFAttributes) ||
|
||||
IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
*out = iface;
|
||||
IMFVideoMediaType_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Unsupported %s.\n", debugstr_guid(riid));
|
||||
*out = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI video_mediatype_AddRef(IMFVideoMediaType *iface)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
ULONG refcount = InterlockedIncrement(&media_type->attributes.ref);
|
||||
|
||||
TRACE("%p, refcount %u.\n", iface, refcount);
|
||||
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static ULONG WINAPI video_mediatype_Release(IMFVideoMediaType *iface)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
ULONG refcount = InterlockedDecrement(&media_type->attributes.ref);
|
||||
|
||||
TRACE("%p, refcount %u.\n", iface, refcount);
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
clear_attributes_object(&media_type->attributes);
|
||||
heap_free(media_type);
|
||||
}
|
||||
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetItem(IMFVideoMediaType *iface, REFGUID key, PROPVARIANT *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_GetItem(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetItemType(IMFVideoMediaType *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), type);
|
||||
|
||||
return attributes_GetItemType(&media_type->attributes, key, type);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_CompareItem(IMFVideoMediaType *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %s, %p.\n", iface, debugstr_attr(key), debugstr_propvar(value), result);
|
||||
|
||||
return attributes_CompareItem(&media_type->attributes, key, value, result);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_Compare(IMFVideoMediaType *iface, IMFAttributes *attrs,
|
||||
MF_ATTRIBUTES_MATCH_TYPE type, BOOL *result)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %p, %d, %p.\n", iface, attrs, type, result);
|
||||
|
||||
return attributes_Compare(&media_type->attributes, attrs, type, result);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetUINT32(IMFVideoMediaType *iface, REFGUID key, UINT32 *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_GetUINT32(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetUINT64(IMFVideoMediaType *iface, REFGUID key, UINT64 *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_GetUINT64(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetDouble(IMFVideoMediaType *iface, REFGUID key, double *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_GetDouble(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetGUID(IMFVideoMediaType *iface, REFGUID key, GUID *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_GetGUID(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetStringLength(IMFVideoMediaType *iface, REFGUID key, UINT32 *length)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), length);
|
||||
|
||||
return attributes_GetStringLength(&media_type->attributes, key, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetString(IMFVideoMediaType *iface, REFGUID key, WCHAR *value,
|
||||
UINT32 size, UINT32 *length)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p, %u, %p.\n", iface, debugstr_attr(key), value, size, length);
|
||||
|
||||
return attributes_GetString(&media_type->attributes, key, value, size, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetAllocatedString(IMFVideoMediaType *iface, REFGUID key,
|
||||
WCHAR **value, UINT32 *length)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), value, length);
|
||||
|
||||
return attributes_GetAllocatedString(&media_type->attributes, key, value, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetBlobSize(IMFVideoMediaType *iface, REFGUID key, UINT32 *size)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), size);
|
||||
|
||||
return attributes_GetBlobSize(&media_type->attributes, key, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetBlob(IMFVideoMediaType *iface, REFGUID key, UINT8 *buf,
|
||||
UINT32 bufsize, UINT32 *blobsize)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p, %u, %p.\n", iface, debugstr_attr(key), buf, bufsize, blobsize);
|
||||
|
||||
return attributes_GetBlob(&media_type->attributes, key, buf, bufsize, blobsize);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetAllocatedBlob(IMFVideoMediaType *iface, REFGUID key, UINT8 **buf, UINT32 *size)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p, %p.\n", iface, debugstr_attr(key), buf, size);
|
||||
|
||||
return attributes_GetAllocatedBlob(&media_type->attributes, key, buf, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetUnknown(IMFVideoMediaType *iface, REFGUID key, REFIID riid, void **obj)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %s, %p.\n", iface, debugstr_attr(key), debugstr_guid(riid), obj);
|
||||
|
||||
return attributes_GetUnknown(&media_type->attributes, key, riid, obj);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetItem(IMFVideoMediaType *iface, REFGUID key, REFPROPVARIANT value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_propvar(value));
|
||||
|
||||
return attributes_SetItem(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_DeleteItem(IMFVideoMediaType *iface, REFGUID key)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s.\n", iface, debugstr_attr(key));
|
||||
|
||||
return attributes_DeleteItem(&media_type->attributes, key);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_DeleteAllItems(IMFVideoMediaType *iface)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p.\n", iface);
|
||||
|
||||
return attributes_DeleteAllItems(&media_type->attributes);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetUINT32(IMFVideoMediaType *iface, REFGUID key, UINT32 value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %u.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_SetUINT32(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetUINT64(IMFVideoMediaType *iface, REFGUID key, UINT64 value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), wine_dbgstr_longlong(value));
|
||||
|
||||
return attributes_SetUINT64(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetDouble(IMFVideoMediaType *iface, REFGUID key, double value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %f.\n", iface, debugstr_attr(key), value);
|
||||
|
||||
return attributes_SetDouble(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetGUID(IMFVideoMediaType *iface, REFGUID key, REFGUID value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_mf_guid(value));
|
||||
|
||||
return attributes_SetGUID(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetString(IMFVideoMediaType *iface, REFGUID key, const WCHAR *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %s.\n", iface, debugstr_attr(key), debugstr_w(value));
|
||||
|
||||
return attributes_SetString(&media_type->attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetBlob(IMFVideoMediaType *iface, REFGUID key, const UINT8 *buf, UINT32 size)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p, %u.\n", iface, debugstr_attr(key), buf, size);
|
||||
|
||||
return attributes_SetBlob(&media_type->attributes, key, buf, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_SetUnknown(IMFVideoMediaType *iface, REFGUID key, IUnknown *unknown)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %s, %p.\n", iface, debugstr_attr(key), unknown);
|
||||
|
||||
return attributes_SetUnknown(&media_type->attributes, key, unknown);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_LockStore(IMFVideoMediaType *iface)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p.\n", iface);
|
||||
|
||||
return attributes_LockStore(&media_type->attributes);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_UnlockStore(IMFVideoMediaType *iface)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p.\n", iface);
|
||||
|
||||
return attributes_UnlockStore(&media_type->attributes);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetCount(IMFVideoMediaType *iface, UINT32 *count)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %p.\n", iface, count);
|
||||
|
||||
return attributes_GetCount(&media_type->attributes, count);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetItemByIndex(IMFVideoMediaType *iface, UINT32 index, GUID *key, PROPVARIANT *value)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %u, %p, %p.\n", iface, index, key, value);
|
||||
|
||||
return attributes_GetItemByIndex(&media_type->attributes, index, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_CopyAllItems(IMFVideoMediaType *iface, IMFAttributes *dest)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %p.\n", iface, dest);
|
||||
|
||||
return attributes_CopyAllItems(&media_type->attributes, dest);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetMajorType(IMFVideoMediaType *iface, GUID *guid)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %p.\n", iface, guid);
|
||||
|
||||
return attributes_GetGUID(&media_type->attributes, &MF_MT_MAJOR_TYPE, guid);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_IsCompressedFormat(IMFVideoMediaType *iface, BOOL *compressed)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %p.\n", iface, compressed);
|
||||
|
||||
return mediatype_is_compressed(media_type, compressed);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_IsEqual(IMFVideoMediaType *iface, IMFMediaType *type, DWORD *flags)
|
||||
{
|
||||
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||
|
||||
TRACE("%p, %p, %p.\n", iface, type, flags);
|
||||
|
||||
return media_type_is_equal(media_type, type, flags);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetRepresentation(IMFVideoMediaType *iface, GUID guid, void **representation)
|
||||
{
|
||||
FIXME("%p, %s, %p.\n", iface, debugstr_guid(&guid), representation);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_FreeRepresentation(IMFVideoMediaType *iface, GUID guid, void *representation)
|
||||
{
|
||||
FIXME("%p, %s, %p.\n", iface, debugstr_guid(&guid), representation);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const MFVIDEOFORMAT * WINAPI video_mediatype_GetVideoFormat(IMFVideoMediaType *iface)
|
||||
{
|
||||
FIXME("%p.\n", iface);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI video_mediatype_GetVideoRepresentation(IMFVideoMediaType *iface, GUID representation,
|
||||
void **data, LONG stride)
|
||||
{
|
||||
FIXME("%p, %s, %p, %d.\n", iface, debugstr_guid(&representation), data, stride);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IMFVideoMediaTypeVtbl videomediatypevtbl =
|
||||
{
|
||||
video_mediatype_QueryInterface,
|
||||
video_mediatype_AddRef,
|
||||
video_mediatype_Release,
|
||||
video_mediatype_GetItem,
|
||||
video_mediatype_GetItemType,
|
||||
video_mediatype_CompareItem,
|
||||
video_mediatype_Compare,
|
||||
video_mediatype_GetUINT32,
|
||||
video_mediatype_GetUINT64,
|
||||
video_mediatype_GetDouble,
|
||||
video_mediatype_GetGUID,
|
||||
video_mediatype_GetStringLength,
|
||||
video_mediatype_GetString,
|
||||
video_mediatype_GetAllocatedString,
|
||||
video_mediatype_GetBlobSize,
|
||||
video_mediatype_GetBlob,
|
||||
video_mediatype_GetAllocatedBlob,
|
||||
video_mediatype_GetUnknown,
|
||||
video_mediatype_SetItem,
|
||||
video_mediatype_DeleteItem,
|
||||
video_mediatype_DeleteAllItems,
|
||||
video_mediatype_SetUINT32,
|
||||
video_mediatype_SetUINT64,
|
||||
video_mediatype_SetDouble,
|
||||
video_mediatype_SetGUID,
|
||||
video_mediatype_SetString,
|
||||
video_mediatype_SetBlob,
|
||||
video_mediatype_SetUnknown,
|
||||
video_mediatype_LockStore,
|
||||
video_mediatype_UnlockStore,
|
||||
video_mediatype_GetCount,
|
||||
video_mediatype_GetItemByIndex,
|
||||
video_mediatype_CopyAllItems,
|
||||
video_mediatype_GetMajorType,
|
||||
video_mediatype_IsCompressedFormat,
|
||||
video_mediatype_IsEqual,
|
||||
video_mediatype_GetRepresentation,
|
||||
video_mediatype_FreeRepresentation,
|
||||
video_mediatype_GetVideoFormat,
|
||||
video_mediatype_GetVideoRepresentation,
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
* MFCreateMediaType (mfplat.@)
|
||||
*/
|
||||
|
@ -2608,133 +2171,3 @@ HRESULT WINAPI MFInitMediaTypeFromWaveFormatEx(IMFMediaType *mediatype, const WA
|
|||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MFCreateVideoMediaTypeFromSubtype (mfplat.@)
|
||||
*/
|
||||
HRESULT WINAPI MFCreateVideoMediaTypeFromSubtype(const GUID *subtype, IMFVideoMediaType **media_type)
|
||||
{
|
||||
struct media_type *object;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%s, %p.\n", debugstr_guid(subtype), media_type);
|
||||
|
||||
if (!media_type)
|
||||
return E_INVALIDARG;
|
||||
|
||||
object = heap_alloc(sizeof(*object));
|
||||
if (!object)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (FAILED(hr = init_attributes_object(&object->attributes, 0)))
|
||||
{
|
||||
heap_free(object);
|
||||
return hr;
|
||||
}
|
||||
object->IMFVideoMediaType_iface.lpVtbl = &videomediatypevtbl;
|
||||
|
||||
IMFVideoMediaType_SetGUID(&object->IMFVideoMediaType_iface, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
|
||||
IMFVideoMediaType_SetGUID(&object->IMFVideoMediaType_iface, &MF_MT_SUBTYPE, subtype);
|
||||
|
||||
*media_type = &object->IMFVideoMediaType_iface;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void media_type_get_ratio(UINT64 value, UINT32 *numerator, UINT32 *denominator)
|
||||
{
|
||||
*numerator = value >> 32;
|
||||
*denominator = value;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MFCreateMFVideoFormatFromMFMediaType (mfplat.@)
|
||||
*/
|
||||
HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MFVIDEOFORMAT **video_format, UINT32 *size)
|
||||
{
|
||||
UINT32 flags, palette_size = 0, avgrate;
|
||||
MFVIDEOFORMAT *format;
|
||||
UINT64 value;
|
||||
INT32 stride;
|
||||
GUID guid;
|
||||
|
||||
TRACE("%p, %p, %p.\n", media_type, video_format, size);
|
||||
|
||||
*size = sizeof(*format);
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetBlobSize(media_type, &MF_MT_PALETTE, &palette_size)))
|
||||
*size += palette_size;
|
||||
|
||||
if (!(format = CoTaskMemAlloc(*size)))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
*video_format = format;
|
||||
|
||||
memset(format, 0, sizeof(*format));
|
||||
format->dwSize = *size;
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &guid)))
|
||||
{
|
||||
memcpy(&format->guidFormat, &guid, sizeof(guid));
|
||||
format->surfaceInfo.Format = guid.Data1;
|
||||
}
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &value)))
|
||||
media_type_get_ratio(value, &format->videoInfo.dwWidth, &format->videoInfo.dwHeight);
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT64(media_type, &MF_MT_PIXEL_ASPECT_RATIO, &value)))
|
||||
{
|
||||
media_type_get_ratio(value, &format->videoInfo.PixelAspectRatio.Numerator,
|
||||
&format->videoInfo.PixelAspectRatio.Denominator);
|
||||
}
|
||||
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_VIDEO_CHROMA_SITING, &format->videoInfo.SourceChromaSubsampling);
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_INTERLACE_MODE, &format->videoInfo.InterlaceMode);
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_TRANSFER_FUNCTION, &format->videoInfo.TransferFunction);
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_VIDEO_PRIMARIES, &format->videoInfo.ColorPrimaries);
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_YUV_MATRIX, &format->videoInfo.TransferMatrix);
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_VIDEO_LIGHTING, &format->videoInfo.SourceLighting);
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_RATE, &value)))
|
||||
{
|
||||
media_type_get_ratio(value, &format->videoInfo.FramesPerSecond.Numerator,
|
||||
&format->videoInfo.FramesPerSecond.Denominator);
|
||||
}
|
||||
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_VIDEO_NOMINAL_RANGE, &format->videoInfo.NominalRange);
|
||||
IMFMediaType_GetBlob(media_type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)&format->videoInfo.GeometricAperture,
|
||||
sizeof(format->videoInfo.GeometricAperture), NULL);
|
||||
IMFMediaType_GetBlob(media_type, &MF_MT_MINIMUM_DISPLAY_APERTURE, (UINT8 *)&format->videoInfo.MinimumDisplayAperture,
|
||||
sizeof(format->videoInfo.MinimumDisplayAperture), NULL);
|
||||
|
||||
/* Video flags. */
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_PAD_CONTROL_FLAGS, &flags)))
|
||||
format->videoInfo.VideoFlags |= flags;
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_SOURCE_CONTENT_HINT, &flags)))
|
||||
format->videoInfo.VideoFlags |= flags;
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_DRM_FLAGS, &flags)))
|
||||
format->videoInfo.VideoFlags |= flags;
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_PAN_SCAN_ENABLED, &flags)) && !!flags)
|
||||
{
|
||||
format->videoInfo.VideoFlags |= MFVideoFlag_PanScanEnabled;
|
||||
IMFMediaType_GetBlob(media_type, &MF_MT_PAN_SCAN_APERTURE, (UINT8 *)&format->videoInfo.PanScanAperture,
|
||||
sizeof(format->videoInfo.PanScanAperture), NULL);
|
||||
}
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_DEFAULT_STRIDE, (UINT32 *)&stride)) && stride < 0)
|
||||
format->videoInfo.VideoFlags |= MFVideoFlag_BottomUpLinearRep;
|
||||
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BITRATE, &avgrate)))
|
||||
format->compressedInfo.AvgBitrate = avgrate;
|
||||
if (SUCCEEDED(IMFMediaType_GetUINT32(media_type, &MF_MT_AVG_BIT_ERROR_RATE, &avgrate)))
|
||||
format->compressedInfo.AvgBitErrorRate = avgrate;
|
||||
IMFMediaType_GetUINT32(media_type, &MF_MT_MAX_KEYFRAME_SPACING, &format->compressedInfo.MaxKeyFrameSpacing);
|
||||
|
||||
/* Palette. */
|
||||
if (palette_size)
|
||||
{
|
||||
format->surfaceInfo.PaletteEntries = palette_size / sizeof(*format->surfaceInfo.Palette);
|
||||
IMFMediaType_GetBlob(media_type, &MF_MT_PALETTE, (UINT8 *)format->surfaceInfo.Palette, palette_size, NULL);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
@ stdcall MFCreateMFByteStreamOnStream(ptr ptr)
|
||||
@ stdcall MFCreateMFByteStreamOnStreamEx(ptr ptr)
|
||||
@ stdcall MFCreateMFByteStreamWrapper(ptr ptr)
|
||||
@ stdcall MFCreateMFVideoFormatFromMFMediaType(ptr ptr ptr)
|
||||
@ stub MFCreateMFVideoFormatFromMFMediaType
|
||||
@ stdcall MFCreateMediaBufferFromMediaType(ptr int64 long long ptr)
|
||||
@ stub MFCreateMediaBufferWrapper
|
||||
@ stdcall MFCreateMediaEvent(long ptr long ptr ptr)
|
||||
|
@ -76,7 +76,7 @@
|
|||
@ stub MFCreateVideoMediaType
|
||||
@ stub MFCreateVideoMediaTypeFromBitMapInfoHeader
|
||||
@ stub MFCreateVideoMediaTypeFromBitMapInfoHeaderEx
|
||||
@ stdcall MFCreateVideoMediaTypeFromSubtype(ptr ptr)
|
||||
@ stub MFCreateVideoMediaTypeFromSubtype
|
||||
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader2
|
||||
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader
|
||||
@ stdcall MFCreateWaveFormatExFromMFMediaType(ptr ptr ptr long)
|
||||
|
|
|
@ -5262,25 +5262,6 @@ static void test_MFInitMediaTypeFromWaveFormatEx(void)
|
|||
IMFMediaType_Release(mediatype);
|
||||
}
|
||||
|
||||
static void test_MFCreateMFVideoFormatFromMFMediaType(void)
|
||||
{
|
||||
MFVIDEOFORMAT *video_format;
|
||||
IMFMediaType *media_type;
|
||||
UINT32 size;
|
||||
HRESULT hr;
|
||||
|
||||
hr = MFCreateMediaType(&media_type);
|
||||
ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
|
||||
|
||||
hr = MFCreateMFVideoFormatFromMFMediaType(media_type, &video_format, &size);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
ok(!!video_format, "Unexpected format.\n");
|
||||
ok(video_format->dwSize == size && size == sizeof(*video_format), "Unexpected size %u.\n", size);
|
||||
CoTaskMemFree(video_format);
|
||||
|
||||
IMFMediaType_Release(media_type);
|
||||
}
|
||||
|
||||
START_TEST(mfplat)
|
||||
{
|
||||
char **argv;
|
||||
|
@ -5336,7 +5317,6 @@ START_TEST(mfplat)
|
|||
test_MFCreate2DMediaBuffer();
|
||||
test_MFCreateMediaBufferFromMediaType();
|
||||
test_MFInitMediaTypeFromWaveFormatEx();
|
||||
test_MFCreateMFVideoFormatFromMFMediaType();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
|
@ -53,15 +53,6 @@ struct listen_socket_callback_context
|
|||
SOCKET acceptor;
|
||||
};
|
||||
|
||||
#define MAX_PENDING_IO 10
|
||||
|
||||
struct wsk_pending_io
|
||||
{
|
||||
OVERLAPPED ovr;
|
||||
TP_WAIT *tp_wait;
|
||||
IRP *irp;
|
||||
};
|
||||
|
||||
struct wsk_socket_internal
|
||||
{
|
||||
WSK_SOCKET wsk_socket;
|
||||
|
@ -72,11 +63,12 @@ struct wsk_socket_internal
|
|||
ADDRESS_FAMILY address_family;
|
||||
USHORT socket_type;
|
||||
ULONG protocol;
|
||||
OVERLAPPED ovr;
|
||||
TP_WAIT *tp_wait;
|
||||
IRP *pending_irp;
|
||||
|
||||
CRITICAL_SECTION cs_socket;
|
||||
|
||||
struct wsk_pending_io pending_io[MAX_PENDING_IO];
|
||||
|
||||
union
|
||||
{
|
||||
struct listen_socket_callback_context listen_socket_callback_context;
|
||||
|
@ -142,9 +134,14 @@ static inline void unlock_socket(struct wsk_socket_internal *socket)
|
|||
LeaveCriticalSection(&socket->cs_socket);
|
||||
}
|
||||
|
||||
static void socket_init(struct wsk_socket_internal *socket)
|
||||
static void socket_init(struct wsk_socket_internal *socket, PTP_WAIT_CALLBACK socket_async_callback)
|
||||
{
|
||||
InitializeCriticalSection(&socket->cs_socket);
|
||||
if (socket_async_callback)
|
||||
{
|
||||
socket->ovr.hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
socket->tp_wait = CreateThreadpoolWait(socket_async_callback, socket, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void dispatch_irp(IRP *irp, NTSTATUS status)
|
||||
|
@ -155,56 +152,6 @@ static void dispatch_irp(IRP *irp, NTSTATUS status)
|
|||
IoCompleteRequest(irp, IO_NO_INCREMENT);
|
||||
}
|
||||
|
||||
static struct wsk_pending_io *allocate_pending_io(struct wsk_socket_internal *socket,
|
||||
PTP_WAIT_CALLBACK socket_async_callback, IRP *irp)
|
||||
{
|
||||
struct wsk_pending_io *io = socket->pending_io;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(socket->pending_io); ++i)
|
||||
if (!io[i].irp)
|
||||
break;
|
||||
|
||||
if (i == ARRAY_SIZE(socket->pending_io))
|
||||
{
|
||||
FIXME("Pending io requests count exceeds limit.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
io[i].irp = irp;
|
||||
|
||||
if (io[i].tp_wait)
|
||||
return &io[i];
|
||||
|
||||
io[i].ovr.hEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
io[i].tp_wait = CreateThreadpoolWait(socket_async_callback, socket, NULL);
|
||||
|
||||
return &io[i];
|
||||
}
|
||||
|
||||
static struct wsk_pending_io *find_pending_io(struct wsk_socket_internal *socket, TP_WAIT *tp_wait)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(socket->pending_io); ++i)
|
||||
{
|
||||
if (socket->pending_io[i].tp_wait == tp_wait)
|
||||
return &socket->pending_io[i];
|
||||
}
|
||||
|
||||
FIXME("Pending io not found for tp_wait %p.\n", tp_wait);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void dispatch_pending_io(struct wsk_pending_io *io, NTSTATUS status, ULONG_PTR information)
|
||||
{
|
||||
TRACE("io %p, status %#x, information %#lx.\n", io, status, information);
|
||||
|
||||
io->irp->IoStatus.Information = information;
|
||||
dispatch_irp(io->irp, status);
|
||||
io->irp = NULL;
|
||||
}
|
||||
|
||||
static NTSTATUS WINAPI wsk_control_socket(WSK_SOCKET *socket, WSK_CONTROL_SOCKET_TYPE request_type,
|
||||
ULONG control_code, ULONG level, SIZE_T input_size, void *input_buffer, SIZE_T output_size,
|
||||
void *output_buffer, SIZE_T *output_size_returned, IRP *irp)
|
||||
|
@ -221,29 +168,18 @@ static NTSTATUS WINAPI wsk_close_socket(WSK_SOCKET *socket, IRP *irp)
|
|||
{
|
||||
struct wsk_socket_internal *s = wsk_socket_internal_from_wsk_socket(socket);
|
||||
NTSTATUS status;
|
||||
unsigned int i;
|
||||
|
||||
TRACE("socket %p, irp %p.\n", socket, irp);
|
||||
|
||||
lock_socket(s);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(s->pending_io); ++i)
|
||||
if (s->tp_wait)
|
||||
{
|
||||
struct wsk_pending_io *io = &s->pending_io[i];
|
||||
|
||||
if (io->tp_wait)
|
||||
{
|
||||
CancelIoEx((HANDLE)s->s, &io->ovr);
|
||||
SetThreadpoolWait(io->tp_wait, NULL, NULL);
|
||||
unlock_socket(s);
|
||||
WaitForThreadpoolWaitCallbacks(io->tp_wait, FALSE);
|
||||
lock_socket(s);
|
||||
CloseThreadpoolWait(io->tp_wait);
|
||||
CloseHandle(io->ovr.hEvent);
|
||||
}
|
||||
|
||||
if (io->irp)
|
||||
dispatch_pending_io(io, STATUS_CANCELLED, 0);
|
||||
CancelIoEx((HANDLE)s->s, &s->ovr);
|
||||
unlock_socket(s);
|
||||
WaitForThreadpoolWaitCallbacks(s->tp_wait, FALSE);
|
||||
lock_socket(s);
|
||||
CloseThreadpoolWait(s->tp_wait);
|
||||
}
|
||||
|
||||
if (s->flags & WSK_FLAG_LISTEN_SOCKET && s->callback_context.listen_socket_callback_context.acceptor)
|
||||
|
@ -251,6 +187,15 @@ static NTSTATUS WINAPI wsk_close_socket(WSK_SOCKET *socket, IRP *irp)
|
|||
|
||||
status = closesocket(s->s) ? sock_error_to_ntstatus(WSAGetLastError()) : STATUS_SUCCESS;
|
||||
|
||||
if (s->ovr.hEvent)
|
||||
CloseHandle(s->ovr.hEvent);
|
||||
|
||||
if (s->pending_irp)
|
||||
{
|
||||
s->pending_irp->IoStatus.Information = 0;
|
||||
dispatch_irp(s->pending_irp, STATUS_CANCELLED);
|
||||
}
|
||||
|
||||
unlock_socket(s);
|
||||
DeleteCriticalSection(&s->cs_socket);
|
||||
heap_free(socket);
|
||||
|
@ -285,16 +230,18 @@ static NTSTATUS WINAPI wsk_bind(WSK_SOCKET *socket, SOCKADDR *local_address, ULO
|
|||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
static void create_accept_socket(struct wsk_socket_internal *socket, struct wsk_pending_io *io)
|
||||
static void create_accept_socket(struct wsk_socket_internal *socket)
|
||||
{
|
||||
struct listen_socket_callback_context *context
|
||||
= &socket->callback_context.listen_socket_callback_context;
|
||||
struct wsk_socket_internal *accept_socket;
|
||||
NTSTATUS status;
|
||||
|
||||
if (!(accept_socket = heap_alloc_zero(sizeof(*accept_socket))))
|
||||
{
|
||||
ERR("No memory.\n");
|
||||
dispatch_pending_io(io, STATUS_NO_MEMORY, 0);
|
||||
status = STATUS_NO_MEMORY;
|
||||
socket->pending_irp->IoStatus.Information = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -307,11 +254,15 @@ static void create_accept_socket(struct wsk_socket_internal *socket, struct wsk_
|
|||
accept_socket->address_family = socket->address_family;
|
||||
accept_socket->protocol = socket->protocol;
|
||||
accept_socket->flags = WSK_FLAG_CONNECTION_SOCKET;
|
||||
socket_init(accept_socket);
|
||||
socket_init(accept_socket, NULL);
|
||||
/* TODO: fill local and remote addresses. */
|
||||
|
||||
dispatch_pending_io(io, STATUS_SUCCESS, (ULONG_PTR)&accept_socket->wsk_socket);
|
||||
socket->pending_irp->IoStatus.Information = (ULONG_PTR)&accept_socket->wsk_socket;
|
||||
status = STATUS_SUCCESS;
|
||||
}
|
||||
TRACE("status %#x.\n", status);
|
||||
dispatch_irp(socket->pending_irp, status);
|
||||
socket->pending_irp = NULL;
|
||||
}
|
||||
|
||||
static void WINAPI accept_callback(TP_CALLBACK_INSTANCE *instance, void *socket_, TP_WAIT *wait,
|
||||
|
@ -319,24 +270,24 @@ static void WINAPI accept_callback(TP_CALLBACK_INSTANCE *instance, void *socket_
|
|||
{
|
||||
struct listen_socket_callback_context *context;
|
||||
struct wsk_socket_internal *socket = socket_;
|
||||
struct wsk_pending_io *io;
|
||||
DWORD size;
|
||||
|
||||
TRACE("instance %p, socket %p, wait %p, wait_result %#x.\n", instance, socket, wait, wait_result);
|
||||
|
||||
lock_socket(socket);
|
||||
context = &socket->callback_context.listen_socket_callback_context;
|
||||
io = find_pending_io(socket, wait);
|
||||
|
||||
if (GetOverlappedResult((HANDLE)socket->s, &io->ovr, &size, FALSE))
|
||||
if (GetOverlappedResult((HANDLE)socket->s, &socket->ovr, &size, FALSE))
|
||||
{
|
||||
create_accept_socket(socket, io);
|
||||
create_accept_socket(socket);
|
||||
}
|
||||
else
|
||||
{
|
||||
closesocket(context->acceptor);
|
||||
context->acceptor = 0;
|
||||
dispatch_pending_io(io, io->ovr.Internal, 0);
|
||||
socket->pending_irp->IoStatus.Information = 0;
|
||||
dispatch_irp(socket->pending_irp, socket->ovr.Internal);
|
||||
socket->pending_irp = NULL;
|
||||
}
|
||||
unlock_socket(socket);
|
||||
}
|
||||
|
@ -363,8 +314,8 @@ static NTSTATUS WINAPI wsk_accept(WSK_SOCKET *listen_socket, ULONG flags, void *
|
|||
struct wsk_socket_internal *s = wsk_socket_internal_from_wsk_socket(listen_socket);
|
||||
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
|
||||
struct listen_socket_callback_context *context;
|
||||
struct wsk_pending_io *io;
|
||||
SOCKET acceptor;
|
||||
NTSTATUS status;
|
||||
DWORD size;
|
||||
int error;
|
||||
|
||||
|
@ -378,47 +329,44 @@ static NTSTATUS WINAPI wsk_accept(WSK_SOCKET *listen_socket, ULONG flags, void *
|
|||
|
||||
if (!InitOnceExecuteOnce(&init_once, init_accept_functions, (void *)s->s, NULL))
|
||||
{
|
||||
dispatch_irp(irp, STATUS_UNSUCCESSFUL);
|
||||
return STATUS_PENDING;
|
||||
status = STATUS_UNSUCCESSFUL;
|
||||
dispatch_irp(irp, status);
|
||||
return status;
|
||||
}
|
||||
|
||||
lock_socket(s);
|
||||
if (!(io = allocate_pending_io(s, accept_callback, irp)))
|
||||
{
|
||||
irp->IoStatus.Information = 0;
|
||||
dispatch_irp(irp, STATUS_UNSUCCESSFUL);
|
||||
unlock_socket(s);
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
context = &s->callback_context.listen_socket_callback_context;
|
||||
if ((acceptor = WSASocketW(s->address_family, s->socket_type, s->protocol, NULL, 0, WSA_FLAG_OVERLAPPED))
|
||||
== INVALID_SOCKET)
|
||||
{
|
||||
dispatch_pending_io(io, sock_error_to_ntstatus(WSAGetLastError()), 0);
|
||||
status = sock_error_to_ntstatus(WSAGetLastError());
|
||||
dispatch_irp(irp, status);
|
||||
unlock_socket(s);
|
||||
return STATUS_PENDING;
|
||||
return status;
|
||||
}
|
||||
|
||||
s->pending_irp = irp;
|
||||
context->remote_address = remote_address;
|
||||
context->client_dispatch = accept_socket_dispatch;
|
||||
context->client_context = accept_socket_context;
|
||||
context->acceptor = acceptor;
|
||||
|
||||
if (pAcceptEx(s->s, acceptor, context->addr_buffer, 0,
|
||||
sizeof(SOCKADDR) + 16, sizeof(SOCKADDR) + 16, &size, &io->ovr))
|
||||
sizeof(SOCKADDR) + 16, sizeof(SOCKADDR) + 16, &size, &s->ovr))
|
||||
{
|
||||
create_accept_socket(s, io);
|
||||
create_accept_socket(s);
|
||||
}
|
||||
else if ((error = WSAGetLastError()) == ERROR_IO_PENDING)
|
||||
{
|
||||
SetThreadpoolWait(io->tp_wait, io->ovr.hEvent, NULL);
|
||||
SetThreadpoolWait(s->tp_wait, s->ovr.hEvent, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
closesocket(acceptor);
|
||||
context->acceptor = 0;
|
||||
dispatch_pending_io(io, sock_error_to_ntstatus(error), 0);
|
||||
irp->IoStatus.Information = 0;
|
||||
dispatch_irp(irp, sock_error_to_ntstatus(error));
|
||||
s->pending_irp = NULL;
|
||||
}
|
||||
unlock_socket(s);
|
||||
|
||||
|
@ -467,100 +415,18 @@ static NTSTATUS WINAPI wsk_get_remote_address(WSK_SOCKET *socket, SOCKADDR *remo
|
|||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static void WINAPI send_receive_callback(TP_CALLBACK_INSTANCE *instance, void *socket_, TP_WAIT *wait,
|
||||
TP_WAIT_RESULT wait_result)
|
||||
{
|
||||
struct wsk_socket_internal *socket = socket_;
|
||||
struct wsk_pending_io *io;
|
||||
DWORD length, flags;
|
||||
|
||||
TRACE("instance %p, socket %p, wait %p, wait_result %#x.\n", instance, socket, wait, wait_result);
|
||||
|
||||
lock_socket(socket);
|
||||
io = find_pending_io(socket, wait);
|
||||
|
||||
if (WSAGetOverlappedResult(socket->s, &io->ovr, &length, FALSE, &flags))
|
||||
dispatch_pending_io(io, STATUS_SUCCESS, length);
|
||||
else
|
||||
dispatch_pending_io(io, io->ovr.Internal, 0);
|
||||
|
||||
unlock_socket(socket);
|
||||
}
|
||||
|
||||
static NTSTATUS WINAPI do_send_receive(WSK_SOCKET *socket, WSK_BUF *wsk_buf, ULONG flags, IRP *irp, BOOL is_send)
|
||||
{
|
||||
struct wsk_socket_internal *s = wsk_socket_internal_from_wsk_socket(socket);
|
||||
struct wsk_pending_io *io;
|
||||
DWORD wsa_flags;
|
||||
WSABUF wsa_buf;
|
||||
DWORD length;
|
||||
int error;
|
||||
|
||||
TRACE("socket %p, buffer %p, flags %#x, irp %p, is_send %#x.\n",
|
||||
socket, wsk_buf, flags, irp, is_send);
|
||||
|
||||
if (!irp)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
if (!wsk_buf->Mdl && wsk_buf->Length)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
if (wsk_buf->Mdl && wsk_buf->Mdl->Next)
|
||||
{
|
||||
FIXME("Chained MDLs are not supported.\n");
|
||||
irp->IoStatus.Information = 0;
|
||||
dispatch_irp(irp, STATUS_UNSUCCESSFUL);
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
if (flags)
|
||||
FIXME("flags %#x not implemented.\n", flags);
|
||||
|
||||
lock_socket(s);
|
||||
if (!(io = allocate_pending_io(s, send_receive_callback, irp)))
|
||||
{
|
||||
irp->IoStatus.Information = 0;
|
||||
dispatch_irp(irp, STATUS_UNSUCCESSFUL);
|
||||
unlock_socket(s);
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
wsa_buf.len = wsk_buf->Length;
|
||||
wsa_buf.buf = wsk_buf->Mdl ? (CHAR *)wsk_buf->Mdl->StartVa
|
||||
+ wsk_buf->Mdl->ByteOffset + wsk_buf->Offset : NULL;
|
||||
|
||||
wsa_flags = 0;
|
||||
|
||||
if (!(is_send ? WSASend(s->s, &wsa_buf, 1, &length, wsa_flags, &io->ovr, NULL)
|
||||
: WSARecv(s->s, &wsa_buf, 1, &length, &wsa_flags, &io->ovr, NULL)))
|
||||
{
|
||||
dispatch_pending_io(io, STATUS_SUCCESS, length);
|
||||
}
|
||||
else if ((error = WSAGetLastError()) == WSA_IO_PENDING)
|
||||
{
|
||||
SetThreadpoolWait(io->tp_wait, io->ovr.hEvent, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
dispatch_pending_io(io, sock_error_to_ntstatus(error), 0);
|
||||
}
|
||||
unlock_socket(s);
|
||||
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
static NTSTATUS WINAPI wsk_send(WSK_SOCKET *socket, WSK_BUF *buffer, ULONG flags, IRP *irp)
|
||||
{
|
||||
TRACE("socket %p, buffer %p, flags %#x, irp %p.\n", socket, buffer, flags, irp);
|
||||
FIXME("socket %p, buffer %p, flags %#x, irp %p stub.\n", socket, buffer, flags, irp);
|
||||
|
||||
return do_send_receive(socket, buffer, flags, irp, TRUE);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static NTSTATUS WINAPI wsk_receive(WSK_SOCKET *socket, WSK_BUF *buffer, ULONG flags, IRP *irp)
|
||||
{
|
||||
TRACE("socket %p, buffer %p, flags %#x, irp %p.\n", socket, buffer, flags, irp);
|
||||
FIXME("socket %p, buffer %p, flags %#x, irp %p stub.\n", socket, buffer, flags, irp);
|
||||
|
||||
return do_send_receive(socket, buffer, flags, irp, FALSE);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static NTSTATUS WINAPI wsk_disconnect(WSK_SOCKET *socket, WSK_BUF *buffer, ULONG flags, IRP *irp)
|
||||
|
@ -624,6 +490,7 @@ static NTSTATUS WINAPI wsk_socket(WSK_CLIENT *client, ADDRESS_FAMILY address_fam
|
|||
PETHREAD owning_thread, SECURITY_DESCRIPTOR *security_descriptor, IRP *irp)
|
||||
{
|
||||
struct wsk_socket_internal *socket;
|
||||
PTP_WAIT_CALLBACK async_callback;
|
||||
NTSTATUS status;
|
||||
SOCKET s;
|
||||
|
||||
|
@ -665,6 +532,7 @@ static NTSTATUS WINAPI wsk_socket(WSK_CLIENT *client, ADDRESS_FAMILY address_fam
|
|||
{
|
||||
case WSK_FLAG_LISTEN_SOCKET:
|
||||
socket->wsk_socket.Dispatch = &wsk_provider_listen_dispatch;
|
||||
async_callback = accept_callback;
|
||||
break;
|
||||
|
||||
case WSK_FLAG_CONNECTION_SOCKET:
|
||||
|
@ -679,7 +547,7 @@ static NTSTATUS WINAPI wsk_socket(WSK_CLIENT *client, ADDRESS_FAMILY address_fam
|
|||
goto done;
|
||||
}
|
||||
|
||||
socket_init(socket);
|
||||
socket_init(socket, async_callback);
|
||||
|
||||
irp->IoStatus.Information = (ULONG_PTR)&socket->wsk_socket;
|
||||
status = STATUS_SUCCESS;
|
||||
|
|
|
@ -25,11 +25,76 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#ifdef HAVE_MNTENT_H
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SYSCALL_H
|
||||
# include <sys/syscall.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_ATTR_H
|
||||
#include <sys/attr.h>
|
||||
#endif
|
||||
#ifdef MAJOR_IN_MKDEV
|
||||
# include <sys/mkdev.h>
|
||||
#elif defined(MAJOR_IN_SYSMACROS)
|
||||
# include <sys/sysmacros.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_VNODE_H
|
||||
# ifdef HAVE_STDINT_H
|
||||
# include <stdint.h> /* needed for kfreebsd */
|
||||
# endif
|
||||
/* Work around a conflict with Solaris' system list defined in sys/list.h. */
|
||||
#define list SYSLIST
|
||||
#define list_next SYSLIST_NEXT
|
||||
#define list_prev SYSLIST_PREV
|
||||
#define list_head SYSLIST_HEAD
|
||||
#define list_tail SYSLIST_TAIL
|
||||
#define list_move_tail SYSLIST_MOVE_TAIL
|
||||
#define list_remove SYSLIST_REMOVE
|
||||
#include <sys/vnode.h>
|
||||
#undef list
|
||||
#undef list_next
|
||||
#undef list_prev
|
||||
#undef list_head
|
||||
#undef list_tail
|
||||
#undef list_move_tail
|
||||
#undef list_remove
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_IOCTL_H
|
||||
#include <linux/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_LINUX_MAJOR_H
|
||||
# include <linux/major.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_MOUNT_H
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
|
@ -45,9 +110,73 @@
|
|||
#include "wine/exception.h"
|
||||
|
||||
#define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
|
||||
#define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/')
|
||||
|
||||
static BOOL show_dot_files;
|
||||
|
||||
static RTL_CRITICAL_SECTION dir_section;
|
||||
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
{
|
||||
0, 0, &dir_section,
|
||||
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
|
||||
0, 0, { (DWORD_PTR)(__FILE__ ": dir_section") }
|
||||
};
|
||||
static RTL_CRITICAL_SECTION dir_section = { &critsect_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DIR_get_drives_info
|
||||
*
|
||||
* Retrieve device/inode number for all the drives. Helper for find_drive_root.
|
||||
*/
|
||||
unsigned int DIR_get_drives_info( struct drive_info info[MAX_DOS_DRIVES] )
|
||||
{
|
||||
static struct drive_info cache[MAX_DOS_DRIVES];
|
||||
static time_t last_update;
|
||||
static unsigned int nb_drives;
|
||||
unsigned int ret;
|
||||
time_t now = time(NULL);
|
||||
|
||||
RtlEnterCriticalSection( &dir_section );
|
||||
if (now != last_update)
|
||||
{
|
||||
char *buffer, *p;
|
||||
struct stat st;
|
||||
unsigned int i;
|
||||
|
||||
if ((buffer = RtlAllocateHeap( GetProcessHeap(), 0,
|
||||
strlen(config_dir) + sizeof("/dosdevices/a:") )))
|
||||
{
|
||||
strcpy( buffer, config_dir );
|
||||
strcat( buffer, "/dosdevices/a:" );
|
||||
p = buffer + strlen(buffer) - 2;
|
||||
|
||||
for (i = nb_drives = 0; i < MAX_DOS_DRIVES; i++)
|
||||
{
|
||||
*p = 'a' + i;
|
||||
if (!stat( buffer, &st ))
|
||||
{
|
||||
cache[i].dev = st.st_dev;
|
||||
cache[i].ino = st.st_ino;
|
||||
nb_drives++;
|
||||
}
|
||||
else
|
||||
{
|
||||
cache[i].dev = 0;
|
||||
cache[i].ino = 0;
|
||||
}
|
||||
}
|
||||
RtlFreeHeap( GetProcessHeap(), 0, buffer );
|
||||
}
|
||||
last_update = now;
|
||||
}
|
||||
memcpy( info, cache, sizeof(cache) );
|
||||
ret = nb_drives;
|
||||
RtlLeaveCriticalSection( &dir_section );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* init_directories
|
||||
*/
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#define NONAMELESSSTRUCT
|
||||
#include "windef.h"
|
||||
#include "winnt.h"
|
||||
#include "winioctl.h"
|
||||
#include "winternl.h"
|
||||
#include "delayloadhandler.h"
|
||||
|
||||
|
@ -123,16 +122,12 @@ static const char * const reason_names[] =
|
|||
|
||||
static const WCHAR dllW[] = {'.','d','l','l',0};
|
||||
|
||||
struct file_id
|
||||
{
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
/* internal representation of loaded modules */
|
||||
/* internal representation of 32bit modules. per process. */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
LDR_DATA_TABLE_ENTRY ldr;
|
||||
struct file_id id;
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
void *so_handle;
|
||||
int alloc_deps;
|
||||
int nDeps;
|
||||
|
@ -559,11 +554,12 @@ static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name )
|
|||
* Find a module from its file id.
|
||||
* The loader_section must be locked while calling this function
|
||||
*/
|
||||
static WINE_MODREF *find_fileid_module( const struct file_id *id )
|
||||
static WINE_MODREF *find_fileid_module( struct stat *st )
|
||||
{
|
||||
LIST_ENTRY *mark, *entry;
|
||||
|
||||
if (cached_modref && !memcmp( &cached_modref->id, id, sizeof(*id) )) return cached_modref;
|
||||
if (cached_modref && cached_modref->dev == st->st_dev && cached_modref->ino == st->st_ino)
|
||||
return cached_modref;
|
||||
|
||||
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
|
||||
for (entry = mark->Flink; entry != mark; entry = entry->Flink)
|
||||
|
@ -571,7 +567,7 @@ static WINE_MODREF *find_fileid_module( const struct file_id *id )
|
|||
LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks );
|
||||
WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr );
|
||||
|
||||
if (!memcmp( &wm->id, id, sizeof(*id) ))
|
||||
if (wm->dev == st->st_dev && wm->ino == st->st_ino)
|
||||
{
|
||||
cached_modref = wm;
|
||||
return wm;
|
||||
|
@ -2307,16 +2303,16 @@ static NTSTATUS get_dll_load_path_search_flags( LPCWSTR module, DWORD flags, WCH
|
|||
* Open a file for a new dll. Helper for find_dll_file.
|
||||
*/
|
||||
static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm,
|
||||
void **module, pe_image_info_t *image_info, struct file_id *id )
|
||||
void **module, pe_image_info_t *image_info, struct stat *st )
|
||||
{
|
||||
FILE_BASIC_INFORMATION info;
|
||||
OBJECT_ATTRIBUTES attr;
|
||||
IO_STATUS_BLOCK io;
|
||||
LARGE_INTEGER size;
|
||||
FILE_OBJECTID_BUFFER fid;
|
||||
SIZE_T len = 0;
|
||||
NTSTATUS status;
|
||||
HANDLE handle, mapping;
|
||||
int fd, needs_close;
|
||||
|
||||
if ((*pwm = find_fullname_module( nt_name )))
|
||||
{
|
||||
|
@ -2346,10 +2342,11 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm,
|
|||
return STATUS_DLL_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!NtFsControlFile( handle, 0, NULL, NULL, &io, FSCTL_GET_OBJECT_ID, NULL, 0, &fid, sizeof(fid) ))
|
||||
if (!unix_funcs->server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL ))
|
||||
{
|
||||
memcpy( id, fid.ObjectId, sizeof(*id) );
|
||||
if ((*pwm = find_fileid_module( id )))
|
||||
fstat( fd, st );
|
||||
if (needs_close) close( fd );
|
||||
if ((*pwm = find_fileid_module( st )))
|
||||
{
|
||||
TRACE( "%s is the same file as existing module %p %s\n", debugstr_w( nt_name->Buffer ),
|
||||
(*pwm)->ldr.DllBase, debugstr_w( (*pwm)->ldr.FullDllName.Buffer ));
|
||||
|
@ -2393,8 +2390,8 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm,
|
|||
* load_native_dll (internal)
|
||||
*/
|
||||
static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, void **module,
|
||||
const pe_image_info_t *image_info, const struct file_id *id,
|
||||
DWORD flags, WINE_MODREF** pwm )
|
||||
const pe_image_info_t *image_info, DWORD flags, WINE_MODREF** pwm,
|
||||
struct stat *st )
|
||||
{
|
||||
IMAGE_NT_HEADERS *nt = RtlImageNtHeader( *module );
|
||||
WINE_MODREF *wm;
|
||||
|
@ -2412,7 +2409,8 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
|
|||
if (!(wm = alloc_module( *module, nt_name, (image_info->image_flags & IMAGE_FLAGS_WineBuiltin) )))
|
||||
return STATUS_NO_MEMORY;
|
||||
|
||||
wm->id = *id;
|
||||
wm->dev = st->st_dev;
|
||||
wm->ino = st->st_ino;
|
||||
if (image_info->loader_flags) wm->ldr.Flags |= LDR_COR_IMAGE;
|
||||
if (image_info->image_flags & IMAGE_FLAGS_ComPlusILOnly) wm->ldr.Flags |= LDR_COR_ILONLY;
|
||||
|
||||
|
@ -2523,7 +2521,7 @@ static inline char *prepend( char *buffer, const char *str, size_t len )
|
|||
* open_builtin_file
|
||||
*/
|
||||
static NTSTATUS open_builtin_file( char *name, WINE_MODREF **pwm, void **module,
|
||||
pe_image_info_t *image_info, struct file_id *id, char **so_name )
|
||||
pe_image_info_t *image_info, struct stat *st, char **so_name )
|
||||
{
|
||||
ANSI_STRING strA;
|
||||
UNICODE_STRING nt_name;
|
||||
|
@ -2534,7 +2532,7 @@ static NTSTATUS open_builtin_file( char *name, WINE_MODREF **pwm, void **module,
|
|||
RtlInitString( &strA, name );
|
||||
if ((status = wine_unix_to_nt_file_name( &strA, &nt_name ))) return status;
|
||||
|
||||
status = open_dll_file( &nt_name, pwm, module, image_info, id );
|
||||
status = open_dll_file( &nt_name, pwm, module, image_info, st );
|
||||
RtlFreeUnicodeString( &nt_name );
|
||||
|
||||
/* ignore non-builtins */
|
||||
|
@ -2571,8 +2569,9 @@ static NTSTATUS open_builtin_file( char *name, WINE_MODREF **pwm, void **module,
|
|||
/***********************************************************************
|
||||
* find_builtin_dll
|
||||
*/
|
||||
static NTSTATUS find_builtin_dll( const WCHAR *name, WINE_MODREF **pwm, void **module,
|
||||
pe_image_info_t *image_info, struct file_id *id, char **so_name )
|
||||
static NTSTATUS find_builtin_dll( const WCHAR *name, WINE_MODREF **pwm,
|
||||
void **module, pe_image_info_t *image_info, struct stat *st,
|
||||
char **so_name )
|
||||
{
|
||||
unsigned int i, pos, len, namelen, maxlen = 0;
|
||||
char *ptr, *file;
|
||||
|
@ -2609,7 +2608,7 @@ static NTSTATUS find_builtin_dll( const WCHAR *name, WINE_MODREF **pwm, void **m
|
|||
ptr = prepend( ptr, ptr, namelen );
|
||||
ptr = prepend( ptr, "/dlls", sizeof("/dlls") - 1 );
|
||||
ptr = prepend( ptr, build_dir, strlen(build_dir) );
|
||||
status = open_builtin_file( ptr, pwm, module, image_info, id, so_name );
|
||||
status = open_builtin_file( ptr, pwm, module, image_info, st, so_name );
|
||||
if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
|
||||
/* now as a program */
|
||||
|
@ -2620,7 +2619,7 @@ static NTSTATUS find_builtin_dll( const WCHAR *name, WINE_MODREF **pwm, void **m
|
|||
ptr = prepend( ptr, ptr, namelen );
|
||||
ptr = prepend( ptr, "/programs", sizeof("/programs") - 1 );
|
||||
ptr = prepend( ptr, build_dir, strlen(build_dir) );
|
||||
status = open_builtin_file( ptr, pwm, module, image_info, id, so_name );
|
||||
status = open_builtin_file( ptr, pwm, module, image_info, st, so_name );
|
||||
if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
}
|
||||
|
||||
|
@ -2628,7 +2627,7 @@ static NTSTATUS find_builtin_dll( const WCHAR *name, WINE_MODREF **pwm, void **m
|
|||
{
|
||||
file[pos + len + 1] = 0;
|
||||
ptr = prepend( file + pos, dll_paths[i], strlen(dll_paths[i]) );
|
||||
status = open_builtin_file( ptr, pwm, module, image_info, id, so_name );
|
||||
status = open_builtin_file( ptr, pwm, module, image_info, st, so_name );
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE;
|
||||
else if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
}
|
||||
|
@ -2761,7 +2760,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
|
|||
NTSTATUS status;
|
||||
void *module = NULL;
|
||||
pe_image_info_t image_info;
|
||||
struct file_id id;
|
||||
struct stat st;
|
||||
char *so_name;
|
||||
|
||||
/* Fix the name in case we have a full path and extension */
|
||||
|
@ -2773,7 +2772,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
|
|||
|
||||
if (!module_ptr) module_ptr = &module;
|
||||
|
||||
status = find_builtin_dll( name, pwm, module_ptr, &image_info, &id, &so_name );
|
||||
status = find_builtin_dll( name, pwm, module_ptr, &image_info, &st, &so_name );
|
||||
if (status) return status;
|
||||
|
||||
if (*pwm)
|
||||
|
@ -2788,7 +2787,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
|
|||
if (*module_ptr)
|
||||
{
|
||||
TRACE( "loading %s from PE builtin %s\n", debugstr_w(name), debugstr_us(nt_name) );
|
||||
return load_native_dll( load_path, nt_name, module_ptr, &image_info, &id, flags, pwm );
|
||||
return load_native_dll( load_path, nt_name, module_ptr, &image_info, flags, pwm, &st );
|
||||
}
|
||||
|
||||
status = load_so_dll( load_path, nt_name, so_name, flags, pwm );
|
||||
|
@ -2905,7 +2904,7 @@ done:
|
|||
*/
|
||||
static NTSTATUS search_dll_file( LPCWSTR paths, LPCWSTR search, UNICODE_STRING *nt_name,
|
||||
WINE_MODREF **pwm, void **module, pe_image_info_t *image_info,
|
||||
struct file_id *id )
|
||||
struct stat *st )
|
||||
{
|
||||
WCHAR *name;
|
||||
BOOL found_image = FALSE;
|
||||
|
@ -2932,7 +2931,7 @@ static NTSTATUS search_dll_file( LPCWSTR paths, LPCWSTR search, UNICODE_STRING *
|
|||
nt_name->Buffer = NULL;
|
||||
if ((status = RtlDosPathNameToNtPathName_U_WithStatus( name, nt_name, NULL, NULL ))) goto done;
|
||||
|
||||
status = open_dll_file( nt_name, pwm, module, image_info, id );
|
||||
status = open_dll_file( nt_name, pwm, module, image_info, st );
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) found_image = TRUE;
|
||||
else if (status != STATUS_DLL_NOT_FOUND) goto done;
|
||||
RtlFreeUnicodeString( nt_name );
|
||||
|
@ -2961,7 +2960,7 @@ done:
|
|||
*/
|
||||
static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, const WCHAR *default_ext,
|
||||
UNICODE_STRING *nt_name, WINE_MODREF **pwm,
|
||||
void **module, pe_image_info_t *image_info, struct file_id *id )
|
||||
void **module, pe_image_info_t *image_info, struct stat *st )
|
||||
{
|
||||
WCHAR *ext, *dllname;
|
||||
NTSTATUS status;
|
||||
|
@ -3012,9 +3011,9 @@ static NTSTATUS find_dll_file( const WCHAR *load_path, const WCHAR *libname, con
|
|||
}
|
||||
|
||||
if (RtlDetermineDosPathNameType_U( libname ) == RELATIVE_PATH)
|
||||
status = search_dll_file( load_path, libname, nt_name, pwm, module, image_info, id );
|
||||
status = search_dll_file( load_path, libname, nt_name, pwm, module, image_info, st );
|
||||
else if (!(status = RtlDosPathNameToNtPathName_U_WithStatus( libname, nt_name, NULL, NULL )))
|
||||
status = open_dll_file( nt_name, pwm, module, image_info, id );
|
||||
status = open_dll_file( nt_name, pwm, module, image_info, st );
|
||||
|
||||
if (status == STATUS_IMAGE_MACHINE_TYPE_MISMATCH) status = STATUS_INVALID_IMAGE_FORMAT;
|
||||
|
||||
|
@ -3037,14 +3036,14 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
|
|||
enum loadorder loadorder;
|
||||
WINE_MODREF *main_exe;
|
||||
UNICODE_STRING nt_name;
|
||||
struct file_id id;
|
||||
struct stat st;
|
||||
void *module;
|
||||
pe_image_info_t image_info;
|
||||
NTSTATUS nts;
|
||||
|
||||
TRACE( "looking for %s in %s\n", debugstr_w(libname), debugstr_w(load_path) );
|
||||
|
||||
nts = find_dll_file( load_path, libname, default_ext, &nt_name, pwm, &module, &image_info, &id );
|
||||
nts = find_dll_file( load_path, libname, default_ext, &nt_name, pwm, &module, &image_info, &st );
|
||||
|
||||
if (*pwm) /* found already loaded module */
|
||||
{
|
||||
|
@ -3091,7 +3090,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
|
|||
case LO_DEFAULT:
|
||||
nts = load_builtin_dll( load_path, &nt_name, &module, flags, pwm );
|
||||
if (nts == STATUS_DLL_NOT_FOUND)
|
||||
nts = load_native_dll( load_path, &nt_name, &module, &image_info, &id, flags, pwm );
|
||||
nts = load_native_dll( load_path, &nt_name, &module, &image_info, flags, pwm, &st );
|
||||
break;
|
||||
default:
|
||||
nts = STATUS_DLL_NOT_FOUND;
|
||||
|
@ -3106,7 +3105,7 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
|
|||
{
|
||||
case LO_NATIVE:
|
||||
case LO_NATIVE_BUILTIN:
|
||||
nts = load_native_dll( load_path, &nt_name, &module, &image_info, &id, flags, pwm );
|
||||
nts = load_native_dll( load_path, &nt_name, &module, &image_info, flags, pwm, &st );
|
||||
break;
|
||||
case LO_BUILTIN:
|
||||
nts = load_builtin_dll( load_path, &nt_name, &module, flags, pwm );
|
||||
|
@ -3122,10 +3121,10 @@ static NTSTATUS load_dll( const WCHAR *load_path, const WCHAR *libname, const WC
|
|||
LdrUnloadDll( (*pwm)->ldr.DllBase );
|
||||
nts = STATUS_DLL_NOT_FOUND;
|
||||
/* map the dll again if it was unmapped */
|
||||
if (!module && open_dll_file( &nt_name, pwm, &module, &image_info, &id )) break;
|
||||
if (!module && open_dll_file( &nt_name, pwm, &module, &image_info, &st )) break;
|
||||
}
|
||||
if (nts == STATUS_DLL_NOT_FOUND)
|
||||
nts = load_native_dll( load_path, &nt_name, &module, &image_info, &id, flags, pwm );
|
||||
nts = load_native_dll( load_path, &nt_name, &module, &image_info, flags, pwm, &st );
|
||||
break;
|
||||
default:
|
||||
nts = STATUS_DLL_NOT_FOUND;
|
||||
|
@ -3204,13 +3203,13 @@ NTSTATUS WINAPI LdrGetDllHandle( LPCWSTR load_path, ULONG flags, const UNICODE_S
|
|||
WINE_MODREF *wm;
|
||||
void *module;
|
||||
pe_image_info_t image_info;
|
||||
struct file_id id;
|
||||
struct stat st;
|
||||
|
||||
RtlEnterCriticalSection( &loader_section );
|
||||
|
||||
if (!load_path) load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
|
||||
|
||||
status = find_dll_file( load_path, name->Buffer, dllW, &nt_name, &wm, &module, &image_info, &id );
|
||||
status = find_dll_file( load_path, name->Buffer, dllW, &nt_name, &wm, &module, &image_info, &st );
|
||||
|
||||
if (wm) *base = wm->ldr.DllBase;
|
||||
else
|
||||
|
|
|
@ -40,12 +40,20 @@
|
|||
|
||||
#define MAX_NT_PATH_LENGTH 277
|
||||
|
||||
#define MAX_DOS_DRIVES 26
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
|
||||
static const UINT_PTR page_size = 0x1000;
|
||||
#else
|
||||
extern UINT_PTR page_size DECLSPEC_HIDDEN;
|
||||
#endif
|
||||
|
||||
struct drive_info
|
||||
{
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
};
|
||||
|
||||
extern NTSTATUS close_handle( HANDLE ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* exceptions */
|
||||
|
@ -106,6 +114,7 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
|
|||
/* file I/O */
|
||||
extern NTSTATUS server_get_unix_name( HANDLE handle, ANSI_STRING *unix_name ) DECLSPEC_HIDDEN;
|
||||
extern void init_directories(void) DECLSPEC_HIDDEN;
|
||||
extern unsigned int DIR_get_drives_info( struct drive_info info[MAX_DOS_DRIVES] ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* virtual memory */
|
||||
extern void virtual_fill_image_information( const pe_image_info_t *pe_info,
|
||||
|
|
|
@ -24,6 +24,13 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
|
@ -41,6 +48,98 @@ static const WCHAR UncPfxW[] = {'U','N','C','\\',0};
|
|||
|
||||
#define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/')
|
||||
|
||||
/***********************************************************************
|
||||
* remove_last_componentW
|
||||
*
|
||||
* Remove the last component of the path. Helper for find_drive_rootW.
|
||||
*/
|
||||
static inline int remove_last_componentW( const WCHAR *path, int len )
|
||||
{
|
||||
int level = 0;
|
||||
|
||||
while (level < 1)
|
||||
{
|
||||
/* find start of the last path component */
|
||||
int prev = len;
|
||||
if (prev <= 1) break; /* reached root */
|
||||
while (prev > 1 && !IS_SEPARATOR(path[prev - 1])) prev--;
|
||||
/* does removing it take us up a level? */
|
||||
if (len - prev != 1 || path[prev] != '.') /* not '.' */
|
||||
{
|
||||
if (len - prev == 2 && path[prev] == '.' && path[prev+1] == '.') /* is it '..'? */
|
||||
level--;
|
||||
else
|
||||
level++;
|
||||
}
|
||||
/* strip off trailing slashes */
|
||||
while (prev > 1 && IS_SEPARATOR(path[prev - 1])) prev--;
|
||||
len = prev;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* find_drive_rootW
|
||||
*
|
||||
* Find a drive for which the root matches the beginning of the given path.
|
||||
* This can be used to translate a Unix path into a drive + DOS path.
|
||||
* Return value is the drive, or -1 on error. On success, ppath is modified
|
||||
* to point to the beginning of the DOS path.
|
||||
*/
|
||||
static int find_drive_rootW( LPCWSTR *ppath )
|
||||
{
|
||||
/* Starting with the full path, check if the device and inode match any of
|
||||
* the wine 'drives'. If not then remove the last path component and try
|
||||
* again. If the last component was a '..' then skip a normal component
|
||||
* since it's a directory that's ascended back out of.
|
||||
*/
|
||||
int drive, lenA, lenW;
|
||||
char *buffer, *p;
|
||||
const WCHAR *path = *ppath;
|
||||
struct stat st;
|
||||
struct drive_info info[MAX_DOS_DRIVES];
|
||||
|
||||
/* get device and inode of all drives */
|
||||
if (!DIR_get_drives_info( info )) return -1;
|
||||
|
||||
/* strip off trailing slashes */
|
||||
lenW = wcslen(path);
|
||||
while (lenW > 1 && IS_SEPARATOR(path[lenW - 1])) lenW--;
|
||||
|
||||
/* convert path to Unix encoding */
|
||||
if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0, lenW * 3 + 1 ))) return -1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
lenA = ntdll_wcstoumbs( path, lenW, buffer, lenW * 3, FALSE );
|
||||
buffer[lenA] = 0;
|
||||
for (p = buffer; *p; p++) if (*p == '\\') *p = '/';
|
||||
|
||||
if (!stat( buffer, &st ) && S_ISDIR( st.st_mode ))
|
||||
{
|
||||
/* Find the drive */
|
||||
for (drive = 0; drive < MAX_DOS_DRIVES; drive++)
|
||||
{
|
||||
if ((info[drive].dev == st.st_dev) && (info[drive].ino == st.st_ino))
|
||||
{
|
||||
if (lenW == 1) lenW = 0; /* preserve root slash in returned path */
|
||||
TRACE( "%s -> drive %c:, root=%s, name=%s\n",
|
||||
debugstr_w(path), 'A' + drive, debugstr_a(buffer), debugstr_w(path + lenW));
|
||||
*ppath += lenW;
|
||||
RtlFreeHeap( GetProcessHeap(), 0, buffer );
|
||||
return drive;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lenW <= 1) break; /* reached root */
|
||||
lenW = remove_last_componentW( path, lenW );
|
||||
}
|
||||
RtlFreeHeap( GetProcessHeap(), 0, buffer );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RtlDetermineDosPathNameType_U (NTDLL.@)
|
||||
*/
|
||||
|
@ -540,26 +639,18 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
|
|||
case ABSOLUTE_PATH: /* \xxx */
|
||||
if (name[0] == '/') /* may be a Unix path */
|
||||
{
|
||||
char *unix_name;
|
||||
ANSI_STRING unix_str;
|
||||
UNICODE_STRING nt_str;
|
||||
|
||||
unix_name = RtlAllocateHeap( GetProcessHeap(), 0, 3 * wcslen(name) + 1 );
|
||||
ntdll_wcstoumbs( name, wcslen(name) + 1, unix_name, 3 * wcslen(name) + 1, FALSE );
|
||||
RtlInitAnsiString( &unix_str, unix_name );
|
||||
unix_funcs->unix_to_nt_file_name( &unix_str, &nt_str );
|
||||
RtlFreeAnsiString( &unix_str );
|
||||
if (nt_str.Length > 5 * sizeof(WCHAR) && nt_str.Buffer[5] == ':')
|
||||
const WCHAR *ptr = name;
|
||||
int drive = find_drive_rootW( &ptr );
|
||||
if (drive != -1)
|
||||
{
|
||||
reqsize = nt_str.Length - 3 * sizeof(WCHAR);
|
||||
if (reqsize <= size)
|
||||
{
|
||||
memcpy( buffer, nt_str.Buffer + 4, reqsize );
|
||||
collapse_path( buffer, 3 );
|
||||
reqsize -= sizeof(WCHAR);
|
||||
}
|
||||
RtlFreeUnicodeString( &nt_str );
|
||||
goto done;
|
||||
reqsize = 3 * sizeof(WCHAR);
|
||||
tmp[0] = 'A' + drive;
|
||||
tmp[1] = ':';
|
||||
tmp[2] = '\\';
|
||||
ins_str = tmp;
|
||||
mark = 3;
|
||||
dep = ptr - name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cd->Buffer[1] == ':')
|
||||
|
@ -895,15 +986,24 @@ NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRIN
|
|||
if (path[0] != '/') /* relative path name */
|
||||
{
|
||||
WCHAR *tmp;
|
||||
NTSTATUS status;
|
||||
|
||||
path++;
|
||||
lenA--;
|
||||
if (!(tmp = RtlAllocateHeap( GetProcessHeap(), 0, (lenA + 1) * sizeof(WCHAR) )))
|
||||
return STATUS_NO_MEMORY;
|
||||
lenW = ntdll_umbstowcs( path, lenA, tmp, lenA );
|
||||
tmp[lenW] = 0;
|
||||
status = RtlDosPathNameToNtPathName_U_WithStatus( tmp, nt, NULL, NULL );
|
||||
lenW = RtlGetFullPathName_U( tmp, 0, NULL, NULL );
|
||||
if (!lenW || !(nt->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, lenW )))
|
||||
{
|
||||
RtlFreeHeap( GetProcessHeap(), 0, tmp );
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
lenW = RtlGetFullPathName_U( tmp, lenW, nt->Buffer, NULL );
|
||||
nt->Length = lenW;
|
||||
nt->MaximumLength = lenW + sizeof(WCHAR);
|
||||
RtlFreeHeap( GetProcessHeap(), 0, tmp );
|
||||
return status;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
return unix_funcs->unix_to_nt_file_name( name, nt );
|
||||
}
|
||||
|
|
|
@ -429,31 +429,30 @@ RtlDeleteSecurityObject( PSECURITY_DESCRIPTOR *ObjectDescriptor )
|
|||
/******************************************************************************
|
||||
* RtlInitializeGenericTable [NTDLL.@]
|
||||
*/
|
||||
void WINAPI RtlInitializeGenericTable(RTL_GENERIC_TABLE *table, PRTL_GENERIC_COMPARE_ROUTINE compare,
|
||||
PRTL_GENERIC_ALLOCATE_ROUTINE allocate, PRTL_GENERIC_FREE_ROUTINE free,
|
||||
void *context)
|
||||
PVOID WINAPI RtlInitializeGenericTable(PVOID pTable, PVOID arg2, PVOID arg3, PVOID arg4, PVOID arg5)
|
||||
{
|
||||
FIXME("(%p, %p, %p, %p, %p) stub!\n", table, compare, allocate, free, context);
|
||||
FIXME("(%p,%p,%p,%p,%p) stub!\n", pTable, arg2, arg3, arg4, arg5);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RtlEnumerateGenericTableWithoutSplaying [NTDLL.@]
|
||||
*/
|
||||
void * RtlEnumerateGenericTableWithoutSplaying(RTL_GENERIC_TABLE *table, void *previous)
|
||||
PVOID RtlEnumerateGenericTableWithoutSplaying(PVOID pTable, PVOID *RestartKey)
|
||||
{
|
||||
static int warn_once;
|
||||
|
||||
if (!warn_once++)
|
||||
FIXME("(%p, %p) stub!\n", table, previous);
|
||||
FIXME("(%p,%p) stub!\n", pTable, RestartKey);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RtlNumberGenericTableElements [NTDLL.@]
|
||||
*/
|
||||
ULONG RtlNumberGenericTableElements(RTL_GENERIC_TABLE *table)
|
||||
ULONG RtlNumberGenericTableElements(PVOID pTable)
|
||||
{
|
||||
FIXME("(%p) stub!\n", table);
|
||||
FIXME("(%p) stub!\n", pTable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1375,6 +1375,7 @@ static NTSTATUS tp_new_worker_thread( struct threadpool *pool )
|
|||
{
|
||||
InterlockedIncrement( &pool->refcount );
|
||||
pool->num_workers++;
|
||||
pool->num_busy_workers++;
|
||||
NtClose( thread );
|
||||
}
|
||||
return status;
|
||||
|
@ -2136,7 +2137,6 @@ static void tp_object_initialize( struct threadpool_object *object, struct threa
|
|||
|
||||
static void tp_object_prio_queue( struct threadpool_object *object )
|
||||
{
|
||||
++object->pool->num_busy_workers;
|
||||
list_add_tail( &object->pool->pools[object->priority], &object->pool_entry );
|
||||
}
|
||||
|
||||
|
@ -2330,6 +2330,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
|||
TRACE( "starting worker thread for pool %p\n", pool );
|
||||
|
||||
RtlEnterCriticalSection( &pool->cs );
|
||||
pool->num_busy_workers--;
|
||||
for (;;)
|
||||
{
|
||||
while ((ptr = threadpool_get_next_item( pool )))
|
||||
|
@ -2359,6 +2360,7 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
|||
/* Leave critical section and do the actual callback. */
|
||||
object->num_associated_callbacks++;
|
||||
object->num_running_callbacks++;
|
||||
pool->num_busy_workers++;
|
||||
RtlLeaveCriticalSection( &pool->cs );
|
||||
|
||||
/* Initialize threadpool instance struct. */
|
||||
|
@ -2464,7 +2466,6 @@ static void CALLBACK threadpool_worker_proc( void *param )
|
|||
|
||||
skip_cleanup:
|
||||
RtlEnterCriticalSection( &pool->cs );
|
||||
assert(pool->num_busy_workers);
|
||||
pool->num_busy_workers--;
|
||||
|
||||
/* Simple callbacks are automatically shutdown after execution. */
|
||||
|
|
|
@ -5666,29 +5666,6 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case FSCTL_GET_OBJECT_ID:
|
||||
{
|
||||
FILE_OBJECTID_BUFFER *info = out_buffer;
|
||||
int fd, needs_close;
|
||||
struct stat st;
|
||||
|
||||
io->Information = 0;
|
||||
if (out_size >= sizeof(*info))
|
||||
{
|
||||
status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL );
|
||||
if (status) break;
|
||||
fstat( fd, &st );
|
||||
if (needs_close) close( fd );
|
||||
memset( info, 0, sizeof(*info) );
|
||||
memcpy( info->ObjectId, &st.st_dev, sizeof(st.st_dev) );
|
||||
memcpy( info->ObjectId + 8, &st.st_ino, sizeof(st.st_ino) );
|
||||
io->Information = sizeof(*info);
|
||||
}
|
||||
else status = STATUS_BUFFER_TOO_SMALL;
|
||||
break;
|
||||
}
|
||||
|
||||
case FSCTL_SET_SPARSE:
|
||||
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
|
||||
io->Information = 0;
|
||||
|
|
|
@ -1024,6 +1024,7 @@ static struct unix_funcs unix_funcs =
|
|||
exec_process,
|
||||
wine_server_call,
|
||||
server_send_fd,
|
||||
server_get_unix_fd,
|
||||
server_fd_to_handle,
|
||||
server_handle_to_fd,
|
||||
server_release_fd,
|
||||
|
|
|
@ -417,8 +417,10 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, HANDLE *handle, pe_image
|
|||
/* assume current arch */
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
info->cpu = is_64bit ? CPU_x86_64 : CPU_x86;
|
||||
#else
|
||||
info->cpu = client_cpu;
|
||||
#elif defined(__arm__)
|
||||
info->cpu = CPU_ARM;
|
||||
#elif defined(__aarch64__)
|
||||
info->cpu = CPU_ARM64;
|
||||
#endif
|
||||
*handle = 0;
|
||||
return STATUS_SUCCESS;
|
||||
|
@ -587,7 +589,7 @@ NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTST
|
|||
{
|
||||
pe_image_info_t pe_info;
|
||||
BOOL is_child_64bit;
|
||||
int unixdir, socketfd[2];
|
||||
int socketfd[2];
|
||||
char **argv;
|
||||
HANDLE handle;
|
||||
|
||||
|
@ -613,8 +615,6 @@ NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTST
|
|||
return status;
|
||||
}
|
||||
|
||||
unixdir = get_unix_curdir( NtCurrentTeb()->Peb->ProcessParameters );
|
||||
|
||||
if (socketpair( PF_UNIX, SOCK_STREAM, 0, socketfd ) == -1) return STATUS_TOO_MANY_OPENED_FILES;
|
||||
#ifdef SO_PASSCRED
|
||||
else
|
||||
|
@ -637,7 +637,6 @@ NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTST
|
|||
if (!status)
|
||||
{
|
||||
if (!(argv = build_argv( cmdline, 2 ))) return STATUS_NO_MEMORY;
|
||||
fchdir( unixdir );
|
||||
do
|
||||
{
|
||||
status = exec_wineloader( argv, socketfd[0], is_child_64bit,
|
||||
|
|
|
@ -100,6 +100,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(server);
|
|||
#define SOCKETNAME "socket" /* name of the socket file */
|
||||
#define LOCKNAME "lock" /* name of the lock file */
|
||||
|
||||
#ifdef __i386__
|
||||
static const enum cpu_type client_cpu = CPU_x86;
|
||||
#elif defined(__x86_64__)
|
||||
static const enum cpu_type client_cpu = CPU_x86_64;
|
||||
#elif defined(__arm__)
|
||||
static const enum cpu_type client_cpu = CPU_ARM;
|
||||
#elif defined(__aarch64__)
|
||||
static const enum cpu_type client_cpu = CPU_ARM64;
|
||||
#else
|
||||
#error Unsupported CPU
|
||||
#endif
|
||||
|
||||
static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
|
||||
|
||||
static const char *server_dir;
|
||||
|
@ -987,8 +999,8 @@ static int remove_fd_from_cache( HANDLE handle )
|
|||
*
|
||||
* The returned unix_fd should be closed iff needs_close is non-zero.
|
||||
*/
|
||||
int server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd,
|
||||
int *needs_close, enum server_fd_type *type, unsigned int *options )
|
||||
int CDECL server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd,
|
||||
int *needs_close, enum server_fd_type *type, unsigned int *options )
|
||||
{
|
||||
sigset_t sigset;
|
||||
obj_handle_t fd_handle;
|
||||
|
|
|
@ -28,16 +28,6 @@
|
|||
#define InterlockedCompareExchange64(dest,xchg,cmp) RtlInterlockedCompareExchange64(dest,xchg,cmp)
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
static const enum cpu_type client_cpu = CPU_x86;
|
||||
#elif defined(__x86_64__)
|
||||
static const enum cpu_type client_cpu = CPU_x86_64;
|
||||
#elif defined(__arm__)
|
||||
static const enum cpu_type client_cpu = CPU_ARM;
|
||||
#elif defined(__aarch64__)
|
||||
static const enum cpu_type client_cpu = CPU_ARM64;
|
||||
#endif
|
||||
|
||||
struct debug_info
|
||||
{
|
||||
unsigned int str_pos; /* current position in strings buffer */
|
||||
|
@ -111,6 +101,9 @@ extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
|
|||
extern void CDECL virtual_set_large_address_space(void) DECLSPEC_HIDDEN;
|
||||
|
||||
extern void CDECL server_send_fd( int fd ) DECLSPEC_HIDDEN;
|
||||
extern int CDECL server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd,
|
||||
int *needs_close, enum server_fd_type *type,
|
||||
unsigned int *options ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL server_fd_to_handle( int fd, unsigned int access, unsigned int attributes,
|
||||
HANDLE *handle ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd,
|
||||
|
@ -162,8 +155,6 @@ extern unsigned int server_wait( const select_op_t *select_op, data_size_t size,
|
|||
const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN;
|
||||
extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call,
|
||||
apc_result_t *result ) DECLSPEC_HIDDEN;
|
||||
extern int server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd,
|
||||
int *needs_close, enum server_fd_type *type, unsigned int *options ) DECLSPEC_HIDDEN;
|
||||
extern void server_init_process(void) DECLSPEC_HIDDEN;
|
||||
extern size_t server_init_thread( void *entry_point, BOOL *suspend ) DECLSPEC_HIDDEN;
|
||||
extern int server_pipe( int fd[2] ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -28,7 +28,7 @@ struct ldt_copy;
|
|||
struct msghdr;
|
||||
|
||||
/* increment this when you change the function table */
|
||||
#define NTDLL_UNIXLIB_VERSION 57
|
||||
#define NTDLL_UNIXLIB_VERSION 56
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
|
@ -310,6 +310,8 @@ struct unix_funcs
|
|||
/* server functions */
|
||||
unsigned int (CDECL *server_call)( void *req_ptr );
|
||||
void (CDECL *server_send_fd)( int fd );
|
||||
int (CDECL *server_get_unix_fd)( HANDLE handle, unsigned int wanted_access, int *unix_fd,
|
||||
int *needs_close, enum server_fd_type *type, unsigned int *options );
|
||||
NTSTATUS (CDECL *server_fd_to_handle)( int fd, unsigned int access, unsigned int attributes,
|
||||
HANDLE *handle );
|
||||
NTSTATUS (CDECL *server_handle_to_fd)( HANDLE handle, unsigned int access, int *unix_fd,
|
||||
|
|
|
@ -3645,8 +3645,6 @@ static NTSTATUS WINAPI init_driver( DRIVER_OBJECT *driver_object, UNICODE_STRING
|
|||
return STATUS_DLL_INIT_FAILED;
|
||||
|
||||
driver_object->DriverSection = find_ldr_module( module );
|
||||
driver_object->DriverStart = ((LDR_DATA_TABLE_ENTRY *)driver_object->DriverSection)->DllBase;
|
||||
driver_object->DriverSize = ((LDR_DATA_TABLE_ENTRY *)driver_object->DriverSection)->SizeOfImage;
|
||||
|
||||
nt = RtlImageNtHeader( module );
|
||||
if (!nt->OptionalHeader.AddressOfEntryPoint) return STATUS_SUCCESS;
|
||||
|
|
|
@ -167,22 +167,15 @@ struct socket_context
|
|||
{
|
||||
};
|
||||
|
||||
#define TEST_BUFFER_LENGTH 256
|
||||
|
||||
static void test_wsk_listen_socket(void)
|
||||
{
|
||||
static const char test_receive_string[] = "Client test string 1.";
|
||||
const WSK_PROVIDER_LISTEN_DISPATCH *tcp_dispatch, *udp_dispatch;
|
||||
static const char test_send_string[] = "Server test string 1.";
|
||||
static const WSK_CLIENT_LISTEN_DISPATCH client_listen_dispatch;
|
||||
const WSK_PROVIDER_CONNECTION_DISPATCH *accept_dispatch;
|
||||
WSK_SOCKET *tcp_socket, *udp_socket, *accept_socket;
|
||||
struct socket_context context;
|
||||
WSK_BUF wsk_buf1, wsk_buf2;
|
||||
void *buffer1, *buffer2;
|
||||
struct sockaddr_in addr;
|
||||
LARGE_INTEGER timeout;
|
||||
MDL *mdl1, *mdl2;
|
||||
NTSTATUS status;
|
||||
KEVENT event;
|
||||
IRP *irp;
|
||||
|
@ -190,19 +183,6 @@ static void test_wsk_listen_socket(void)
|
|||
irp = IoAllocateIrp(1, FALSE);
|
||||
KeInitializeEvent(&event, SynchronizationEvent, FALSE);
|
||||
|
||||
buffer1 = ExAllocatePool(NonPagedPool, TEST_BUFFER_LENGTH);
|
||||
mdl1 = IoAllocateMdl(buffer1, TEST_BUFFER_LENGTH, FALSE, FALSE, NULL);
|
||||
MmBuildMdlForNonPagedPool(mdl1);
|
||||
buffer2 = ExAllocatePool(NonPagedPool, TEST_BUFFER_LENGTH);
|
||||
mdl2 = IoAllocateMdl(buffer2, TEST_BUFFER_LENGTH, FALSE, FALSE, NULL);
|
||||
MmBuildMdlForNonPagedPool(mdl2);
|
||||
|
||||
wsk_buf1.Mdl = mdl1;
|
||||
wsk_buf1.Offset = 0;
|
||||
wsk_buf1.Length = TEST_BUFFER_LENGTH;
|
||||
wsk_buf2 = wsk_buf1;
|
||||
wsk_buf2.Mdl = mdl2;
|
||||
|
||||
status = provider_npi.Dispatch->WskSocket(NULL, AF_INET, SOCK_STREAM, IPPROTO_TCP,
|
||||
WSK_FLAG_LISTEN_SOCKET, &context, &client_listen_dispatch, NULL, NULL, NULL, NULL);
|
||||
ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#x.\n", status);
|
||||
|
@ -303,32 +283,6 @@ static void test_wsk_listen_socket(void)
|
|||
accept_socket = (WSK_SOCKET *)wsk_irp->IoStatus.Information;
|
||||
accept_dispatch = accept_socket->Dispatch;
|
||||
|
||||
IoReuseIrp(irp, STATUS_UNSUCCESSFUL);
|
||||
IoSetCompletionRoutine(irp, irp_completion_routine, &event, TRUE, TRUE, TRUE);
|
||||
status = accept_dispatch->WskReceive(accept_socket, &wsk_buf2, 0, irp);
|
||||
ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status);
|
||||
|
||||
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL);
|
||||
IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE);
|
||||
strcpy(buffer1, test_send_string);
|
||||
/* Setting Length in WSK_BUF greater than MDL allocation size BSODs Windows.
|
||||
* wsk_buf1.Length = TEST_BUFFER_LENGTH * 2; */
|
||||
status = accept_dispatch->WskSend(accept_socket, &wsk_buf1, 0, wsk_irp);
|
||||
ok(status == STATUS_PENDING, "Got unexpected status %#x.\n", status);
|
||||
|
||||
status = KeWaitForSingleObject(&irp_complete_event, Executive, KernelMode, FALSE, &timeout);
|
||||
ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status);
|
||||
ok(wsk_irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", wsk_irp->IoStatus.Status);
|
||||
ok(wsk_irp->IoStatus.Information == TEST_BUFFER_LENGTH, "Got unexpected status %#x.\n",
|
||||
wsk_irp->IoStatus.Status);
|
||||
|
||||
status = KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, &timeout);
|
||||
ok(status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status);
|
||||
ok(irp->IoStatus.Status == STATUS_SUCCESS, "Got unexpected status %#x.\n", irp->IoStatus.Status);
|
||||
ok(irp->IoStatus.Information == sizeof(test_receive_string), "Got unexpected Information %#lx.\n",
|
||||
irp->IoStatus.Information);
|
||||
ok(!strcmp(buffer2, test_receive_string), "Received unexpected data.\n");
|
||||
|
||||
IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL);
|
||||
IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE);
|
||||
status = accept_dispatch->Basic.WskCloseSocket(accept_socket, wsk_irp);
|
||||
|
@ -363,11 +317,6 @@ static void test_wsk_listen_socket(void)
|
|||
ok(irp->IoStatus.Status == STATUS_CANCELLED, "Got unexpected status %#x.\n", irp->IoStatus.Status);
|
||||
ok(!irp->IoStatus.Information, "Got unexpected Information %#lx.\n", irp->IoStatus.Information);
|
||||
IoFreeIrp(irp);
|
||||
|
||||
IoFreeMdl(mdl1);
|
||||
IoFreeMdl(mdl2);
|
||||
ExFreePool(buffer1);
|
||||
ExFreePool(buffer2);
|
||||
}
|
||||
|
||||
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
|
||||
|
|
|
@ -516,10 +516,8 @@ static void test_driver3(void)
|
|||
|
||||
static DWORD WINAPI wsk_test_thread(void *parameter)
|
||||
{
|
||||
static const char test_send_string[] = "Client test string 1.";
|
||||
static const WORD version = MAKEWORD(2, 2);
|
||||
struct sockaddr_in addr;
|
||||
char buffer[256];
|
||||
int ret, err;
|
||||
WSADATA data;
|
||||
SOCKET s;
|
||||
|
@ -543,13 +541,6 @@ static DWORD WINAPI wsk_test_thread(void *parameter)
|
|||
}
|
||||
ok(!ret, "Error connecting, WSAGetLastError() %u.\n", WSAGetLastError());
|
||||
|
||||
ret = send(s, test_send_string, sizeof(test_send_string), 0);
|
||||
ok(ret == sizeof(test_send_string), "Got unexpected ret %d.\n", ret);
|
||||
|
||||
ret = recv(s, buffer, sizeof(buffer), 0);
|
||||
ok(ret == sizeof(buffer), "Got unexpected ret %d.\n", ret);
|
||||
ok(!strcmp(buffer, "Server test string 1."), "Received unexpected data.\n");
|
||||
|
||||
closesocket(s);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -696,7 +696,7 @@ static void test_media_types(void)
|
|||
VIDEOINFOHEADER vih =
|
||||
{
|
||||
{0}, {0}, 0, 0, 0,
|
||||
{sizeof(BITMAPINFOHEADER), 32, 24, 1, 0, 0xdeadbeef}
|
||||
{sizeof(BITMAPINFOHEADER), 32, 24, 1, 0, BI_RGB}
|
||||
};
|
||||
IEnumMediaTypes *enummt;
|
||||
unsigned int i;
|
||||
|
|
|
@ -207,41 +207,89 @@ static inline struct quartz_vmr *impl_from_IBaseFilter(IBaseFilter *iface)
|
|||
return CONTAINING_RECORD(iface, struct quartz_vmr, renderer.filter.IBaseFilter_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *sample)
|
||||
static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *info, LPBYTE data,
|
||||
DWORD size)
|
||||
{
|
||||
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
|
||||
const HANDLE events[2] = {filter->run_event, filter->renderer.flush_event};
|
||||
unsigned int data_size, width, depth, src_pitch;
|
||||
const BITMAPINFOHEADER *bitmap_header;
|
||||
REFERENCE_TIME start_time, end_time;
|
||||
VMR9PresentationInfo info = {};
|
||||
D3DLOCKED_RECT locked_rect;
|
||||
BYTE *data = NULL;
|
||||
HRESULT hr;
|
||||
const BITMAPINFOHEADER *bmiHeader = get_bitmap_header(&This->renderer.sink.pin.mt);
|
||||
HRESULT hr = S_OK;
|
||||
int width;
|
||||
int height;
|
||||
D3DLOCKED_RECT lock;
|
||||
|
||||
TRACE("filter %p, sample %p.\n", filter, sample);
|
||||
TRACE("%p %p %d\n", This, data, size);
|
||||
|
||||
width = bmiHeader->biWidth;
|
||||
height = bmiHeader->biHeight;
|
||||
|
||||
hr = IDirect3DSurface9_LockRect(info->lpSurf, &lock, NULL, D3DLOCK_DISCARD);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERR("IDirect3DSurface9_LockRect failed (%x)\n",hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (height > 0) {
|
||||
/* Bottom up image needs inverting */
|
||||
lock.pBits = (char *)lock.pBits + (height * lock.Pitch);
|
||||
while (height--)
|
||||
{
|
||||
lock.pBits = (char *)lock.pBits - lock.Pitch;
|
||||
memcpy(lock.pBits, data, width * bmiHeader->biBitCount / 8);
|
||||
data = data + width * bmiHeader->biBitCount / 8;
|
||||
}
|
||||
}
|
||||
else if (lock.Pitch != width * bmiHeader->biBitCount / 8)
|
||||
{
|
||||
WARN("Slow path! %u/%u\n", lock.Pitch, width * bmiHeader->biBitCount/8);
|
||||
|
||||
while (height--)
|
||||
{
|
||||
memcpy(lock.pBits, data, width * bmiHeader->biBitCount / 8);
|
||||
data = data + width * bmiHeader->biBitCount / 8;
|
||||
lock.pBits = (char *)lock.pBits + lock.Pitch;
|
||||
}
|
||||
}
|
||||
else memcpy(lock.pBits, data, size);
|
||||
|
||||
IDirect3DSurface9_UnlockRect(info->lpSurf);
|
||||
|
||||
hr = IVMRImagePresenter9_PresentImage(This->presenter, This->cookie, info);
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *pSample)
|
||||
{
|
||||
struct quartz_vmr *This = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
|
||||
const HANDLE events[2] = {This->run_event, This->renderer.flush_event};
|
||||
VMR9PresentationInfo info = {};
|
||||
LPBYTE pbSrcStream = NULL;
|
||||
long cbSrcStream = 0;
|
||||
REFERENCE_TIME tStart, tStop;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p %p\n", iface, pSample);
|
||||
|
||||
/* It is possible that there is no device at this point */
|
||||
|
||||
if (!filter->allocator || !filter->presenter)
|
||||
if (!This->allocator || !This->presenter)
|
||||
{
|
||||
ERR("NO PRESENTER!!\n");
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
info.dwFlags = VMR9Sample_SrcDstRectsValid;
|
||||
hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
|
||||
if (FAILED(hr))
|
||||
info.dwFlags = VMR9Sample_SrcDstRectsValid;
|
||||
else
|
||||
info.dwFlags = VMR9Sample_SrcDstRectsValid | VMR9Sample_TimeValid;
|
||||
|
||||
if (SUCCEEDED(hr = IMediaSample_GetTime(sample, &start_time, &end_time)))
|
||||
info.dwFlags |= VMR9Sample_TimeValid;
|
||||
|
||||
if (IMediaSample_IsDiscontinuity(sample) == S_OK)
|
||||
if (IMediaSample_IsDiscontinuity(pSample) == S_OK)
|
||||
info.dwFlags |= VMR9Sample_Discontinuity;
|
||||
|
||||
if (IMediaSample_IsPreroll(sample) == S_OK)
|
||||
if (IMediaSample_IsPreroll(pSample) == S_OK)
|
||||
info.dwFlags |= VMR9Sample_Preroll;
|
||||
|
||||
if (IMediaSample_IsSyncPoint(sample) == S_OK)
|
||||
if (IMediaSample_IsSyncPoint(pSample) == S_OK)
|
||||
info.dwFlags |= VMR9Sample_SyncPoint;
|
||||
|
||||
/* If we render ourselves, and this is a preroll sample, discard it */
|
||||
|
@ -250,80 +298,28 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if (FAILED(hr = IMediaSample_GetPointer(sample, &data)))
|
||||
hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERR("Failed to get pointer to sample data, hr %#x.\n", hr);
|
||||
return hr;
|
||||
}
|
||||
data_size = IMediaSample_GetActualDataLength(sample);
|
||||
|
||||
bitmap_header = get_bitmap_header(&filter->renderer.sink.pin.mt);
|
||||
width = bitmap_header->biWidth;
|
||||
height = bitmap_header->biHeight;
|
||||
depth = bitmap_header->biBitCount;
|
||||
if (bitmap_header->biCompression == mmioFOURCC('N','V','1','2')
|
||||
|| bitmap_header->biCompression == mmioFOURCC('Y','V','1','2'))
|
||||
src_pitch = width;
|
||||
else /* packed YUV (UYVY or YUY2) or RGB */
|
||||
src_pitch = ((width * depth / 8) + 3) & ~3;
|
||||
|
||||
info.rtStart = start_time;
|
||||
info.rtEnd = end_time;
|
||||
info.szAspectRatio.cx = width;
|
||||
info.szAspectRatio.cy = height;
|
||||
info.lpSurf = filter->surfaces[(++filter->cur_surface) % filter->num_surfaces];
|
||||
|
||||
if (FAILED(hr = IDirect3DSurface9_LockRect(info.lpSurf, &locked_rect, NULL, D3DLOCK_DISCARD)))
|
||||
{
|
||||
ERR("Failed to lock surface, hr %#x.\n", hr);
|
||||
ERR("Cannot get pointer to sample data (%x)\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (height > 0 && bitmap_header->biCompression == BI_RGB)
|
||||
cbSrcStream = IMediaSample_GetActualDataLength(pSample);
|
||||
|
||||
info.rtStart = tStart;
|
||||
info.rtEnd = tStop;
|
||||
info.szAspectRatio.cx = This->bmiheader.biWidth;
|
||||
info.szAspectRatio.cy = This->bmiheader.biHeight;
|
||||
info.lpSurf = This->surfaces[(++This->cur_surface) % This->num_surfaces];
|
||||
|
||||
VMR9_SendSampleData(This, &info, pbSrcStream, cbSrcStream);
|
||||
|
||||
if (This->renderer.filter.state == State_Paused)
|
||||
{
|
||||
BYTE *dst = (BYTE *)locked_rect.pBits + (height * locked_rect.Pitch);
|
||||
const BYTE *src = data;
|
||||
|
||||
TRACE("Inverting image.\n");
|
||||
|
||||
while (height--)
|
||||
{
|
||||
dst -= locked_rect.Pitch;
|
||||
memcpy(dst, src, width * depth / 8);
|
||||
src += src_pitch;
|
||||
}
|
||||
}
|
||||
else if (locked_rect.Pitch != src_pitch)
|
||||
{
|
||||
BYTE *dst = locked_rect.pBits;
|
||||
const BYTE *src = data;
|
||||
|
||||
height = abs(height);
|
||||
|
||||
TRACE("Source pitch %u does not match dest pitch %u; copying manually.\n",
|
||||
src_pitch, locked_rect.Pitch);
|
||||
|
||||
while (height--)
|
||||
{
|
||||
memcpy(dst, src, width * depth / 8);
|
||||
src += src_pitch;
|
||||
dst += locked_rect.Pitch;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(locked_rect.pBits, data, data_size);
|
||||
}
|
||||
|
||||
IDirect3DSurface9_UnlockRect(info.lpSurf);
|
||||
|
||||
hr = IVMRImagePresenter9_PresentImage(filter->presenter, filter->cookie, &info);
|
||||
|
||||
if (filter->renderer.filter.state == State_Paused)
|
||||
{
|
||||
LeaveCriticalSection(&filter->renderer.csRenderLock);
|
||||
LeaveCriticalSection(&This->renderer.csRenderLock);
|
||||
WaitForMultipleObjects(2, events, FALSE, INFINITE);
|
||||
EnterCriticalSection(&filter->renderer.csRenderLock);
|
||||
EnterCriticalSection(&This->renderer.csRenderLock);
|
||||
}
|
||||
|
||||
return hr;
|
||||
|
@ -338,6 +334,8 @@ static HRESULT WINAPI VMR9_CheckMediaType(struct strmbase_renderer *iface, const
|
|||
&& !IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo2))
|
||||
return S_FALSE;
|
||||
|
||||
if (get_bitmap_header(mt)->biCompression != BI_RGB)
|
||||
return S_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -426,14 +424,11 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
|
|||
case 32: info.Format = D3DFMT_X8R8G8B8; break;
|
||||
default:
|
||||
FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount);
|
||||
free(filter->surfaces);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
info.dwFlags = VMR9AllocFlag_TextureSurface;
|
||||
if (FAILED(hr = initialize_device(filter, &info, count)))
|
||||
free(filter->surfaces);
|
||||
return hr;
|
||||
return initialize_device(filter, &info, count);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(formats); ++i)
|
||||
|
@ -458,7 +453,6 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
|
|||
}
|
||||
}
|
||||
|
||||
free(filter->surfaces);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,33 @@
|
|||
#
|
||||
# Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# ---- Exceptions to the Apache 2.0 License: ----
|
||||
#
|
||||
# As an exception, if you use this Software to generate code and portions of
|
||||
# this Software are embedded into the generated code as a result, you may
|
||||
# redistribute such product without providing attribution as would otherwise
|
||||
# be required by Sections 4(a), 4(b) and 4(d) of the License.
|
||||
#
|
||||
# In addition, if you combine or link code generated by this Software with
|
||||
# software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
||||
# ("`Combined Software`") and if a court of competent jurisdiction determines
|
||||
# that the patent provision (Section 3), the indemnity provision (Section 9)
|
||||
# or other Section of the License conflicts with the conditions of the
|
||||
# applicable GPL or LGPL license, you may retroactively and prospectively
|
||||
# choose to deem waived or otherwise exclude such Section(s) of the License,
|
||||
# but only in their entirety and only with respect to the Combined Software.
|
||||
#
|
||||
|
||||
@ stdcall vkAcquireNextImage2KHR(ptr ptr ptr) winevulkan.wine_vkAcquireNextImage2KHR
|
||||
|
|
|
@ -191,11 +191,11 @@ static IWICStream *create_stream(const void *image_data, UINT image_size)
|
|||
IWICStream *stream = NULL;
|
||||
|
||||
hr = IWICImagingFactory_CreateStream(factory, &stream);
|
||||
ok(hr == S_OK, "CreateStream failed, hr %#x\n", hr);
|
||||
ok(hr == S_OK, "CreateStream failed, hr=%x\n", hr);
|
||||
if (hr != S_OK) goto fail;
|
||||
|
||||
hr = IWICStream_InitializeFromMemory(stream, (BYTE *)image_data, image_size);
|
||||
ok(hr == S_OK, "InitializeFromMemory failed, hr %#x\n", hr);
|
||||
ok(hr == S_OK, "InitializeFromMemory failed, hr=%x\n", hr);
|
||||
if (hr != S_OK) goto fail;
|
||||
|
||||
return stream;
|
||||
|
@ -220,9 +220,8 @@ static IWICBitmapDecoder *create_decoder(void)
|
|||
|
||||
memset(&guidresult, 0, sizeof(guidresult));
|
||||
hr = IWICBitmapDecoder_GetContainerFormat(decoder, &guidresult);
|
||||
ok(hr == S_OK, "GetContainerFormat failed, hr %#x\n", hr);
|
||||
ok(IsEqualGUID(&guidresult, &GUID_ContainerFormatDds),
|
||||
"Got unexpected container format %s\n", debugstr_guid(&GUID_ContainerFormatDds));
|
||||
ok(hr == S_OK, "GetContainerFormat failed, hr=%x\n", hr);
|
||||
ok(IsEqualGUID(&guidresult, &GUID_ContainerFormatDds), "Unexpected container format\n");
|
||||
|
||||
return decoder;
|
||||
}
|
||||
|
@ -233,10 +232,9 @@ static HRESULT init_decoder(IWICBitmapDecoder *decoder, IWICStream *stream, HRES
|
|||
|
||||
hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)stream, WICDecodeMetadataCacheOnDemand);
|
||||
if (index == -1) {
|
||||
ok(hr == S_OK, "Decoder initialize failed, hr %#x\n", hr);
|
||||
ok(hr == S_OK, "Decoder Initialize failed, hr=%x\n", hr);
|
||||
} else {
|
||||
todo_wine_if(index == 1 || index == 3)
|
||||
ok(hr == expected, "Test %u: Expected hr %#x, got %#x\n", index, expected, hr);
|
||||
todo_wine_if(index == 1 || index == 3) ok(hr == expected, "%d: Expected hr=%x, got %x\n", index, expected, hr);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
@ -331,33 +329,33 @@ static void test_dds_decoder_global_properties(IWICBitmapDecoder *decoder)
|
|||
UINT count;
|
||||
|
||||
hr = IWICImagingFactory_CreatePalette(factory, &palette);
|
||||
ok(hr == S_OK, "CreatePalette failed, hr %#x\n", hr);
|
||||
ok (hr == S_OK, "CreatePalette failed, hr=%x\n", hr);
|
||||
if (hr == S_OK) {
|
||||
hr = IWICBitmapDecoder_CopyPalette(decoder, palette);
|
||||
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "CopyPalette got unexpected hr %#x\n", hr);
|
||||
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Expected hr=WINCODEC_ERR_PALETTEUNAVAILABLE, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_CopyPalette(decoder, NULL);
|
||||
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "CopyPalette got unexpected hr %#x\n", hr);
|
||||
ok(hr == WINCODEC_ERR_PALETTEUNAVAILABLE, "Expected hr=WINCODEC_ERR_PALETTEUNAVAILABLE, got %x\n", hr);
|
||||
}
|
||||
|
||||
hr = IWICBitmapDecoder_GetMetadataQueryReader(decoder, &metadata_reader);
|
||||
todo_wine ok (hr == S_OK, "GetMetadataQueryReader got unexpected hr %#x\n", hr);
|
||||
todo_wine ok (hr == S_OK, "Expected hr=S_OK, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_GetMetadataQueryReader(decoder, NULL);
|
||||
ok(hr == E_INVALIDARG, "GetMetadataQueryReader got unexpected hr %#x\n", hr);
|
||||
ok (hr == E_INVALIDARG, "Expected hr=E_INVALIDARG, got %x\n", hr);
|
||||
|
||||
hr = IWICBitmapDecoder_GetPreview(decoder, &preview);
|
||||
ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "GetPreview got unexpected hr %#x\n", hr);
|
||||
ok (hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "Expected hr=WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_GetPreview(decoder, NULL);
|
||||
ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "GetPreview got unexpected hr %#x\n", hr);
|
||||
ok (hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "Expected hr=WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x\n", hr);
|
||||
|
||||
hr = IWICBitmapDecoder_GetColorContexts(decoder, 1, &color_context, &count);
|
||||
ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "GetColorContexts got unexpected hr %#x\n", hr);
|
||||
ok (hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "Expected hr=WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_GetColorContexts(decoder, 1, NULL, NULL);
|
||||
ok(hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "GetColorContexts got unexpected hr %#x\n", hr);
|
||||
ok (hr == WINCODEC_ERR_UNSUPPORTEDOPERATION, "Expected hr=WINCODEC_ERR_UNSUPPORTEDOPERATION, got %x\n", hr);
|
||||
|
||||
hr = IWICBitmapDecoder_GetThumbnail(decoder, &thumnail);
|
||||
ok(hr == WINCODEC_ERR_CODECNOTHUMBNAIL, "GetThumbnail got unexpected hr %#x\n", hr);
|
||||
ok (hr == WINCODEC_ERR_CODECNOTHUMBNAIL, "Expected hr=WINCODEC_ERR_CODECNOTHUMBNAIL, got %x\n", hr);
|
||||
hr = IWICBitmapDecoder_GetThumbnail(decoder, NULL);
|
||||
ok(hr == WINCODEC_ERR_CODECNOTHUMBNAIL, "GetThumbnail got unexpected hr %#x\n", hr);
|
||||
ok (hr == WINCODEC_ERR_CODECNOTHUMBNAIL, "Expected hr=WINCODEC_ERR_CODECNOTHUMBNAIL, got %x\n", hr);
|
||||
|
||||
if (palette) IWICPalette_Release(palette);
|
||||
if (metadata_reader) IWICMetadataQueryReader_Release(metadata_reader);
|
||||
|
@ -386,53 +384,53 @@ static void test_dds_decoder_image_parameters(void)
|
|||
if (!decoder) goto next;
|
||||
|
||||
hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
|
||||
ok(hr == S_OK, "QueryInterface failed, hr %#x\n", hr);
|
||||
ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr);
|
||||
if (hr != S_OK) goto next;
|
||||
|
||||
hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
ok(hr == WINCODEC_ERR_WRONGSTATE, "Test %u: GetFrameCount got unexpected hr %#x\n", i, hr);
|
||||
ok (hr == WINCODEC_ERR_WRONGSTATE, "%d: Expected hr=WINCODEC_ERR_WRONGSTATE, got %x\n", i, hr);
|
||||
hr = IWICBitmapDecoder_GetFrameCount(decoder, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u: GetFrameCount got unexpected hr %#x\n", i, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: Expected hr=E_INVALIDARG, got %x\n", i, hr);
|
||||
|
||||
hr = IWICDdsDecoder_GetParameters(dds_decoder, ¶meters);
|
||||
ok(hr == WINCODEC_ERR_WRONGSTATE, "Test %u: GetParameters got unexpected hr %#x\n", i, hr);
|
||||
ok(hr == WINCODEC_ERR_WRONGSTATE, "%d: Expected hr=WINCODEC_ERR_WRONGSTATE, got %x\n", i, hr);
|
||||
hr = IWICDdsDecoder_GetParameters(dds_decoder, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u: GetParameters got unexpected hr %#x\n", i, hr);
|
||||
ok(hr == E_INVALIDARG, "%d: Expected hr=E_INVALIDARG, got %x\n", i, hr);
|
||||
|
||||
hr = init_decoder(decoder, stream, S_OK, -1);
|
||||
if (hr != S_OK) goto next;
|
||||
|
||||
hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
ok(hr == S_OK, "Test %u: GetFrameCount failed, hr %#x\n", i, hr);
|
||||
ok (hr == S_OK, "%d: GetFrameCount failed, hr=%x\n", i, hr);
|
||||
if (hr == S_OK) {
|
||||
ok(frame_count == test_data[i].expected_frame_count, "Test %u: Expected frame count %u, got %u\n",
|
||||
i, test_data[i].expected_frame_count, frame_count);
|
||||
ok (frame_count == test_data[i].expected_frame_count, "%d: expected frame count %d, got %d\n",
|
||||
i, test_data[i].expected_frame_count, frame_count);
|
||||
}
|
||||
hr = IWICBitmapDecoder_GetFrameCount(decoder, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u: GetParameters got unexpected hr %#x\n", i, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: Expected hr=S_OK, got %x\n", i, hr);
|
||||
|
||||
hr = IWICDdsDecoder_GetParameters(dds_decoder, ¶meters);
|
||||
ok(hr == S_OK, "Test %u: GetParameters failed, hr %#x\n", i, hr);
|
||||
ok (hr == S_OK, "%d: GetParameters failed, hr=%x\n", i, hr);
|
||||
if (hr == S_OK) {
|
||||
ok(parameters.Width == test_data[i].expected_parameters.Width,
|
||||
"Test %u: Expected Width %u, got %u\n", i, test_data[i].expected_parameters.Width, parameters.Width);
|
||||
ok(parameters.Height == test_data[i].expected_parameters.Height,
|
||||
"Test %u: Expected Height %u, got %u\n", i, test_data[i].expected_parameters.Height, parameters.Height);
|
||||
ok(parameters.Depth == test_data[i].expected_parameters.Depth,
|
||||
"Test %u: Expected Depth %u, got %u\n", i, test_data[i].expected_parameters.Depth, parameters.Depth);
|
||||
ok(parameters.MipLevels == test_data[i].expected_parameters.MipLevels,
|
||||
"Test %u: Expected MipLevels %u, got %u\n", i, test_data[i].expected_parameters.MipLevels, parameters.MipLevels);
|
||||
ok(parameters.ArraySize == test_data[i].expected_parameters.ArraySize,
|
||||
"Test %u: Expected ArraySize %u, got %u\n", i, test_data[i].expected_parameters.ArraySize, parameters.ArraySize);
|
||||
ok(parameters.DxgiFormat == test_data[i].expected_parameters.DxgiFormat,
|
||||
"Test %u: Expected DxgiFormat %#x, got %#x\n", i, test_data[i].expected_parameters.DxgiFormat, parameters.DxgiFormat);
|
||||
ok(parameters.Dimension == test_data[i].expected_parameters.Dimension,
|
||||
"Test %u: Expected Dimension %#x, got %#x\n", i, test_data[i].expected_parameters.Dimension, parameters.Dimension);
|
||||
ok(parameters.AlphaMode == test_data[i].expected_parameters.AlphaMode,
|
||||
"Test %u: Expected AlphaMode %#x, got %#x\n", i, test_data[i].expected_parameters.AlphaMode, parameters.AlphaMode);
|
||||
ok (parameters.Width == test_data[i].expected_parameters.Width,
|
||||
"%d, Expected Width=%d, got %d\n", i, test_data[i].expected_parameters.Width, parameters.Width);
|
||||
ok (parameters.Height == test_data[i].expected_parameters.Height,
|
||||
"%d, Expected Height=%d, got %d\n", i, test_data[i].expected_parameters.Height, parameters.Height);
|
||||
ok (parameters.Depth == test_data[i].expected_parameters.Depth,
|
||||
"%d, Expected Depth=%d, got %d\n", i, test_data[i].expected_parameters.Depth, parameters.Depth);
|
||||
ok (parameters.MipLevels == test_data[i].expected_parameters.MipLevels,
|
||||
"%d, Expected MipLevels=%d, got %d\n", i, test_data[i].expected_parameters.MipLevels, parameters.MipLevels);
|
||||
ok (parameters.ArraySize == test_data[i].expected_parameters.ArraySize,
|
||||
"%d, Expected ArraySize=%d, got %d\n", i, test_data[i].expected_parameters.ArraySize, parameters.ArraySize);
|
||||
ok (parameters.DxgiFormat == test_data[i].expected_parameters.DxgiFormat,
|
||||
"%d, Expected DxgiFormat=0x%x, got 0x%x\n", i, test_data[i].expected_parameters.DxgiFormat, parameters.DxgiFormat);
|
||||
ok (parameters.Dimension == test_data[i].expected_parameters.Dimension,
|
||||
"%d, Expected Dimension=0x%x, got 0x%x\n", i, test_data[i].expected_parameters.Dimension, parameters.Dimension);
|
||||
ok (parameters.AlphaMode == test_data[i].expected_parameters.AlphaMode,
|
||||
"%d, Expected AlphaMode=0x%x, got 0x%x\n", i, test_data[i].expected_parameters.AlphaMode, parameters.AlphaMode);
|
||||
}
|
||||
hr = IWICDdsDecoder_GetParameters(dds_decoder, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u: GetParameters got unexpected hr %#x\n", i, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: Expected hr=E_INVALIDARG, got %x\n", i, hr);
|
||||
|
||||
next:
|
||||
if (decoder) IWICBitmapDecoder_Release(decoder);
|
||||
|
@ -454,13 +452,13 @@ static void test_dds_decoder_frame_properties(IWICBitmapFrameDecode *frame_decod
|
|||
/* frame size tests */
|
||||
|
||||
hr = IWICBitmapFrameDecode_GetSize(frame_decode, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetSize got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICBitmapFrameDecode_GetSize(frame_decode, NULL, &height);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetSize got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICBitmapFrameDecode_GetSize(frame_decode, &width, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetSize got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICBitmapFrameDecode_GetSize(frame_decode, &width, &height);
|
||||
ok(hr == S_OK, "Test %u, frame %u: GetSize failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: GetSize failed for frame %d, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
|
||||
depth = params->Depth;
|
||||
|
@ -474,57 +472,56 @@ static void test_dds_decoder_frame_properties(IWICBitmapFrameDecode *frame_decod
|
|||
slice_index -= depth;
|
||||
if (depth > 1) depth /= 2;
|
||||
}
|
||||
ok(width == expected_width, "Test %u, frame %u: Expected width %u, got %u\n", i, expected_width, frame_index, width);
|
||||
ok(height == expected_height, "Test %u, frame %u: Expected height %u, got %u\n", i, expected_height, frame_index, height);
|
||||
ok (width == expected_width, "%d: Expected width %d for frame %d, got %d\n", i, expected_width, frame_index, width);
|
||||
ok (height == expected_height, "%d: Expected height %d for frame %d, got %d\n", i, expected_height, frame_index, height);
|
||||
|
||||
/* frame format information tests */
|
||||
|
||||
hr = IWICDdsFrameDecode_GetFormatInfo(dds_frame, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetFormatInfo got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_GetFormatInfo(dds_frame, &format_info);
|
||||
ok(hr == S_OK, "Test %u, frame %u: GetFormatInfo failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] GetFormatInfo failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
|
||||
ok(format_info.DxgiFormat == test_data[i].expected_parameters.DxgiFormat,
|
||||
"Test %u, frame %u: Expected DXGI format %#x, got %#x\n",
|
||||
i, frame_index, test_data[i].expected_parameters.DxgiFormat, format_info.DxgiFormat);
|
||||
ok(format_info.BytesPerBlock == get_bytes_per_block(format_info.DxgiFormat),
|
||||
"Test %u, frame %u: Expected bytes per block %u, got %u\n",
|
||||
i, frame_index, get_bytes_per_block(format_info.DxgiFormat), format_info.BytesPerBlock);
|
||||
ok(format_info.BlockWidth == 4 || format_info.BlockWidth == 1,
|
||||
"Test %u, frame %u: Got unexpected block width %u\n", i, frame_index, format_info.BlockWidth);
|
||||
ok(format_info.BlockHeight == 4 || format_info.BlockHeight == 1,
|
||||
"Test %u, frame %u: Got unexpected block height %u\n", i, frame_index, format_info.BlockHeight);
|
||||
ok (format_info.DxgiFormat == test_data[i].expected_parameters.DxgiFormat,
|
||||
"%d: [frame %d] Expected DXGI format 0x%x, got 0x%x\n",
|
||||
i, frame_index, test_data[i].expected_parameters.DxgiFormat, format_info.DxgiFormat);
|
||||
ok (format_info.BytesPerBlock == get_bytes_per_block(format_info.DxgiFormat),
|
||||
"%d: [frame %d] Expected bytes per block %d, got %d\n",
|
||||
i, frame_index, get_bytes_per_block(format_info.DxgiFormat), format_info.BytesPerBlock);
|
||||
ok (format_info.BlockWidth == 4 || format_info.BlockWidth == 1,
|
||||
"%d: [frame %d] Got unexpected block width %d\n", i, frame_index, format_info.BlockWidth);
|
||||
ok (format_info.BlockHeight == 4 || format_info.BlockHeight == 1,
|
||||
"%d: [frame %d] Got unexpected block height %d\n", i, frame_index, format_info.BlockHeight);
|
||||
|
||||
/* size in blocks tests */
|
||||
|
||||
hr = IWICDdsFrameDecode_GetSizeInBlocks(dds_frame, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetSizeInBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_GetSizeInBlocks(dds_frame, NULL, &height_in_blocks);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetSizeInBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_GetSizeInBlocks(dds_frame, &width_in_blocks, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: GetSizeInBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_GetSizeInBlocks(dds_frame, &width_in_blocks, &height_in_blocks);
|
||||
ok(hr == S_OK, "Test %u, frame %u: GetSizeInBlocks failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] GetSizeInBlocks failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
|
||||
expected_width_in_blocks = (expected_width + format_info.BlockWidth - 1) / format_info.BlockWidth;
|
||||
expected_height_in_blocks = (expected_height + format_info.BlockHeight - 1) / format_info.BlockHeight;
|
||||
ok(width_in_blocks == expected_width_in_blocks,
|
||||
"Test %u, frame %u: Expected width in blocks %u, got %u\n", i, frame_index, expected_width_in_blocks, width_in_blocks);
|
||||
ok(height_in_blocks == expected_height_in_blocks,
|
||||
"Test %u, frame %u: Expected height in blocks %u, got %u\n", i, frame_index, expected_height_in_blocks, height_in_blocks);
|
||||
ok (width_in_blocks == expected_width_in_blocks,
|
||||
"%d: [frame %d] Expected width in blocks %d, got %d\n", i, frame_index, expected_width_in_blocks, width_in_blocks);
|
||||
ok (height_in_blocks == expected_height_in_blocks,
|
||||
"%d: [frame %d] Expected height in blocks %d, got %d\n", i, frame_index, expected_height_in_blocks, height_in_blocks);
|
||||
|
||||
/* pixel format tests */
|
||||
|
||||
hr = IWICBitmapFrameDecode_GetPixelFormat(frame_decode, NULL);
|
||||
todo_wine ok(hr == E_INVALIDARG, "Test %u, frame %u: GetPixelFormat got unexpected hr %#x\n", i, frame_index, hr);
|
||||
todo_wine ok (hr == E_INVALIDARG, "[%d, frame %d] GetPixelFormat got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICBitmapFrameDecode_GetPixelFormat(frame_decode, &pixel_format);
|
||||
todo_wine ok(hr == S_OK, "Test %u, frame %u: GetPixelFormat failed, hr %#x\n", i, frame_index, hr);
|
||||
todo_wine ok (hr == S_OK, "[%d, frame %d] GetPixelFormat failed\n", i, frame_index);
|
||||
if (hr != S_OK) return;
|
||||
todo_wine ok(IsEqualGUID(&pixel_format, test_data[i].expected_pixel_format),
|
||||
"Test %u, frame %u: Expected pixel format %s, got %s\n",
|
||||
i, frame_index, debugstr_guid(test_data[i].expected_pixel_format), debugstr_guid(&pixel_format));
|
||||
todo_wine ok (IsEqualGUID(&pixel_format, test_data[i].expected_pixel_format),
|
||||
"[%d, frame %d] Got unexpected pixel format %s\n", i, frame_index, debugstr_guid(&pixel_format));
|
||||
}
|
||||
|
||||
static void test_dds_decoder_frame_data(IWICDdsFrameDecode *dds_frame, UINT frame_count, WICDdsParameters *params,
|
||||
|
@ -541,56 +538,56 @@ static void test_dds_decoder_frame_data(IWICDdsFrameDecode *dds_frame, UINT fram
|
|||
int slice_index;
|
||||
|
||||
hr = IWICDdsFrameDecode_GetFormatInfo(dds_frame, &format_info);
|
||||
ok(hr == S_OK, "Test %u, frame %u: GetFormatInfo failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] GetFormatInfo failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
hr = IWICDdsFrameDecode_GetSizeInBlocks(dds_frame, &width_in_blocks, &height_in_blocks);
|
||||
ok(hr == S_OK, "Test %u, frame %u: GetSizeInBlocks failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] GetSizeInBlocks failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
stride = rect.Width * format_info.BytesPerBlock;
|
||||
frame_stride = width_in_blocks * format_info.BytesPerBlock;
|
||||
frame_size = frame_stride * height_in_blocks;
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, 0, 0, NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect_test_a, stride, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect_test_b, stride, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect_test_c, stride, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect_test_d, stride, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride - 1, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride * 2, sizeof(buffer), buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride, sizeof(buffer), buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride, frame_stride * height_in_blocks - 1, buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride, frame_stride * height_in_blocks, buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, 0, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride - 1, sizeof(buffer), buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride * 2, sizeof(buffer), buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride, 0, buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride, 1, buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride, stride * rect.Height - 1, buffer);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride, stride * rect.Height, buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride, sizeof(buffer), NULL);
|
||||
ok(hr == E_INVALIDARG, "Test %u, frame %u: CopyBlocks got unexpected hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == E_INVALIDARG, "%d: [frame %d] Got unexpected hr %x\n", i, frame_index, hr);
|
||||
|
||||
block_offset = 128; /* DDS magic and header */
|
||||
if (has_extended_header(test_data[i].data)) block_offset += 20; /* DDS extended header */
|
||||
|
@ -614,22 +611,22 @@ static void test_dds_decoder_frame_data(IWICDdsFrameDecode *dds_frame, UINT fram
|
|||
}
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, &rect, stride, sizeof(buffer), buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] CopyBlocks failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
ok(!strncmp((const char *)test_data[i].data + block_offset, (const char *)buffer, format_info.BytesPerBlock),
|
||||
"Test %u, frame %u: Block data mismatch\n", i, frame_index);
|
||||
ok (!strncmp((const char *)test_data[i].data + block_offset, (const char *)buffer, format_info.BytesPerBlock),
|
||||
"%d: [frame %d] Block data mismatch\n", i, frame_index);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride, sizeof(buffer), buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] CopyBlocks failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
ok(!strncmp((const char *)test_data[i].data + block_offset, (const char *)buffer, frame_size),
|
||||
"Test %u, frame %u: Block data mismatch\n", i, frame_index);
|
||||
ok (!strncmp((const char *)test_data[i].data + block_offset, (const char *)buffer, frame_size),
|
||||
"%d: [frame %d] Block data mismatch\n", i, frame_index);
|
||||
|
||||
hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, frame_stride * 2, sizeof(buffer), buffer);
|
||||
ok(hr == S_OK, "Test %u, frame %u: CopyBlocks failed, hr %#x\n", i, frame_index, hr);
|
||||
ok (hr == S_OK, "%d: [frame %d] CopyBlocks failed, hr=%x\n", i, frame_index, hr);
|
||||
if (hr != S_OK) return;
|
||||
ok(!strncmp((const char *)test_data[i].data + block_offset, (const char *)buffer, frame_size),
|
||||
"Test %u, frame %u: Block data mismatch\n", i, frame_index);
|
||||
ok (!strncmp((const char *)test_data[i].data + block_offset, (const char *)buffer, frame_size),
|
||||
"%d: [frame %d] Block data mismatch\n", i, frame_index);
|
||||
}
|
||||
|
||||
static void test_dds_decoder_frame(IWICBitmapDecoder *decoder, int i)
|
||||
|
@ -640,13 +637,13 @@ static void test_dds_decoder_frame(IWICBitmapDecoder *decoder, int i)
|
|||
WICDdsParameters params;
|
||||
|
||||
hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
ok(hr == S_OK, "Test %u: GetFrameCount failed, hr %#x\n", i, hr);
|
||||
ok (hr == S_OK, "%d: GetFrameCount failed, hr=%x\n", i, hr);
|
||||
if (hr != S_OK) return;
|
||||
hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
|
||||
ok(hr == S_OK, "Test %u: QueryInterface failed, hr %#x\n", i, hr);
|
||||
ok(hr == S_OK, "%d: QueryInterface failed, hr=%x\n", i, hr);
|
||||
if (hr != S_OK) goto end;
|
||||
hr = IWICDdsDecoder_GetParameters(dds_decoder, ¶ms);
|
||||
ok(hr == S_OK, "Test %u: GetParameters failed, hr %#x\n", i, hr);
|
||||
ok (hr == S_OK, "%d: GetParameters failed, hr=%x\n", i, hr);
|
||||
if (hr != S_OK) goto end;
|
||||
|
||||
for (j = 0; j < frame_count; j++)
|
||||
|
@ -655,10 +652,10 @@ static void test_dds_decoder_frame(IWICBitmapDecoder *decoder, int i)
|
|||
IWICDdsFrameDecode *dds_frame = NULL;
|
||||
|
||||
hr = IWICBitmapDecoder_GetFrame(decoder, j, &frame_decode);
|
||||
ok(hr == S_OK, "Test %u, frame %u: GetFrame failed, hr %#x\n", i, j, hr);
|
||||
ok (hr == S_OK, "%d: GetFrame failed for frame %d, hr=%x\n", i, j, hr);
|
||||
if (hr != S_OK) goto next;
|
||||
hr = IWICBitmapFrameDecode_QueryInterface(frame_decode, &IID_IWICDdsFrameDecode, (void **)&dds_frame);
|
||||
ok(hr == S_OK, "Test %u, frame %u: QueryInterface failed, hr %#x\n", i, j, hr);
|
||||
ok(hr == S_OK, "%d: [frame %d] QueryInterface failed, hr=%x\n", i, j, hr);
|
||||
if (hr != S_OK) goto next;
|
||||
|
||||
test_dds_decoder_frame_properties(frame_decode, dds_frame, frame_count, ¶ms, i, j);
|
||||
|
@ -709,12 +706,12 @@ START_TEST(ddsformat)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IWICImagingFactory, (void **)&factory);
|
||||
ok(hr == S_OK, "CoCreateInstance failed, hr %#x\n", hr);
|
||||
ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr);
|
||||
if (hr != S_OK) goto end;
|
||||
|
||||
test_dds_decoder();
|
||||
|
||||
end:
|
||||
if (factory) IWICImagingFactory_Release(factory);
|
||||
if(factory) IWICImagingFactory_Release(factory);
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
|
@ -416,8 +416,8 @@ static GstCaps *amt_to_gst_caps_video(const AM_MEDIA_TYPE *mt)
|
|||
/* Clear some fields that shouldn't prevent us from connecting. */
|
||||
for (i = 0; i < gst_caps_get_size(caps); ++i)
|
||||
{
|
||||
gst_structure_remove_fields(gst_caps_get_structure(caps, i),
|
||||
"framerate", "pixel-aspect-ratio", "colorimetry", "chroma-site", NULL);
|
||||
gst_structure_remove_field(gst_caps_get_structure(caps, i), "framerate");
|
||||
gst_structure_remove_field(gst_caps_get_structure(caps, i), "pixel-aspect-ratio");
|
||||
}
|
||||
}
|
||||
return caps;
|
||||
|
|
|
@ -64,7 +64,7 @@ from enum import Enum
|
|||
LOGGER = logging.Logger("vulkan")
|
||||
LOGGER.addHandler(logging.StreamHandler())
|
||||
|
||||
VK_XML_VERSION = "1.2.145"
|
||||
VK_XML_VERSION = "1.2.142"
|
||||
WINE_VK_VERSION = (1, 2)
|
||||
|
||||
# Filenames to create.
|
||||
|
|
|
@ -5,7 +5,33 @@
|
|||
*
|
||||
* Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* ---- Exceptions to the Apache 2.0 License: ----
|
||||
*
|
||||
* As an exception, if you use this Software to generate code and portions of
|
||||
* this Software are embedded into the generated code as a result, you may
|
||||
* redistribute such product without providing attribution as would otherwise
|
||||
* be required by Sections 4(a), 4(b) and 4(d) of the License.
|
||||
*
|
||||
* In addition, if you combine or link code generated by this Software with
|
||||
* software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
||||
* ("`Combined Software`") and if a court of competent jurisdiction determines
|
||||
* that the patent provision (Section 3), the indemnity provision (Section 9)
|
||||
* or other Section of the License conflicts with the conditions of the
|
||||
* applicable GPL or LGPL license, you may retroactively and prospectively
|
||||
* choose to deem waived or otherwise exclude such Section(s) of the License,
|
||||
* but only in their entirety and only with respect to the Combined Software.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1559,22 +1585,6 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT:
|
||||
{
|
||||
const VkPhysicalDevicePrivateDataFeaturesEXT *in = (const VkPhysicalDevicePrivateDataFeaturesEXT *)in_header;
|
||||
VkPhysicalDevicePrivateDataFeaturesEXT *out;
|
||||
|
||||
if (!(out = heap_alloc(sizeof(*out)))) goto out_of_memory;
|
||||
|
||||
out->sType = in->sType;
|
||||
out->pNext = NULL;
|
||||
out->privateData = in->privateData;
|
||||
|
||||
out_header->pNext = (VkBaseOutStructure *)out;
|
||||
out_header = out_header->pNext;
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
|
||||
{
|
||||
const VkPhysicalDeviceFeatures2 *in = (const VkPhysicalDeviceFeatures2 *)in_header;
|
||||
|
@ -2665,22 +2675,6 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT:
|
||||
{
|
||||
const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *in = (const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *)in_header;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *out;
|
||||
|
||||
if (!(out = heap_alloc(sizeof(*out)))) goto out_of_memory;
|
||||
|
||||
out->sType = in->sType;
|
||||
out->pNext = NULL;
|
||||
out->extendedDynamicState = in->extendedDynamicState;
|
||||
|
||||
out_header->pNext = (VkBaseOutStructure *)out;
|
||||
out_header = out_header->pNext;
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV:
|
||||
{
|
||||
const VkPhysicalDeviceDiagnosticsConfigFeaturesNV *in = (const VkPhysicalDeviceDiagnosticsConfigFeaturesNV *)in_header;
|
||||
|
@ -3114,12 +3108,6 @@ void WINAPI wine_vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t
|
|||
commandBuffer->device->funcs.p_vkCmdBindVertexBuffers(commandBuffer->command_buffer, firstBinding, bindingCount, pBuffers, pOffsets);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets, const VkDeviceSize *pSizes, const VkDeviceSize *pStrides)
|
||||
{
|
||||
TRACE("%p, %u, %u, %p, %p, %p, %p\n", commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides);
|
||||
commandBuffer->device->funcs.p_vkCmdBindVertexBuffers2EXT(commandBuffer->command_buffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides);
|
||||
}
|
||||
|
||||
void WINAPI wine_vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter)
|
||||
{
|
||||
TRACE("%p, 0x%s, %#x, 0x%s, %#x, %u, %p, %#x\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions, filter);
|
||||
|
@ -3515,12 +3503,6 @@ static void WINAPI wine_vkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffe
|
|||
commandBuffer->device->funcs.p_vkCmdSetCoarseSampleOrderNV(commandBuffer->command_buffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode)
|
||||
{
|
||||
TRACE("%p, %#x\n", commandBuffer, cullMode);
|
||||
commandBuffer->device->funcs.p_vkCmdSetCullModeEXT(commandBuffer->command_buffer, cullMode);
|
||||
}
|
||||
|
||||
void WINAPI wine_vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor)
|
||||
{
|
||||
TRACE("%p, %f, %f, %f\n", commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
|
||||
|
@ -3533,30 +3515,6 @@ void WINAPI wine_vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDep
|
|||
commandBuffer->device->funcs.p_vkCmdSetDepthBounds(commandBuffer->command_buffer, minDepthBounds, maxDepthBounds);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable)
|
||||
{
|
||||
TRACE("%p, %u\n", commandBuffer, depthBoundsTestEnable);
|
||||
commandBuffer->device->funcs.p_vkCmdSetDepthBoundsTestEnableEXT(commandBuffer->command_buffer, depthBoundsTestEnable);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp)
|
||||
{
|
||||
TRACE("%p, %#x\n", commandBuffer, depthCompareOp);
|
||||
commandBuffer->device->funcs.p_vkCmdSetDepthCompareOpEXT(commandBuffer->command_buffer, depthCompareOp);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable)
|
||||
{
|
||||
TRACE("%p, %u\n", commandBuffer, depthTestEnable);
|
||||
commandBuffer->device->funcs.p_vkCmdSetDepthTestEnableEXT(commandBuffer->command_buffer, depthTestEnable);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable)
|
||||
{
|
||||
TRACE("%p, %u\n", commandBuffer, depthWriteEnable);
|
||||
commandBuffer->device->funcs.p_vkCmdSetDepthWriteEnableEXT(commandBuffer->command_buffer, depthWriteEnable);
|
||||
}
|
||||
|
||||
void WINAPI wine_vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask)
|
||||
{
|
||||
TRACE("%p, %u\n", commandBuffer, deviceMask);
|
||||
|
@ -3587,12 +3545,6 @@ static void WINAPI wine_vkCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer
|
|||
commandBuffer->device->funcs.p_vkCmdSetExclusiveScissorNV(commandBuffer->command_buffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace)
|
||||
{
|
||||
TRACE("%p, %#x\n", commandBuffer, frontFace);
|
||||
commandBuffer->device->funcs.p_vkCmdSetFrontFaceEXT(commandBuffer->command_buffer, frontFace);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern)
|
||||
{
|
||||
TRACE("%p, %u, %u\n", commandBuffer, lineStippleFactor, lineStipplePattern);
|
||||
|
@ -3645,12 +3597,6 @@ static VkResult WINAPI wine_vkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer
|
|||
return commandBuffer->device->funcs.p_vkCmdSetPerformanceStreamMarkerINTEL(commandBuffer->command_buffer, pMarkerInfo);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology)
|
||||
{
|
||||
TRACE("%p, %#x\n", commandBuffer, primitiveTopology);
|
||||
commandBuffer->device->funcs.p_vkCmdSetPrimitiveTopologyEXT(commandBuffer->command_buffer, primitiveTopology);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT *pSampleLocationsInfo)
|
||||
{
|
||||
TRACE("%p, %p\n", commandBuffer, pSampleLocationsInfo);
|
||||
|
@ -3663,36 +3609,18 @@ void WINAPI wine_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstSc
|
|||
commandBuffer->device->funcs.p_vkCmdSetScissor(commandBuffer->command_buffer, firstScissor, scissorCount, pScissors);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D *pScissors)
|
||||
{
|
||||
TRACE("%p, %u, %p\n", commandBuffer, scissorCount, pScissors);
|
||||
commandBuffer->device->funcs.p_vkCmdSetScissorWithCountEXT(commandBuffer->command_buffer, scissorCount, pScissors);
|
||||
}
|
||||
|
||||
void WINAPI wine_vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask)
|
||||
{
|
||||
TRACE("%p, %#x, %u\n", commandBuffer, faceMask, compareMask);
|
||||
commandBuffer->device->funcs.p_vkCmdSetStencilCompareMask(commandBuffer->command_buffer, faceMask, compareMask);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp)
|
||||
{
|
||||
TRACE("%p, %#x, %#x, %#x, %#x, %#x\n", commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp);
|
||||
commandBuffer->device->funcs.p_vkCmdSetStencilOpEXT(commandBuffer->command_buffer, faceMask, failOp, passOp, depthFailOp, compareOp);
|
||||
}
|
||||
|
||||
void WINAPI wine_vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference)
|
||||
{
|
||||
TRACE("%p, %#x, %u\n", commandBuffer, faceMask, reference);
|
||||
commandBuffer->device->funcs.p_vkCmdSetStencilReference(commandBuffer->command_buffer, faceMask, reference);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable)
|
||||
{
|
||||
TRACE("%p, %u\n", commandBuffer, stencilTestEnable);
|
||||
commandBuffer->device->funcs.p_vkCmdSetStencilTestEnableEXT(commandBuffer->command_buffer, stencilTestEnable);
|
||||
}
|
||||
|
||||
void WINAPI wine_vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask)
|
||||
{
|
||||
TRACE("%p, %#x, %u\n", commandBuffer, faceMask, writeMask);
|
||||
|
@ -3717,12 +3645,6 @@ static void WINAPI wine_vkCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer
|
|||
commandBuffer->device->funcs.p_vkCmdSetViewportWScalingNV(commandBuffer->command_buffer, firstViewport, viewportCount, pViewportWScalings);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport *pViewports)
|
||||
{
|
||||
TRACE("%p, %u, %p\n", commandBuffer, viewportCount, pViewports);
|
||||
commandBuffer->device->funcs.p_vkCmdSetViewportWithCountEXT(commandBuffer->command_buffer, viewportCount, pViewports);
|
||||
}
|
||||
|
||||
static void WINAPI wine_vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth)
|
||||
{
|
||||
TRACE("%p, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, %u, %u, %u\n", commandBuffer, wine_dbgstr_longlong(raygenShaderBindingTableBuffer), wine_dbgstr_longlong(raygenShaderBindingOffset), wine_dbgstr_longlong(missShaderBindingTableBuffer), wine_dbgstr_longlong(missShaderBindingOffset), wine_dbgstr_longlong(missShaderBindingStride), wine_dbgstr_longlong(hitShaderBindingTableBuffer), wine_dbgstr_longlong(hitShaderBindingOffset), wine_dbgstr_longlong(hitShaderBindingStride), wine_dbgstr_longlong(callableShaderBindingTableBuffer), wine_dbgstr_longlong(callableShaderBindingOffset), wine_dbgstr_longlong(callableShaderBindingStride), width, height, depth);
|
||||
|
@ -5408,7 +5330,6 @@ static const struct vulkan_func vk_device_dispatch_table[] =
|
|||
{"vkCmdBindShadingRateImageNV", &wine_vkCmdBindShadingRateImageNV},
|
||||
{"vkCmdBindTransformFeedbackBuffersEXT", &wine_vkCmdBindTransformFeedbackBuffersEXT},
|
||||
{"vkCmdBindVertexBuffers", &wine_vkCmdBindVertexBuffers},
|
||||
{"vkCmdBindVertexBuffers2EXT", &wine_vkCmdBindVertexBuffers2EXT},
|
||||
{"vkCmdBlitImage", &wine_vkCmdBlitImage},
|
||||
{"vkCmdBuildAccelerationStructureNV", &wine_vkCmdBuildAccelerationStructureNV},
|
||||
{"vkCmdClearAttachments", &wine_vkCmdClearAttachments},
|
||||
|
@ -5462,37 +5383,26 @@ static const struct vulkan_func vk_device_dispatch_table[] =
|
|||
{"vkCmdSetBlendConstants", &wine_vkCmdSetBlendConstants},
|
||||
{"vkCmdSetCheckpointNV", &wine_vkCmdSetCheckpointNV},
|
||||
{"vkCmdSetCoarseSampleOrderNV", &wine_vkCmdSetCoarseSampleOrderNV},
|
||||
{"vkCmdSetCullModeEXT", &wine_vkCmdSetCullModeEXT},
|
||||
{"vkCmdSetDepthBias", &wine_vkCmdSetDepthBias},
|
||||
{"vkCmdSetDepthBounds", &wine_vkCmdSetDepthBounds},
|
||||
{"vkCmdSetDepthBoundsTestEnableEXT", &wine_vkCmdSetDepthBoundsTestEnableEXT},
|
||||
{"vkCmdSetDepthCompareOpEXT", &wine_vkCmdSetDepthCompareOpEXT},
|
||||
{"vkCmdSetDepthTestEnableEXT", &wine_vkCmdSetDepthTestEnableEXT},
|
||||
{"vkCmdSetDepthWriteEnableEXT", &wine_vkCmdSetDepthWriteEnableEXT},
|
||||
{"vkCmdSetDeviceMask", &wine_vkCmdSetDeviceMask},
|
||||
{"vkCmdSetDeviceMaskKHR", &wine_vkCmdSetDeviceMaskKHR},
|
||||
{"vkCmdSetDiscardRectangleEXT", &wine_vkCmdSetDiscardRectangleEXT},
|
||||
{"vkCmdSetEvent", &wine_vkCmdSetEvent},
|
||||
{"vkCmdSetExclusiveScissorNV", &wine_vkCmdSetExclusiveScissorNV},
|
||||
{"vkCmdSetFrontFaceEXT", &wine_vkCmdSetFrontFaceEXT},
|
||||
{"vkCmdSetLineStippleEXT", &wine_vkCmdSetLineStippleEXT},
|
||||
{"vkCmdSetLineWidth", &wine_vkCmdSetLineWidth},
|
||||
{"vkCmdSetPerformanceMarkerINTEL", &wine_vkCmdSetPerformanceMarkerINTEL},
|
||||
{"vkCmdSetPerformanceOverrideINTEL", &wine_vkCmdSetPerformanceOverrideINTEL},
|
||||
{"vkCmdSetPerformanceStreamMarkerINTEL", &wine_vkCmdSetPerformanceStreamMarkerINTEL},
|
||||
{"vkCmdSetPrimitiveTopologyEXT", &wine_vkCmdSetPrimitiveTopologyEXT},
|
||||
{"vkCmdSetSampleLocationsEXT", &wine_vkCmdSetSampleLocationsEXT},
|
||||
{"vkCmdSetScissor", &wine_vkCmdSetScissor},
|
||||
{"vkCmdSetScissorWithCountEXT", &wine_vkCmdSetScissorWithCountEXT},
|
||||
{"vkCmdSetStencilCompareMask", &wine_vkCmdSetStencilCompareMask},
|
||||
{"vkCmdSetStencilOpEXT", &wine_vkCmdSetStencilOpEXT},
|
||||
{"vkCmdSetStencilReference", &wine_vkCmdSetStencilReference},
|
||||
{"vkCmdSetStencilTestEnableEXT", &wine_vkCmdSetStencilTestEnableEXT},
|
||||
{"vkCmdSetStencilWriteMask", &wine_vkCmdSetStencilWriteMask},
|
||||
{"vkCmdSetViewport", &wine_vkCmdSetViewport},
|
||||
{"vkCmdSetViewportShadingRatePaletteNV", &wine_vkCmdSetViewportShadingRatePaletteNV},
|
||||
{"vkCmdSetViewportWScalingNV", &wine_vkCmdSetViewportWScalingNV},
|
||||
{"vkCmdSetViewportWithCountEXT", &wine_vkCmdSetViewportWithCountEXT},
|
||||
{"vkCmdTraceRaysNV", &wine_vkCmdTraceRaysNV},
|
||||
{"vkCmdUpdateBuffer", &wine_vkCmdUpdateBuffer},
|
||||
{"vkCmdWaitEvents", &wine_vkCmdWaitEvents},
|
||||
|
@ -5763,7 +5673,6 @@ static const char * const vk_device_extensions[] =
|
|||
"VK_EXT_depth_range_unrestricted",
|
||||
"VK_EXT_descriptor_indexing",
|
||||
"VK_EXT_discard_rectangles",
|
||||
"VK_EXT_extended_dynamic_state",
|
||||
"VK_EXT_external_memory_host",
|
||||
"VK_EXT_filter_cubic",
|
||||
"VK_EXT_fragment_density_map",
|
||||
|
|
|
@ -5,7 +5,33 @@
|
|||
*
|
||||
* Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* ---- Exceptions to the Apache 2.0 License: ----
|
||||
*
|
||||
* As an exception, if you use this Software to generate code and portions of
|
||||
* this Software are embedded into the generated code as a result, you may
|
||||
* redistribute such product without providing attribution as would otherwise
|
||||
* be required by Sections 4(a), 4(b) and 4(d) of the License.
|
||||
*
|
||||
* In addition, if you combine or link code generated by this Software with
|
||||
* software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
||||
* ("`Combined Software`") and if a court of competent jurisdiction determines
|
||||
* that the patent provision (Section 3), the indemnity provision (Section 9)
|
||||
* or other Section of the License conflicts with the conditions of the
|
||||
* applicable GPL or LGPL license, you may retroactively and prospectively
|
||||
* choose to deem waived or otherwise exclude such Section(s) of the License,
|
||||
* but only in their entirety and only with respect to the Combined Software.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1054,7 +1080,6 @@ struct vulkan_device_funcs
|
|||
void (*p_vkCmdBindShadingRateImageNV)(VkCommandBuffer, VkImageView, VkImageLayout);
|
||||
void (*p_vkCmdBindTransformFeedbackBuffersEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer *, const VkDeviceSize *, const VkDeviceSize *);
|
||||
void (*p_vkCmdBindVertexBuffers)(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer *, const VkDeviceSize *);
|
||||
void (*p_vkCmdBindVertexBuffers2EXT)(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer *, const VkDeviceSize *, const VkDeviceSize *, const VkDeviceSize *);
|
||||
void (*p_vkCmdBlitImage)(VkCommandBuffer, VkImage, VkImageLayout, VkImage, VkImageLayout, uint32_t, const VkImageBlit *, VkFilter);
|
||||
#if defined(USE_STRUCT_CONVERSION)
|
||||
void (*p_vkCmdBuildAccelerationStructureNV)(VkCommandBuffer, const VkAccelerationStructureInfoNV_host *, VkBuffer, VkDeviceSize, VkBool32, VkAccelerationStructureKHR, VkAccelerationStructureKHR, VkBuffer, VkDeviceSize);
|
||||
|
@ -1140,19 +1165,13 @@ struct vulkan_device_funcs
|
|||
void (*p_vkCmdSetBlendConstants)(VkCommandBuffer, const float[4]);
|
||||
void (*p_vkCmdSetCheckpointNV)(VkCommandBuffer, const void *);
|
||||
void (*p_vkCmdSetCoarseSampleOrderNV)(VkCommandBuffer, VkCoarseSampleOrderTypeNV, uint32_t, const VkCoarseSampleOrderCustomNV *);
|
||||
void (*p_vkCmdSetCullModeEXT)(VkCommandBuffer, VkCullModeFlags);
|
||||
void (*p_vkCmdSetDepthBias)(VkCommandBuffer, float, float, float);
|
||||
void (*p_vkCmdSetDepthBounds)(VkCommandBuffer, float, float);
|
||||
void (*p_vkCmdSetDepthBoundsTestEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
void (*p_vkCmdSetDepthCompareOpEXT)(VkCommandBuffer, VkCompareOp);
|
||||
void (*p_vkCmdSetDepthTestEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
void (*p_vkCmdSetDepthWriteEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
void (*p_vkCmdSetDeviceMask)(VkCommandBuffer, uint32_t);
|
||||
void (*p_vkCmdSetDeviceMaskKHR)(VkCommandBuffer, uint32_t);
|
||||
void (*p_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
|
||||
void (*p_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
|
||||
void (*p_vkCmdSetExclusiveScissorNV)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
|
||||
void (*p_vkCmdSetFrontFaceEXT)(VkCommandBuffer, VkFrontFace);
|
||||
void (*p_vkCmdSetLineStippleEXT)(VkCommandBuffer, uint32_t, uint16_t);
|
||||
void (*p_vkCmdSetLineWidth)(VkCommandBuffer, float);
|
||||
#if defined(USE_STRUCT_CONVERSION)
|
||||
|
@ -1166,19 +1185,14 @@ struct vulkan_device_funcs
|
|||
VkResult (*p_vkCmdSetPerformanceOverrideINTEL)(VkCommandBuffer, const VkPerformanceOverrideInfoINTEL *);
|
||||
#endif
|
||||
VkResult (*p_vkCmdSetPerformanceStreamMarkerINTEL)(VkCommandBuffer, const VkPerformanceStreamMarkerInfoINTEL *);
|
||||
void (*p_vkCmdSetPrimitiveTopologyEXT)(VkCommandBuffer, VkPrimitiveTopology);
|
||||
void (*p_vkCmdSetSampleLocationsEXT)(VkCommandBuffer, const VkSampleLocationsInfoEXT *);
|
||||
void (*p_vkCmdSetScissor)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
|
||||
void (*p_vkCmdSetScissorWithCountEXT)(VkCommandBuffer, uint32_t, const VkRect2D *);
|
||||
void (*p_vkCmdSetStencilCompareMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
|
||||
void (*p_vkCmdSetStencilOpEXT)(VkCommandBuffer, VkStencilFaceFlags, VkStencilOp, VkStencilOp, VkStencilOp, VkCompareOp);
|
||||
void (*p_vkCmdSetStencilReference)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
|
||||
void (*p_vkCmdSetStencilTestEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
void (*p_vkCmdSetStencilWriteMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
|
||||
void (*p_vkCmdSetViewport)(VkCommandBuffer, uint32_t, uint32_t, const VkViewport *);
|
||||
void (*p_vkCmdSetViewportShadingRatePaletteNV)(VkCommandBuffer, uint32_t, uint32_t, const VkShadingRatePaletteNV *);
|
||||
void (*p_vkCmdSetViewportWScalingNV)(VkCommandBuffer, uint32_t, uint32_t, const VkViewportWScalingNV *);
|
||||
void (*p_vkCmdSetViewportWithCountEXT)(VkCommandBuffer, uint32_t, const VkViewport *);
|
||||
void (*p_vkCmdTraceRaysNV)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, VkDeviceSize, VkBuffer, VkDeviceSize, VkDeviceSize, VkBuffer, VkDeviceSize, VkDeviceSize, uint32_t, uint32_t, uint32_t);
|
||||
void (*p_vkCmdUpdateBuffer)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize, const void *);
|
||||
#if defined(USE_STRUCT_CONVERSION)
|
||||
|
@ -1616,7 +1630,6 @@ struct vulkan_instance_funcs
|
|||
USE_VK_FUNC(vkCmdBindShadingRateImageNV) \
|
||||
USE_VK_FUNC(vkCmdBindTransformFeedbackBuffersEXT) \
|
||||
USE_VK_FUNC(vkCmdBindVertexBuffers) \
|
||||
USE_VK_FUNC(vkCmdBindVertexBuffers2EXT) \
|
||||
USE_VK_FUNC(vkCmdBlitImage) \
|
||||
USE_VK_FUNC(vkCmdBuildAccelerationStructureNV) \
|
||||
USE_VK_FUNC(vkCmdClearAttachments) \
|
||||
|
@ -1670,37 +1683,26 @@ struct vulkan_instance_funcs
|
|||
USE_VK_FUNC(vkCmdSetBlendConstants) \
|
||||
USE_VK_FUNC(vkCmdSetCheckpointNV) \
|
||||
USE_VK_FUNC(vkCmdSetCoarseSampleOrderNV) \
|
||||
USE_VK_FUNC(vkCmdSetCullModeEXT) \
|
||||
USE_VK_FUNC(vkCmdSetDepthBias) \
|
||||
USE_VK_FUNC(vkCmdSetDepthBounds) \
|
||||
USE_VK_FUNC(vkCmdSetDepthBoundsTestEnableEXT) \
|
||||
USE_VK_FUNC(vkCmdSetDepthCompareOpEXT) \
|
||||
USE_VK_FUNC(vkCmdSetDepthTestEnableEXT) \
|
||||
USE_VK_FUNC(vkCmdSetDepthWriteEnableEXT) \
|
||||
USE_VK_FUNC(vkCmdSetDeviceMask) \
|
||||
USE_VK_FUNC(vkCmdSetDeviceMaskKHR) \
|
||||
USE_VK_FUNC(vkCmdSetDiscardRectangleEXT) \
|
||||
USE_VK_FUNC(vkCmdSetEvent) \
|
||||
USE_VK_FUNC(vkCmdSetExclusiveScissorNV) \
|
||||
USE_VK_FUNC(vkCmdSetFrontFaceEXT) \
|
||||
USE_VK_FUNC(vkCmdSetLineStippleEXT) \
|
||||
USE_VK_FUNC(vkCmdSetLineWidth) \
|
||||
USE_VK_FUNC(vkCmdSetPerformanceMarkerINTEL) \
|
||||
USE_VK_FUNC(vkCmdSetPerformanceOverrideINTEL) \
|
||||
USE_VK_FUNC(vkCmdSetPerformanceStreamMarkerINTEL) \
|
||||
USE_VK_FUNC(vkCmdSetPrimitiveTopologyEXT) \
|
||||
USE_VK_FUNC(vkCmdSetSampleLocationsEXT) \
|
||||
USE_VK_FUNC(vkCmdSetScissor) \
|
||||
USE_VK_FUNC(vkCmdSetScissorWithCountEXT) \
|
||||
USE_VK_FUNC(vkCmdSetStencilCompareMask) \
|
||||
USE_VK_FUNC(vkCmdSetStencilOpEXT) \
|
||||
USE_VK_FUNC(vkCmdSetStencilReference) \
|
||||
USE_VK_FUNC(vkCmdSetStencilTestEnableEXT) \
|
||||
USE_VK_FUNC(vkCmdSetStencilWriteMask) \
|
||||
USE_VK_FUNC(vkCmdSetViewport) \
|
||||
USE_VK_FUNC(vkCmdSetViewportShadingRatePaletteNV) \
|
||||
USE_VK_FUNC(vkCmdSetViewportWScalingNV) \
|
||||
USE_VK_FUNC(vkCmdSetViewportWithCountEXT) \
|
||||
USE_VK_FUNC(vkCmdTraceRaysNV) \
|
||||
USE_VK_FUNC(vkCmdUpdateBuffer) \
|
||||
USE_VK_FUNC(vkCmdWaitEvents) \
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
"file_format_version": "1.0.0",
|
||||
"ICD": {
|
||||
"library_path": ".\\winevulkan.dll",
|
||||
"api_version": "1.2.145"
|
||||
"api_version": "1.2.142"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,33 @@
|
|||
#
|
||||
# Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# ---- Exceptions to the Apache 2.0 License: ----
|
||||
#
|
||||
# As an exception, if you use this Software to generate code and portions of
|
||||
# this Software are embedded into the generated code as a result, you may
|
||||
# redistribute such product without providing attribution as would otherwise
|
||||
# be required by Sections 4(a), 4(b) and 4(d) of the License.
|
||||
#
|
||||
# In addition, if you combine or link code generated by this Software with
|
||||
# software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
||||
# ("`Combined Software`") and if a court of competent jurisdiction determines
|
||||
# that the patent provision (Section 3), the indemnity provision (Section 9)
|
||||
# or other Section of the License conflicts with the conditions of the
|
||||
# applicable GPL or LGPL license, you may retroactively and prospectively
|
||||
# choose to deem waived or otherwise exclude such Section(s) of the License,
|
||||
# but only in their entirety and only with respect to the Combined Software.
|
||||
#
|
||||
|
||||
@ stdcall -private vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
|
||||
|
|
|
@ -146,40 +146,6 @@ typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
|
|||
LARGE_INTEGER ValidDataLength;
|
||||
} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
|
||||
|
||||
typedef enum _RTL_GENERIC_COMPARE_RESULTS
|
||||
{
|
||||
GenericLessThan,
|
||||
GenericGreaterThan,
|
||||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
|
||||
typedef struct _RTL_SPLAY_LINKS
|
||||
{
|
||||
struct _RTL_SPLAY_LINKS *Parent;
|
||||
struct _RTL_SPLAY_LINKS *LeftChild;
|
||||
struct _RTL_SPLAY_LINKS *RightChild;
|
||||
} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
|
||||
|
||||
struct _RTL_GENERIC_TABLE;
|
||||
|
||||
typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_GENERIC_COMPARE_ROUTINE)(struct _RTL_GENERIC_TABLE *, void *, void *);
|
||||
typedef void * (WINAPI *PRTL_GENERIC_ALLOCATE_ROUTINE)(struct _RTL_GENERIC_TABLE *, LONG);
|
||||
typedef void (WINAPI *PRTL_GENERIC_FREE_ROUTINE)(struct _RTL_GENERIC_TABLE *Table, void *);
|
||||
|
||||
typedef struct _RTL_GENERIC_TABLE
|
||||
{
|
||||
PRTL_SPLAY_LINKS TableRoot;
|
||||
LIST_ENTRY InsertOrderList;
|
||||
LIST_ENTRY *OrderedPointer;
|
||||
ULONG WhichOrderedElement;
|
||||
ULONG NumberGenericTableElements;
|
||||
PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine;
|
||||
PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine;
|
||||
PRTL_GENERIC_FREE_ROUTINE FreeRoutine;
|
||||
void *TableContext;
|
||||
} RTL_GENERIC_TABLE;
|
||||
typedef RTL_GENERIC_TABLE *PRTL_GENERIC_TABLE;
|
||||
|
||||
typedef struct _RTL_BALANCED_LINKS {
|
||||
struct _RTL_BALANCED_LINKS *Parent;
|
||||
struct _RTL_BALANCED_LINKS *LeftChild;
|
||||
|
@ -191,9 +157,15 @@ typedef RTL_BALANCED_LINKS *PRTL_BALANCED_LINKS;
|
|||
|
||||
struct _RTL_AVL_TABLE;
|
||||
|
||||
typedef enum _RTL_GENERIC_COMPARE_RESULTS {
|
||||
GenericLessThan,
|
||||
GenericGreaterThan,
|
||||
GenericEqual
|
||||
} RTL_GENERIC_COMPARE_RESULTS;
|
||||
|
||||
typedef RTL_GENERIC_COMPARE_RESULTS (WINAPI *PRTL_AVL_COMPARE_ROUTINE)(struct _RTL_AVL_TABLE *, void *, void *);
|
||||
|
||||
typedef void * (WINAPI *PRTL_AVL_ALLOCATE_ROUTINE)(struct _RTL_AVL_TABLE *, LONG);
|
||||
typedef void (WINAPI *PRTL_AVL_ALLOCATE_ROUTINE)(struct _RTL_AVL_TABLE *, LONG);
|
||||
|
||||
typedef void (WINAPI *PRTL_AVL_FREE_ROUTINE )(struct _RTL_AVL_TABLE *, void *buffer);
|
||||
|
||||
|
|
|
@ -198,25 +198,4 @@ interface IMFVideoMixerControl2 : IMFVideoMixerControl
|
|||
);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(56c294d0-753e-4260-8d61-a3d8820b1d54),
|
||||
local
|
||||
]
|
||||
interface IMFDesiredSample : IUnknown
|
||||
{
|
||||
HRESULT GetDesiredSampleTimeAndDuration(
|
||||
[out] LONGLONG *sample_time,
|
||||
[out] LONGLONG *sample_duration
|
||||
);
|
||||
|
||||
void SetDesiredSampleTimeAndDuration(
|
||||
[in] LONGLONG sample_time,
|
||||
[in] LONGLONG sample_duration
|
||||
);
|
||||
|
||||
void Clear();
|
||||
}
|
||||
|
||||
cpp_quote("HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
|
||||
cpp_quote("HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sample);")
|
||||
|
|
|
@ -509,9 +509,7 @@ HRESULT WINAPI MFCreateMediaBufferFromMediaType(IMFMediaType *media_type, LONGLO
|
|||
HRESULT WINAPI MFCreateMediaEvent(MediaEventType type, REFGUID extended_type, HRESULT status,
|
||||
const PROPVARIANT *value, IMFMediaEvent **event);
|
||||
HRESULT WINAPI MFCreateMediaType(IMFMediaType **type);
|
||||
HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MFVIDEOFORMAT **video_format, UINT32 *size);
|
||||
HRESULT WINAPI MFCreateSample(IMFSample **sample);
|
||||
HRESULT WINAPI MFCreateVideoMediaTypeFromSubtype(const GUID *subtype, IMFVideoMediaType **media_type);
|
||||
HRESULT WINAPI MFCreateMemoryBuffer(DWORD max_length, IMFMediaBuffer **buffer);
|
||||
HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *type, WAVEFORMATEX **format, UINT32 *size, UINT32 flags);
|
||||
HRESULT WINAPI MFEndCreateFile(IMFAsyncResult *result, IMFByteStream **stream);
|
||||
|
|
|
@ -934,19 +934,6 @@ interface IMFQualityAdviseLimits : IUnknown
|
|||
HRESULT GetMinimumQualityLevel([out] MF_QUALITY_LEVEL *level);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(245bf8e9-0755-40f7-88a5-ae0f18d55e17),
|
||||
local
|
||||
]
|
||||
interface IMFTrackedSample : IUnknown
|
||||
{
|
||||
HRESULT SetAllocator(
|
||||
[in] IMFAsyncCallback *sample_allocator,
|
||||
[in, unique] IUnknown *state
|
||||
);
|
||||
}
|
||||
|
||||
typedef struct _MFT_REGISTRATION_INFO
|
||||
{
|
||||
CLSID clsid;
|
||||
|
@ -1040,16 +1027,6 @@ interface IMFAudioPolicy : IUnknown
|
|||
HRESULT GetIconPath([out] LPWSTR *path);
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
MF_ACTIVATE_CUSTOM_MIXER_ALLOWFAIL = 0x00000001,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MF_ACTIVATE_CUSTOM_PRESENTER_ALLOWFAIL = 0x00000001,
|
||||
};
|
||||
|
||||
cpp_quote("#ifdef __cplusplus")
|
||||
cpp_quote("static inline HRESULT MFSetAttributeSize(IMFAttributes *attributes, REFGUID key, UINT32 width, UINT32 height)")
|
||||
cpp_quote("{")
|
||||
|
@ -1174,12 +1151,4 @@ cpp_quote("EXTERN_GUID(MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID, 0xb10aaec3, 0xef
|
|||
cpp_quote("EXTERN_GUID(MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE, 0x6ba644ff, 0x27c5, 0x4d02, 0x98, 0x87, 0xc2, 0x86, 0x19, 0xfd, 0xb9, 0x1b);")
|
||||
cpp_quote("EXTERN_GUID(MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY, 0xa9770471, 0x92ec, 0x4df4, 0x94, 0xfe, 0x81, 0xc3, 0x6f, 0x0c, 0x3a, 0x7a);")
|
||||
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_VIDEO_WINDOW, 0x9a2dbbdd, 0xf57e, 0x4162, 0x82, 0xb9, 0x68, 0x31, 0x37, 0x76, 0x82, 0xd3);")
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID, 0xba491360, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE, 0xba491361, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS, 0xba491362, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID, 0xba491364, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE, 0xba491365, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS, 0xba491366, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
|
||||
cpp_quote("EXTERN_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82);")
|
||||
|
|
|
@ -5,7 +5,33 @@
|
|||
*
|
||||
* Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* ---- Exceptions to the Apache 2.0 License: ----
|
||||
*
|
||||
* As an exception, if you use this Software to generate code and portions of
|
||||
* this Software are embedded into the generated code as a result, you may
|
||||
* redistribute such product without providing attribution as would otherwise
|
||||
* be required by Sections 4(a), 4(b) and 4(d) of the License.
|
||||
*
|
||||
* In addition, if you combine or link code generated by this Software with
|
||||
* software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
||||
* ("`Combined Software`") and if a court of competent jurisdiction determines
|
||||
* that the patent provision (Section 3), the indemnity provision (Section 9)
|
||||
* or other Section of the License conflicts with the conditions of the
|
||||
* applicable GPL or LGPL license, you may retroactively and prospectively
|
||||
* choose to deem waived or otherwise exclude such Section(s) of the License,
|
||||
* but only in their entirety and only with respect to the Combined Software.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -345,8 +371,6 @@
|
|||
#define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset"
|
||||
#define VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION 1
|
||||
#define VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_EXT_index_type_uint8"
|
||||
#define VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION 1
|
||||
#define VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_extended_dynamic_state"
|
||||
#define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION 1
|
||||
#define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME "VK_KHR_pipeline_executable_properties"
|
||||
#define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION 1
|
||||
|
@ -382,7 +406,7 @@
|
|||
#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)
|
||||
#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)
|
||||
#define VK_API_VERSION_1_2 VK_MAKE_VERSION(1, 2, 0)
|
||||
#define VK_HEADER_VERSION 145
|
||||
#define VK_HEADER_VERSION 142
|
||||
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_VERSION(1, 2, VK_HEADER_VERSION)
|
||||
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
|
||||
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
|
||||
|
@ -1146,18 +1170,6 @@ typedef enum VkDynamicState
|
|||
VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006,
|
||||
VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001,
|
||||
VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = 1000259000,
|
||||
VK_DYNAMIC_STATE_CULL_MODE_EXT = 1000267000,
|
||||
VK_DYNAMIC_STATE_FRONT_FACE_EXT = 1000267001,
|
||||
VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = 1000267002,
|
||||
VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT = 1000267003,
|
||||
VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT = 1000267004,
|
||||
VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT = 1000267005,
|
||||
VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT = 1000267006,
|
||||
VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT = 1000267007,
|
||||
VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT = 1000267008,
|
||||
VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT = 1000267009,
|
||||
VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT = 1000267010,
|
||||
VK_DYNAMIC_STATE_STENCIL_OP_EXT = 1000267011,
|
||||
VK_DYNAMIC_STATE_MAX_ENUM = 0x7fffffff,
|
||||
} VkDynamicState;
|
||||
|
||||
|
@ -2835,7 +2847,6 @@ typedef enum VkStructureType
|
|||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002,
|
||||
|
@ -3886,79 +3897,38 @@ typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT
|
|||
uint32_t maxDiscardRectangles;
|
||||
} VkPhysicalDeviceDiscardRectanglePropertiesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkBool32 extendedDynamicState;
|
||||
} VkPhysicalDeviceExtendedDynamicStateFeaturesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalSemaphoreInfo
|
||||
typedef struct VkPhysicalDeviceExternalBufferInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalSemaphoreInfo;
|
||||
typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR;
|
||||
VkBufferCreateFlags flags;
|
||||
VkBufferUsageFlags usage;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalBufferInfo;
|
||||
typedef VkPhysicalDeviceExternalBufferInfo VkPhysicalDeviceExternalBufferInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceFeatures
|
||||
typedef struct VkPhysicalDeviceExternalFenceInfo
|
||||
{
|
||||
VkBool32 robustBufferAccess;
|
||||
VkBool32 fullDrawIndexUint32;
|
||||
VkBool32 imageCubeArray;
|
||||
VkBool32 independentBlend;
|
||||
VkBool32 geometryShader;
|
||||
VkBool32 tessellationShader;
|
||||
VkBool32 sampleRateShading;
|
||||
VkBool32 dualSrcBlend;
|
||||
VkBool32 logicOp;
|
||||
VkBool32 multiDrawIndirect;
|
||||
VkBool32 drawIndirectFirstInstance;
|
||||
VkBool32 depthClamp;
|
||||
VkBool32 depthBiasClamp;
|
||||
VkBool32 fillModeNonSolid;
|
||||
VkBool32 depthBounds;
|
||||
VkBool32 wideLines;
|
||||
VkBool32 largePoints;
|
||||
VkBool32 alphaToOne;
|
||||
VkBool32 multiViewport;
|
||||
VkBool32 samplerAnisotropy;
|
||||
VkBool32 textureCompressionETC2;
|
||||
VkBool32 textureCompressionASTC_LDR;
|
||||
VkBool32 textureCompressionBC;
|
||||
VkBool32 occlusionQueryPrecise;
|
||||
VkBool32 pipelineStatisticsQuery;
|
||||
VkBool32 vertexPipelineStoresAndAtomics;
|
||||
VkBool32 fragmentStoresAndAtomics;
|
||||
VkBool32 shaderTessellationAndGeometryPointSize;
|
||||
VkBool32 shaderImageGatherExtended;
|
||||
VkBool32 shaderStorageImageExtendedFormats;
|
||||
VkBool32 shaderStorageImageMultisample;
|
||||
VkBool32 shaderStorageImageReadWithoutFormat;
|
||||
VkBool32 shaderStorageImageWriteWithoutFormat;
|
||||
VkBool32 shaderUniformBufferArrayDynamicIndexing;
|
||||
VkBool32 shaderSampledImageArrayDynamicIndexing;
|
||||
VkBool32 shaderStorageBufferArrayDynamicIndexing;
|
||||
VkBool32 shaderStorageImageArrayDynamicIndexing;
|
||||
VkBool32 shaderClipDistance;
|
||||
VkBool32 shaderCullDistance;
|
||||
VkBool32 shaderFloat64;
|
||||
VkBool32 shaderInt64;
|
||||
VkBool32 shaderInt16;
|
||||
VkBool32 shaderResourceResidency;
|
||||
VkBool32 shaderResourceMinLod;
|
||||
VkBool32 sparseBinding;
|
||||
VkBool32 sparseResidencyBuffer;
|
||||
VkBool32 sparseResidencyImage2D;
|
||||
VkBool32 sparseResidencyImage3D;
|
||||
VkBool32 sparseResidency2Samples;
|
||||
VkBool32 sparseResidency4Samples;
|
||||
VkBool32 sparseResidency8Samples;
|
||||
VkBool32 sparseResidency16Samples;
|
||||
VkBool32 sparseResidencyAliased;
|
||||
VkBool32 variableMultisampleRate;
|
||||
VkBool32 inheritedQueries;
|
||||
} VkPhysicalDeviceFeatures;
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalFenceInfo;
|
||||
typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalImageFormatInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalImageFormatInfo;
|
||||
typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minImportedHostPointerAlignment;
|
||||
} VkPhysicalDeviceExternalMemoryHostPropertiesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceFloatControlsProperties
|
||||
{
|
||||
|
@ -5221,159 +5191,51 @@ typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV
|
|||
VkBool32 exclusiveScissor;
|
||||
} VkPhysicalDeviceExclusiveScissorFeaturesNV;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalFenceInfo
|
||||
typedef struct VkPhysicalDeviceExternalSemaphoreInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalFenceInfo;
|
||||
typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalSemaphoreInfo;
|
||||
typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT
|
||||
typedef struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minImportedHostPointerAlignment;
|
||||
} VkPhysicalDeviceExternalMemoryHostPropertiesEXT;
|
||||
VkExtent2D minFragmentDensityTexelSize;
|
||||
VkExtent2D maxFragmentDensityTexelSize;
|
||||
VkBool32 fragmentDensityInvocations;
|
||||
} VkPhysicalDeviceFragmentDensityMapPropertiesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceFeatures2
|
||||
typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkPhysicalDeviceFeatures features;
|
||||
} VkPhysicalDeviceFeatures2;
|
||||
typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR;
|
||||
VkImageViewType imageViewType;
|
||||
} VkPhysicalDeviceImageViewImageFormatInfoEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT
|
||||
typedef struct VkPhysicalDeviceInlineUniformBlockFeaturesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkBool32 fragmentShaderSampleInterlock;
|
||||
VkBool32 fragmentShaderPixelInterlock;
|
||||
VkBool32 fragmentShaderShadingRateInterlock;
|
||||
} VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT;
|
||||
VkBool32 inlineUniformBlock;
|
||||
VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind;
|
||||
} VkPhysicalDeviceInlineUniformBlockFeaturesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceImageFormatInfo2
|
||||
typedef struct VkPhysicalDeviceLineRasterizationPropertiesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkFormat format;
|
||||
VkImageType type;
|
||||
VkImageTiling tiling;
|
||||
VkImageUsageFlags usage;
|
||||
VkImageCreateFlags flags;
|
||||
} VkPhysicalDeviceImageFormatInfo2;
|
||||
typedef VkPhysicalDeviceImageFormatInfo2 VkPhysicalDeviceImageFormatInfo2KHR;
|
||||
void *pNext;
|
||||
uint32_t lineSubPixelPrecisionBits;
|
||||
} VkPhysicalDeviceLineRasterizationPropertiesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceLimits
|
||||
typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT
|
||||
{
|
||||
uint32_t maxImageDimension1D;
|
||||
uint32_t maxImageDimension2D;
|
||||
uint32_t maxImageDimension3D;
|
||||
uint32_t maxImageDimensionCube;
|
||||
uint32_t maxImageArrayLayers;
|
||||
uint32_t maxTexelBufferElements;
|
||||
uint32_t maxUniformBufferRange;
|
||||
uint32_t maxStorageBufferRange;
|
||||
uint32_t maxPushConstantsSize;
|
||||
uint32_t maxMemoryAllocationCount;
|
||||
uint32_t maxSamplerAllocationCount;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) bufferImageGranularity;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) sparseAddressSpaceSize;
|
||||
uint32_t maxBoundDescriptorSets;
|
||||
uint32_t maxPerStageDescriptorSamplers;
|
||||
uint32_t maxPerStageDescriptorUniformBuffers;
|
||||
uint32_t maxPerStageDescriptorStorageBuffers;
|
||||
uint32_t maxPerStageDescriptorSampledImages;
|
||||
uint32_t maxPerStageDescriptorStorageImages;
|
||||
uint32_t maxPerStageDescriptorInputAttachments;
|
||||
uint32_t maxPerStageResources;
|
||||
uint32_t maxDescriptorSetSamplers;
|
||||
uint32_t maxDescriptorSetUniformBuffers;
|
||||
uint32_t maxDescriptorSetUniformBuffersDynamic;
|
||||
uint32_t maxDescriptorSetStorageBuffers;
|
||||
uint32_t maxDescriptorSetStorageBuffersDynamic;
|
||||
uint32_t maxDescriptorSetSampledImages;
|
||||
uint32_t maxDescriptorSetStorageImages;
|
||||
uint32_t maxDescriptorSetInputAttachments;
|
||||
uint32_t maxVertexInputAttributes;
|
||||
uint32_t maxVertexInputBindings;
|
||||
uint32_t maxVertexInputAttributeOffset;
|
||||
uint32_t maxVertexInputBindingStride;
|
||||
uint32_t maxVertexOutputComponents;
|
||||
uint32_t maxTessellationGenerationLevel;
|
||||
uint32_t maxTessellationPatchSize;
|
||||
uint32_t maxTessellationControlPerVertexInputComponents;
|
||||
uint32_t maxTessellationControlPerVertexOutputComponents;
|
||||
uint32_t maxTessellationControlPerPatchOutputComponents;
|
||||
uint32_t maxTessellationControlTotalOutputComponents;
|
||||
uint32_t maxTessellationEvaluationInputComponents;
|
||||
uint32_t maxTessellationEvaluationOutputComponents;
|
||||
uint32_t maxGeometryShaderInvocations;
|
||||
uint32_t maxGeometryInputComponents;
|
||||
uint32_t maxGeometryOutputComponents;
|
||||
uint32_t maxGeometryOutputVertices;
|
||||
uint32_t maxGeometryTotalOutputComponents;
|
||||
uint32_t maxFragmentInputComponents;
|
||||
uint32_t maxFragmentOutputAttachments;
|
||||
uint32_t maxFragmentDualSrcAttachments;
|
||||
uint32_t maxFragmentCombinedOutputResources;
|
||||
uint32_t maxComputeSharedMemorySize;
|
||||
uint32_t maxComputeWorkGroupCount[3];
|
||||
uint32_t maxComputeWorkGroupInvocations;
|
||||
uint32_t maxComputeWorkGroupSize[3];
|
||||
uint32_t subPixelPrecisionBits;
|
||||
uint32_t subTexelPrecisionBits;
|
||||
uint32_t mipmapPrecisionBits;
|
||||
uint32_t maxDrawIndexedIndexValue;
|
||||
uint32_t maxDrawIndirectCount;
|
||||
float maxSamplerLodBias;
|
||||
float maxSamplerAnisotropy;
|
||||
uint32_t maxViewports;
|
||||
uint32_t maxViewportDimensions[2];
|
||||
float viewportBoundsRange[2];
|
||||
uint32_t viewportSubPixelBits;
|
||||
size_t minMemoryMapAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minTexelBufferOffsetAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minUniformBufferOffsetAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minStorageBufferOffsetAlignment;
|
||||
int32_t minTexelOffset;
|
||||
uint32_t maxTexelOffset;
|
||||
int32_t minTexelGatherOffset;
|
||||
uint32_t maxTexelGatherOffset;
|
||||
float minInterpolationOffset;
|
||||
float maxInterpolationOffset;
|
||||
uint32_t subPixelInterpolationOffsetBits;
|
||||
uint32_t maxFramebufferWidth;
|
||||
uint32_t maxFramebufferHeight;
|
||||
uint32_t maxFramebufferLayers;
|
||||
VkSampleCountFlags framebufferColorSampleCounts;
|
||||
VkSampleCountFlags framebufferDepthSampleCounts;
|
||||
VkSampleCountFlags framebufferStencilSampleCounts;
|
||||
VkSampleCountFlags framebufferNoAttachmentsSampleCounts;
|
||||
uint32_t maxColorAttachments;
|
||||
VkSampleCountFlags sampledImageColorSampleCounts;
|
||||
VkSampleCountFlags sampledImageIntegerSampleCounts;
|
||||
VkSampleCountFlags sampledImageDepthSampleCounts;
|
||||
VkSampleCountFlags sampledImageStencilSampleCounts;
|
||||
VkSampleCountFlags storageImageSampleCounts;
|
||||
uint32_t maxSampleMaskWords;
|
||||
VkBool32 timestampComputeAndGraphics;
|
||||
float timestampPeriod;
|
||||
uint32_t maxClipDistances;
|
||||
uint32_t maxCullDistances;
|
||||
uint32_t maxCombinedClipAndCullDistances;
|
||||
uint32_t discreteQueuePriorities;
|
||||
float pointSizeRange[2];
|
||||
float lineWidthRange[2];
|
||||
float pointSizeGranularity;
|
||||
float lineWidthGranularity;
|
||||
VkBool32 strictLines;
|
||||
VkBool32 standardSampleLocations;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) optimalBufferCopyOffsetAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) optimalBufferCopyRowPitchAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) nonCoherentAtomSize;
|
||||
} VkPhysicalDeviceLimits;
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkBool32 memoryPriority;
|
||||
} VkPhysicalDeviceMemoryPriorityFeaturesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceMeshShaderFeaturesNV
|
||||
{
|
||||
|
@ -5946,20 +5808,6 @@ typedef struct VkDescriptorPoolCreateInfo
|
|||
const VkDescriptorPoolSize *pPoolSizes;
|
||||
} VkDescriptorPoolCreateInfo;
|
||||
|
||||
typedef struct VkDeviceCreateInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkDeviceCreateFlags flags;
|
||||
uint32_t queueCreateInfoCount;
|
||||
const VkDeviceQueueCreateInfo *pQueueCreateInfos;
|
||||
uint32_t enabledLayerCount;
|
||||
const char * const*ppEnabledLayerNames;
|
||||
uint32_t enabledExtensionCount;
|
||||
const char * const*ppEnabledExtensionNames;
|
||||
const VkPhysicalDeviceFeatures *pEnabledFeatures;
|
||||
} VkDeviceCreateInfo;
|
||||
|
||||
typedef struct VkDeviceGroupSwapchainCreateInfoKHR
|
||||
{
|
||||
VkStructureType sType;
|
||||
|
@ -6118,28 +5966,6 @@ typedef struct VkPhysicalDeviceDriverProperties
|
|||
} VkPhysicalDeviceDriverProperties;
|
||||
typedef VkPhysicalDeviceDriverProperties VkPhysicalDeviceDriverPropertiesKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalImageFormatInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalImageFormatInfo;
|
||||
typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkImageViewType imageViewType;
|
||||
} VkPhysicalDeviceImageViewImageFormatInfoEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceLineRasterizationPropertiesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
uint32_t lineSubPixelPrecisionBits;
|
||||
} VkPhysicalDeviceLineRasterizationPropertiesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceMultiviewFeatures
|
||||
{
|
||||
VkStructureType sType;
|
||||
|
@ -6456,29 +6282,13 @@ typedef struct VkDescriptorUpdateTemplateCreateInfo
|
|||
} VkDescriptorUpdateTemplateCreateInfo;
|
||||
typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR;
|
||||
|
||||
typedef struct VkDeviceGroupRenderPassBeginInfo
|
||||
typedef struct VkExportMemoryAllocateInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
uint32_t deviceMask;
|
||||
uint32_t deviceRenderAreaCount;
|
||||
const VkRect2D *pDeviceRenderAreas;
|
||||
} VkDeviceGroupRenderPassBeginInfo;
|
||||
typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR;
|
||||
|
||||
typedef struct VkDrawIndirectCommand
|
||||
{
|
||||
uint32_t vertexCount;
|
||||
uint32_t instanceCount;
|
||||
uint32_t firstVertex;
|
||||
uint32_t firstInstance;
|
||||
} VkDrawIndirectCommand;
|
||||
|
||||
typedef struct VkExtensionProperties
|
||||
{
|
||||
char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
|
||||
uint32_t specVersion;
|
||||
} VkExtensionProperties;
|
||||
VkExternalMemoryHandleTypeFlags handleTypes;
|
||||
} VkExportMemoryAllocateInfo;
|
||||
typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR;
|
||||
|
||||
typedef struct VkExternalMemoryProperties
|
||||
{
|
||||
|
@ -6557,32 +6367,124 @@ typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV
|
|||
VkBool32 dedicatedAllocationImageAliasing;
|
||||
} VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV;
|
||||
|
||||
typedef struct VkPhysicalDeviceExternalBufferInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkBufferCreateFlags flags;
|
||||
VkBufferUsageFlags usage;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkPhysicalDeviceExternalBufferInfo;
|
||||
typedef VkPhysicalDeviceExternalBufferInfo VkPhysicalDeviceExternalBufferInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT
|
||||
typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkExtent2D minFragmentDensityTexelSize;
|
||||
VkExtent2D maxFragmentDensityTexelSize;
|
||||
VkBool32 fragmentDensityInvocations;
|
||||
} VkPhysicalDeviceFragmentDensityMapPropertiesEXT;
|
||||
VkBool32 fragmentShaderSampleInterlock;
|
||||
VkBool32 fragmentShaderPixelInterlock;
|
||||
VkBool32 fragmentShaderShadingRateInterlock;
|
||||
} VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT;
|
||||
|
||||
typedef struct VkPhysicalDeviceInlineUniformBlockFeaturesEXT
|
||||
typedef struct VkPhysicalDeviceLimits
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkBool32 inlineUniformBlock;
|
||||
VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind;
|
||||
} VkPhysicalDeviceInlineUniformBlockFeaturesEXT;
|
||||
uint32_t maxImageDimension1D;
|
||||
uint32_t maxImageDimension2D;
|
||||
uint32_t maxImageDimension3D;
|
||||
uint32_t maxImageDimensionCube;
|
||||
uint32_t maxImageArrayLayers;
|
||||
uint32_t maxTexelBufferElements;
|
||||
uint32_t maxUniformBufferRange;
|
||||
uint32_t maxStorageBufferRange;
|
||||
uint32_t maxPushConstantsSize;
|
||||
uint32_t maxMemoryAllocationCount;
|
||||
uint32_t maxSamplerAllocationCount;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) bufferImageGranularity;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) sparseAddressSpaceSize;
|
||||
uint32_t maxBoundDescriptorSets;
|
||||
uint32_t maxPerStageDescriptorSamplers;
|
||||
uint32_t maxPerStageDescriptorUniformBuffers;
|
||||
uint32_t maxPerStageDescriptorStorageBuffers;
|
||||
uint32_t maxPerStageDescriptorSampledImages;
|
||||
uint32_t maxPerStageDescriptorStorageImages;
|
||||
uint32_t maxPerStageDescriptorInputAttachments;
|
||||
uint32_t maxPerStageResources;
|
||||
uint32_t maxDescriptorSetSamplers;
|
||||
uint32_t maxDescriptorSetUniformBuffers;
|
||||
uint32_t maxDescriptorSetUniformBuffersDynamic;
|
||||
uint32_t maxDescriptorSetStorageBuffers;
|
||||
uint32_t maxDescriptorSetStorageBuffersDynamic;
|
||||
uint32_t maxDescriptorSetSampledImages;
|
||||
uint32_t maxDescriptorSetStorageImages;
|
||||
uint32_t maxDescriptorSetInputAttachments;
|
||||
uint32_t maxVertexInputAttributes;
|
||||
uint32_t maxVertexInputBindings;
|
||||
uint32_t maxVertexInputAttributeOffset;
|
||||
uint32_t maxVertexInputBindingStride;
|
||||
uint32_t maxVertexOutputComponents;
|
||||
uint32_t maxTessellationGenerationLevel;
|
||||
uint32_t maxTessellationPatchSize;
|
||||
uint32_t maxTessellationControlPerVertexInputComponents;
|
||||
uint32_t maxTessellationControlPerVertexOutputComponents;
|
||||
uint32_t maxTessellationControlPerPatchOutputComponents;
|
||||
uint32_t maxTessellationControlTotalOutputComponents;
|
||||
uint32_t maxTessellationEvaluationInputComponents;
|
||||
uint32_t maxTessellationEvaluationOutputComponents;
|
||||
uint32_t maxGeometryShaderInvocations;
|
||||
uint32_t maxGeometryInputComponents;
|
||||
uint32_t maxGeometryOutputComponents;
|
||||
uint32_t maxGeometryOutputVertices;
|
||||
uint32_t maxGeometryTotalOutputComponents;
|
||||
uint32_t maxFragmentInputComponents;
|
||||
uint32_t maxFragmentOutputAttachments;
|
||||
uint32_t maxFragmentDualSrcAttachments;
|
||||
uint32_t maxFragmentCombinedOutputResources;
|
||||
uint32_t maxComputeSharedMemorySize;
|
||||
uint32_t maxComputeWorkGroupCount[3];
|
||||
uint32_t maxComputeWorkGroupInvocations;
|
||||
uint32_t maxComputeWorkGroupSize[3];
|
||||
uint32_t subPixelPrecisionBits;
|
||||
uint32_t subTexelPrecisionBits;
|
||||
uint32_t mipmapPrecisionBits;
|
||||
uint32_t maxDrawIndexedIndexValue;
|
||||
uint32_t maxDrawIndirectCount;
|
||||
float maxSamplerLodBias;
|
||||
float maxSamplerAnisotropy;
|
||||
uint32_t maxViewports;
|
||||
uint32_t maxViewportDimensions[2];
|
||||
float viewportBoundsRange[2];
|
||||
uint32_t viewportSubPixelBits;
|
||||
size_t minMemoryMapAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minTexelBufferOffsetAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minUniformBufferOffsetAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) minStorageBufferOffsetAlignment;
|
||||
int32_t minTexelOffset;
|
||||
uint32_t maxTexelOffset;
|
||||
int32_t minTexelGatherOffset;
|
||||
uint32_t maxTexelGatherOffset;
|
||||
float minInterpolationOffset;
|
||||
float maxInterpolationOffset;
|
||||
uint32_t subPixelInterpolationOffsetBits;
|
||||
uint32_t maxFramebufferWidth;
|
||||
uint32_t maxFramebufferHeight;
|
||||
uint32_t maxFramebufferLayers;
|
||||
VkSampleCountFlags framebufferColorSampleCounts;
|
||||
VkSampleCountFlags framebufferDepthSampleCounts;
|
||||
VkSampleCountFlags framebufferStencilSampleCounts;
|
||||
VkSampleCountFlags framebufferNoAttachmentsSampleCounts;
|
||||
uint32_t maxColorAttachments;
|
||||
VkSampleCountFlags sampledImageColorSampleCounts;
|
||||
VkSampleCountFlags sampledImageIntegerSampleCounts;
|
||||
VkSampleCountFlags sampledImageDepthSampleCounts;
|
||||
VkSampleCountFlags sampledImageStencilSampleCounts;
|
||||
VkSampleCountFlags storageImageSampleCounts;
|
||||
uint32_t maxSampleMaskWords;
|
||||
VkBool32 timestampComputeAndGraphics;
|
||||
float timestampPeriod;
|
||||
uint32_t maxClipDistances;
|
||||
uint32_t maxCullDistances;
|
||||
uint32_t maxCombinedClipAndCullDistances;
|
||||
uint32_t discreteQueuePriorities;
|
||||
float pointSizeRange[2];
|
||||
float lineWidthRange[2];
|
||||
float pointSizeGranularity;
|
||||
float lineWidthGranularity;
|
||||
VkBool32 strictLines;
|
||||
VkBool32 standardSampleLocations;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) optimalBufferCopyOffsetAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) optimalBufferCopyRowPitchAlignment;
|
||||
VkDeviceSize WINE_VK_ALIGN(8) nonCoherentAtomSize;
|
||||
} VkPhysicalDeviceLimits;
|
||||
|
||||
typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV
|
||||
{
|
||||
|
@ -6772,6 +6674,24 @@ typedef struct VkCheckpointDataNV
|
|||
void *pCheckpointMarker;
|
||||
} VkCheckpointDataNV;
|
||||
|
||||
typedef struct VkDeviceGroupRenderPassBeginInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
uint32_t deviceMask;
|
||||
uint32_t deviceRenderAreaCount;
|
||||
const VkRect2D *pDeviceRenderAreas;
|
||||
} VkDeviceGroupRenderPassBeginInfo;
|
||||
typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR;
|
||||
|
||||
typedef struct VkDrawIndirectCommand
|
||||
{
|
||||
uint32_t vertexCount;
|
||||
uint32_t instanceCount;
|
||||
uint32_t firstVertex;
|
||||
uint32_t firstInstance;
|
||||
} VkDrawIndirectCommand;
|
||||
|
||||
typedef struct VkExternalBufferProperties
|
||||
{
|
||||
VkStructureType sType;
|
||||
|
@ -6835,6 +6755,18 @@ typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV
|
|||
VkBool32 deviceGeneratedCommands;
|
||||
} VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV;
|
||||
|
||||
typedef struct VkPhysicalDeviceImageFormatInfo2
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkFormat format;
|
||||
VkImageType type;
|
||||
VkImageTiling tiling;
|
||||
VkImageUsageFlags usage;
|
||||
VkImageCreateFlags flags;
|
||||
} VkPhysicalDeviceImageFormatInfo2;
|
||||
typedef VkPhysicalDeviceImageFormatInfo2 VkPhysicalDeviceImageFormatInfo2KHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceScalarBlockLayoutFeatures
|
||||
{
|
||||
VkStructureType sType;
|
||||
|
@ -7008,6 +6940,65 @@ typedef struct VkMemoryType
|
|||
uint32_t heapIndex;
|
||||
} VkMemoryType;
|
||||
|
||||
typedef struct VkPhysicalDeviceFeatures
|
||||
{
|
||||
VkBool32 robustBufferAccess;
|
||||
VkBool32 fullDrawIndexUint32;
|
||||
VkBool32 imageCubeArray;
|
||||
VkBool32 independentBlend;
|
||||
VkBool32 geometryShader;
|
||||
VkBool32 tessellationShader;
|
||||
VkBool32 sampleRateShading;
|
||||
VkBool32 dualSrcBlend;
|
||||
VkBool32 logicOp;
|
||||
VkBool32 multiDrawIndirect;
|
||||
VkBool32 drawIndirectFirstInstance;
|
||||
VkBool32 depthClamp;
|
||||
VkBool32 depthBiasClamp;
|
||||
VkBool32 fillModeNonSolid;
|
||||
VkBool32 depthBounds;
|
||||
VkBool32 wideLines;
|
||||
VkBool32 largePoints;
|
||||
VkBool32 alphaToOne;
|
||||
VkBool32 multiViewport;
|
||||
VkBool32 samplerAnisotropy;
|
||||
VkBool32 textureCompressionETC2;
|
||||
VkBool32 textureCompressionASTC_LDR;
|
||||
VkBool32 textureCompressionBC;
|
||||
VkBool32 occlusionQueryPrecise;
|
||||
VkBool32 pipelineStatisticsQuery;
|
||||
VkBool32 vertexPipelineStoresAndAtomics;
|
||||
VkBool32 fragmentStoresAndAtomics;
|
||||
VkBool32 shaderTessellationAndGeometryPointSize;
|
||||
VkBool32 shaderImageGatherExtended;
|
||||
VkBool32 shaderStorageImageExtendedFormats;
|
||||
VkBool32 shaderStorageImageMultisample;
|
||||
VkBool32 shaderStorageImageReadWithoutFormat;
|
||||
VkBool32 shaderStorageImageWriteWithoutFormat;
|
||||
VkBool32 shaderUniformBufferArrayDynamicIndexing;
|
||||
VkBool32 shaderSampledImageArrayDynamicIndexing;
|
||||
VkBool32 shaderStorageBufferArrayDynamicIndexing;
|
||||
VkBool32 shaderStorageImageArrayDynamicIndexing;
|
||||
VkBool32 shaderClipDistance;
|
||||
VkBool32 shaderCullDistance;
|
||||
VkBool32 shaderFloat64;
|
||||
VkBool32 shaderInt64;
|
||||
VkBool32 shaderInt16;
|
||||
VkBool32 shaderResourceResidency;
|
||||
VkBool32 shaderResourceMinLod;
|
||||
VkBool32 sparseBinding;
|
||||
VkBool32 sparseResidencyBuffer;
|
||||
VkBool32 sparseResidencyImage2D;
|
||||
VkBool32 sparseResidencyImage3D;
|
||||
VkBool32 sparseResidency2Samples;
|
||||
VkBool32 sparseResidency4Samples;
|
||||
VkBool32 sparseResidency8Samples;
|
||||
VkBool32 sparseResidency16Samples;
|
||||
VkBool32 sparseResidencyAliased;
|
||||
VkBool32 variableMultisampleRate;
|
||||
VkBool32 inheritedQueries;
|
||||
} VkPhysicalDeviceFeatures;
|
||||
|
||||
typedef struct VkPhysicalDeviceMemoryProperties
|
||||
{
|
||||
uint32_t memoryTypeCount;
|
||||
|
@ -7093,20 +7084,19 @@ typedef struct VkDescriptorSetLayoutCreateInfo
|
|||
const VkDescriptorSetLayoutBinding *pBindings;
|
||||
} VkDescriptorSetLayoutCreateInfo;
|
||||
|
||||
typedef struct VkFormatProperties2
|
||||
typedef struct VkExtensionProperties
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkFormatProperties formatProperties;
|
||||
} VkFormatProperties2;
|
||||
typedef VkFormatProperties2 VkFormatProperties2KHR;
|
||||
char extensionName[VK_MAX_EXTENSION_NAME_SIZE];
|
||||
uint32_t specVersion;
|
||||
} VkExtensionProperties;
|
||||
|
||||
typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT
|
||||
typedef struct VkPhysicalDeviceFeatures2
|
||||
{
|
||||
VkStructureType sType;
|
||||
void *pNext;
|
||||
VkBool32 memoryPriority;
|
||||
} VkPhysicalDeviceMemoryPriorityFeaturesEXT;
|
||||
VkPhysicalDeviceFeatures features;
|
||||
} VkPhysicalDeviceFeatures2;
|
||||
typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceProperties2
|
||||
{
|
||||
|
@ -7162,13 +7152,42 @@ typedef struct VkAttachmentSampleLocationsEXT
|
|||
VkSampleLocationsInfoEXT sampleLocationsInfo;
|
||||
} VkAttachmentSampleLocationsEXT;
|
||||
|
||||
typedef struct VkExportMemoryAllocateInfo
|
||||
typedef struct VkDeviceCreateInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkExternalMemoryHandleTypeFlags handleTypes;
|
||||
} VkExportMemoryAllocateInfo;
|
||||
typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR;
|
||||
VkDeviceCreateFlags flags;
|
||||
uint32_t queueCreateInfoCount;
|
||||
const VkDeviceQueueCreateInfo *pQueueCreateInfos;
|
||||
uint32_t enabledLayerCount;
|
||||
const char * const*ppEnabledLayerNames;
|
||||
uint32_t enabledExtensionCount;
|
||||
const char * const*ppEnabledExtensionNames;
|
||||
const VkPhysicalDeviceFeatures *pEnabledFeatures;
|
||||
} VkDeviceCreateInfo;
|
||||
|
||||
typedef struct VkGraphicsPipelineCreateInfo
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkPipelineCreateFlags flags;
|
||||
uint32_t stageCount;
|
||||
const VkPipelineShaderStageCreateInfo *pStages;
|
||||
const VkPipelineVertexInputStateCreateInfo *pVertexInputState;
|
||||
const VkPipelineInputAssemblyStateCreateInfo *pInputAssemblyState;
|
||||
const VkPipelineTessellationStateCreateInfo *pTessellationState;
|
||||
const VkPipelineViewportStateCreateInfo *pViewportState;
|
||||
const VkPipelineRasterizationStateCreateInfo *pRasterizationState;
|
||||
const VkPipelineMultisampleStateCreateInfo *pMultisampleState;
|
||||
const VkPipelineDepthStencilStateCreateInfo *pDepthStencilState;
|
||||
const VkPipelineColorBlendStateCreateInfo *pColorBlendState;
|
||||
const VkPipelineDynamicStateCreateInfo *pDynamicState;
|
||||
VkPipelineLayout WINE_VK_ALIGN(8) layout;
|
||||
VkRenderPass WINE_VK_ALIGN(8) renderPass;
|
||||
uint32_t subpass;
|
||||
VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
|
||||
int32_t basePipelineIndex;
|
||||
} VkGraphicsPipelineCreateInfo;
|
||||
|
||||
typedef struct VkGraphicsShaderGroupCreateInfoNV
|
||||
{
|
||||
|
@ -7249,28 +7268,13 @@ typedef struct VkPhysicalDeviceVulkan11Properties
|
|||
VkDeviceSize WINE_VK_ALIGN(8) maxMemoryAllocationSize;
|
||||
} VkPhysicalDeviceVulkan11Properties;
|
||||
|
||||
typedef struct VkGraphicsPipelineCreateInfo
|
||||
typedef struct VkFormatProperties2
|
||||
{
|
||||
VkStructureType sType;
|
||||
const void *pNext;
|
||||
VkPipelineCreateFlags flags;
|
||||
uint32_t stageCount;
|
||||
const VkPipelineShaderStageCreateInfo *pStages;
|
||||
const VkPipelineVertexInputStateCreateInfo *pVertexInputState;
|
||||
const VkPipelineInputAssemblyStateCreateInfo *pInputAssemblyState;
|
||||
const VkPipelineTessellationStateCreateInfo *pTessellationState;
|
||||
const VkPipelineViewportStateCreateInfo *pViewportState;
|
||||
const VkPipelineRasterizationStateCreateInfo *pRasterizationState;
|
||||
const VkPipelineMultisampleStateCreateInfo *pMultisampleState;
|
||||
const VkPipelineDepthStencilStateCreateInfo *pDepthStencilState;
|
||||
const VkPipelineColorBlendStateCreateInfo *pColorBlendState;
|
||||
const VkPipelineDynamicStateCreateInfo *pDynamicState;
|
||||
VkPipelineLayout WINE_VK_ALIGN(8) layout;
|
||||
VkRenderPass WINE_VK_ALIGN(8) renderPass;
|
||||
uint32_t subpass;
|
||||
VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
|
||||
int32_t basePipelineIndex;
|
||||
} VkGraphicsPipelineCreateInfo;
|
||||
void *pNext;
|
||||
VkFormatProperties formatProperties;
|
||||
} VkFormatProperties2;
|
||||
typedef VkFormatProperties2 VkFormatProperties2KHR;
|
||||
|
||||
typedef struct VkRenderPassCreateInfo
|
||||
{
|
||||
|
@ -7322,7 +7326,6 @@ typedef void (VKAPI_PTR *PFN_vkCmdBindPipelineShaderGroupNV)(VkCommandBuffer, Vk
|
|||
typedef void (VKAPI_PTR *PFN_vkCmdBindShadingRateImageNV)(VkCommandBuffer, VkImageView, VkImageLayout);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBindTransformFeedbackBuffersEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer *, const VkDeviceSize *, const VkDeviceSize *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer *, const VkDeviceSize *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers2EXT)(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer *, const VkDeviceSize *, const VkDeviceSize *, const VkDeviceSize *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer, VkImage, VkImageLayout, VkImage, VkImageLayout, uint32_t, const VkImageBlit *, VkFilter);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureNV)(VkCommandBuffer, const VkAccelerationStructureInfoNV *, VkBuffer, VkDeviceSize, VkBool32, VkAccelerationStructureKHR, VkAccelerationStructureKHR, VkBuffer, VkDeviceSize);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer, uint32_t, const VkClearAttachment *, uint32_t, const VkClearRect *);
|
||||
|
@ -7376,37 +7379,26 @@ typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer, VkImage, VkImag
|
|||
typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer, const float[4]);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetCheckpointNV)(VkCommandBuffer, const void *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetCoarseSampleOrderNV)(VkCommandBuffer, VkCoarseSampleOrderTypeNV, uint32_t, const VkCoarseSampleOrderCustomNV *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetCullModeEXT)(VkCommandBuffer, VkCullModeFlags);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer, float, float, float);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer, float, float);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBoundsTestEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthCompareOpEXT)(VkCommandBuffer, VkCompareOp);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthTestEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDepthWriteEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer, uint32_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer, uint32_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer, VkEvent, VkPipelineStageFlags);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetExclusiveScissorNV)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetFrontFaceEXT)(VkCommandBuffer, VkFrontFace);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEXT)(VkCommandBuffer, uint32_t, uint16_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer, float);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCmdSetPerformanceMarkerINTEL)(VkCommandBuffer, const VkPerformanceMarkerInfoINTEL *);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCmdSetPerformanceOverrideINTEL)(VkCommandBuffer, const VkPerformanceOverrideInfoINTEL *);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCmdSetPerformanceStreamMarkerINTEL)(VkCommandBuffer, const VkPerformanceStreamMarkerInfoINTEL *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveTopologyEXT)(VkCommandBuffer, VkPrimitiveTopology);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer, const VkSampleLocationsInfoEXT *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer, uint32_t, uint32_t, const VkRect2D *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetScissorWithCountEXT)(VkCommandBuffer, uint32_t, const VkRect2D *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilOpEXT)(VkCommandBuffer, VkStencilFaceFlags, VkStencilOp, VkStencilOp, VkStencilOp, VkCompareOp);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilTestEnableEXT)(VkCommandBuffer, VkBool32);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer, VkStencilFaceFlags, uint32_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer, uint32_t, uint32_t, const VkViewport *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetViewportShadingRatePaletteNV)(VkCommandBuffer, uint32_t, uint32_t, const VkShadingRatePaletteNV *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer, uint32_t, uint32_t, const VkViewportWScalingNV *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWithCountEXT)(VkCommandBuffer, uint32_t, const VkViewport *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysNV)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, VkDeviceSize, VkBuffer, VkDeviceSize, VkDeviceSize, VkBuffer, VkDeviceSize, VkDeviceSize, uint32_t, uint32_t, uint32_t);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize, const void *);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags, VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t, const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier *);
|
||||
|
@ -7647,7 +7639,6 @@ void VKAPI_CALL vkCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, Vk
|
|||
void VKAPI_CALL vkCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout);
|
||||
void VKAPI_CALL vkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets, const VkDeviceSize *pSizes);
|
||||
void VKAPI_CALL vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets);
|
||||
void VKAPI_CALL vkCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets, const VkDeviceSize *pSizes, const VkDeviceSize *pStrides);
|
||||
void VKAPI_CALL vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter);
|
||||
void VKAPI_CALL vkCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV *pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureKHR dst, VkAccelerationStructureKHR src, VkBuffer scratch, VkDeviceSize scratchOffset);
|
||||
void VKAPI_CALL vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment *pAttachments, uint32_t rectCount, const VkClearRect *pRects);
|
||||
|
@ -7701,37 +7692,26 @@ void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImag
|
|||
void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]);
|
||||
void VKAPI_CALL vkCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void *pCheckpointMarker);
|
||||
void VKAPI_CALL vkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV *pCustomSampleOrders);
|
||||
void VKAPI_CALL vkCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode);
|
||||
void VKAPI_CALL vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
|
||||
void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
|
||||
void VKAPI_CALL vkCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable);
|
||||
void VKAPI_CALL vkCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp);
|
||||
void VKAPI_CALL vkCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable);
|
||||
void VKAPI_CALL vkCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable);
|
||||
void VKAPI_CALL vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask);
|
||||
void VKAPI_CALL vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask);
|
||||
void VKAPI_CALL vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D *pDiscardRectangles);
|
||||
void VKAPI_CALL vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
|
||||
void VKAPI_CALL vkCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D *pExclusiveScissors);
|
||||
void VKAPI_CALL vkCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace);
|
||||
void VKAPI_CALL vkCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern);
|
||||
void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth);
|
||||
VkResult VKAPI_CALL vkCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL *pMarkerInfo);
|
||||
VkResult VKAPI_CALL vkCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL *pOverrideInfo);
|
||||
VkResult VKAPI_CALL vkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL *pMarkerInfo);
|
||||
void VKAPI_CALL vkCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology);
|
||||
void VKAPI_CALL vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT *pSampleLocationsInfo);
|
||||
void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors);
|
||||
void VKAPI_CALL vkCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D *pScissors);
|
||||
void VKAPI_CALL vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
|
||||
void VKAPI_CALL vkCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp);
|
||||
void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
|
||||
void VKAPI_CALL vkCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable);
|
||||
void VKAPI_CALL vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
|
||||
void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports);
|
||||
void VKAPI_CALL vkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV *pShadingRatePalettes);
|
||||
void VKAPI_CALL vkCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV *pViewportWScalings);
|
||||
void VKAPI_CALL vkCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport *pViewports);
|
||||
void VKAPI_CALL vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth);
|
||||
void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData);
|
||||
void VKAPI_CALL vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent *pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers);
|
||||
|
|
|
@ -5,7 +5,33 @@
|
|||
*
|
||||
* Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* ---- Exceptions to the Apache 2.0 License: ----
|
||||
*
|
||||
* As an exception, if you use this Software to generate code and portions of
|
||||
* this Software are embedded into the generated code as a result, you may
|
||||
* redistribute such product without providing attribution as would otherwise
|
||||
* be required by Sections 4(a), 4(b) and 4(d) of the License.
|
||||
*
|
||||
* In addition, if you combine or link code generated by this Software with
|
||||
* software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
||||
* ("`Combined Software`") and if a court of competent jurisdiction determines
|
||||
* that the patent provision (Section 3), the indemnity provision (Section 9)
|
||||
* or other Section of the License conflicts with the conditions of the
|
||||
* applicable GPL or LGPL license, you may retroactively and prospectively
|
||||
* choose to deem waived or otherwise exclude such Section(s) of the License,
|
||||
* but only in their entirety and only with respect to the Combined Software.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -744,21 +744,6 @@ typedef struct _FILE_PIPE_LOCAL_INFORMATION {
|
|||
#define FILE_PIPE_CONNECTED_STATE 0x00000003
|
||||
#define FILE_PIPE_CLOSING_STATE 0x00000004
|
||||
|
||||
typedef struct _FILE_OBJECTID_BUFFER
|
||||
{
|
||||
BYTE ObjectId[16];
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
BYTE BirthVolumeId[16];
|
||||
BYTE BirthObjectId[16];
|
||||
BYTE DomainId[16];
|
||||
} DUMMYSTRUCTNAME;
|
||||
BYTE ExtendedInfo[48];
|
||||
} DUMMYUNIONNAME;
|
||||
} FILE_OBJECTID_BUFFER, *PFILE_OBJECTID_BUFFER;
|
||||
|
||||
typedef struct _FILE_OBJECTID_INFORMATION {
|
||||
LONGLONG FileReference;
|
||||
UCHAR ObjectId[16];
|
||||
|
|
|
@ -543,7 +543,7 @@ int do_import(char *fname)
|
|||
line_number = 1;
|
||||
|
||||
name = xstrdup( "widl.XXXXXX" );
|
||||
if((fd = mkstemps( name, 0 )) == -1)
|
||||
if((fd = pseudorandom_tempfile(name)) == -1)
|
||||
error("Could not generate a temp name from %s\n", name);
|
||||
|
||||
temp_name = name;
|
||||
|
@ -584,7 +584,7 @@ static void switch_to_acf(void)
|
|||
line_number = 1;
|
||||
|
||||
name = xstrdup( "widl.XXXXXX" );
|
||||
if((fd = mkstemps( name, 0 )) == -1)
|
||||
if((fd = pseudorandom_tempfile(name)) == -1)
|
||||
error("Could not generate a temp name from %s\n", name);
|
||||
|
||||
temp_name = name;
|
||||
|
|
|
@ -474,3 +474,187 @@ void align_output( unsigned int align )
|
|||
memset( output_buffer + output_buffer_pos, 0, size );
|
||||
output_buffer_pos += size;
|
||||
}
|
||||
|
||||
/* xorshift* random generator. Source: https://en.wikipedia.org/wiki/Xorshift#xorshift* */
|
||||
static uint64_t pseudorandom_state = 1;
|
||||
static const char* pseudorandom_source = NULL;
|
||||
static size_t pseudorandom_source_size = 0;
|
||||
|
||||
static uint64_t pseudorandom_algo(uint64_t* generator_state, uint64_t add_to_state)
|
||||
{
|
||||
uint64_t tmp = (*generator_state) + add_to_state;
|
||||
tmp ^= tmp >> 12;
|
||||
tmp ^= tmp << 25;
|
||||
tmp ^= tmp >> 27;
|
||||
(*generator_state) = tmp;
|
||||
return tmp * UINT64_C(0x2545F4914F6CDD1D);
|
||||
}
|
||||
|
||||
uint64_t pseudorandom(uint64_t add_to_state)
|
||||
{
|
||||
return pseudorandom_algo(&pseudorandom_state, add_to_state);
|
||||
}
|
||||
|
||||
char pseudorandom_char(void)
|
||||
{
|
||||
char tmp;
|
||||
tmp = (char) (pseudorandom(0) % 62);
|
||||
if (tmp < 10)
|
||||
{
|
||||
return '0' + tmp;
|
||||
}
|
||||
else if (tmp < 36)
|
||||
{
|
||||
return 'A' + (tmp - 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'a' + (tmp - 36);
|
||||
}
|
||||
}
|
||||
|
||||
int pseudorandom_tempfile(char* file)
|
||||
{
|
||||
/* variables */
|
||||
int result;
|
||||
|
||||
int counter;
|
||||
char *filename_pos;
|
||||
|
||||
char *debug_filename;
|
||||
FILE *debug_file;
|
||||
|
||||
/* replaces Xs */
|
||||
for (filename_pos = file; (*filename_pos) != 0; filename_pos++)
|
||||
{
|
||||
if ((*filename_pos) == 'X')
|
||||
{
|
||||
(*filename_pos) = pseudorandom_char();
|
||||
}
|
||||
}
|
||||
|
||||
/* try to open file */
|
||||
counter = 0;
|
||||
do
|
||||
{
|
||||
result = open(file, O_CREAT | O_EXCL | O_RDWR, 0600);
|
||||
if (result != -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
sleep(5);
|
||||
counter++;
|
||||
} while (counter <= 12);
|
||||
|
||||
/* add deebug info */
|
||||
if ((result != -1) && (getenv("SOURCE_RANDOM_DEBUG") != NULL))
|
||||
{
|
||||
debug_filename = strmake("%s.random_debug", file);
|
||||
debug_file = fopen(debug_filename, "wb");
|
||||
fwrite(pseudorandom_source, 1, pseudorandom_source_size, debug_file);
|
||||
fclose(debug_file);
|
||||
free(debug_filename);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void init_random_generator(int argc, char **argv)
|
||||
{
|
||||
/* variables */
|
||||
uint64_t generator_state;
|
||||
|
||||
void *argv_data;
|
||||
size_t argv_size;
|
||||
|
||||
unsigned int counter;
|
||||
void *env_data;
|
||||
size_t env_size;
|
||||
char **tmp_envs;
|
||||
|
||||
char *buffer_pos;
|
||||
char **env;
|
||||
size_t length;
|
||||
|
||||
unsigned int i;
|
||||
size_t j;
|
||||
|
||||
/* process environment */
|
||||
generator_state = 1;
|
||||
env_size = 0;
|
||||
{
|
||||
/* sort environment variables */
|
||||
counter = 0;
|
||||
for (env = environ; (*env) != NULL; env++)
|
||||
{
|
||||
counter++;
|
||||
env_size += strlen(*env) + 1;
|
||||
}
|
||||
tmp_envs = (char**) malloc(sizeof(char*) * counter);
|
||||
for (i = 0; i < counter; i++)
|
||||
{
|
||||
tmp_envs[i] = (char*) (environ[i]);
|
||||
}
|
||||
qsort(tmp_envs, counter, sizeof(char*), (int(*)(const void*, const void*)) &strcmp);
|
||||
|
||||
/* and copy them */
|
||||
env_data = malloc(env_size * sizeof(char));
|
||||
buffer_pos = env_data;
|
||||
for (i = 0; i < counter; i++)
|
||||
{
|
||||
length = strlen(tmp_envs[i]) + 1;
|
||||
memcpy(buffer_pos, tmp_envs[i], length);
|
||||
buffer_pos += length;
|
||||
}
|
||||
|
||||
/* add sorted environment to random generator */
|
||||
for (j = 0; j < env_size; j++)
|
||||
{
|
||||
pseudorandom_algo(&generator_state, ((unsigned char*) env_data)[j]);
|
||||
}
|
||||
|
||||
/* free temp environment */
|
||||
free(tmp_envs);
|
||||
}
|
||||
|
||||
/* copy argv */
|
||||
argv_size = 0;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
argv_size += strlen(argv[i]) + 1;
|
||||
}
|
||||
argv_data = malloc(sizeof(char) * argv_size);
|
||||
buffer_pos = argv_data;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
length = strlen(argv[i]) + 1;
|
||||
memcpy(buffer_pos, argv[i], length);
|
||||
buffer_pos += length;
|
||||
}
|
||||
|
||||
/* add arguments to gnerator */
|
||||
for (j = 0; j < argv_size; j++)
|
||||
{
|
||||
pseudorandom_algo(&generator_state, ((unsigned char*) argv_data)[j]);
|
||||
}
|
||||
|
||||
/* add debug if required */
|
||||
if (getenv("SOURCE_RANDOM_DEBUG") != NULL)
|
||||
{
|
||||
/* gen field */
|
||||
pseudorandom_source_size = env_size + argv_size + sizeof(generator_state);
|
||||
buffer_pos = malloc(sizeof(char) * pseudorandom_source_size);
|
||||
pseudorandom_source = buffer_pos;
|
||||
|
||||
/* copy data into it */
|
||||
memcpy(buffer_pos, env_data, env_size);
|
||||
buffer_pos += env_size;
|
||||
memcpy(buffer_pos, argv_data, argv_size);
|
||||
buffer_pos += argv_size;
|
||||
memcpy(buffer_pos, &generator_state, sizeof(generator_state));
|
||||
}
|
||||
|
||||
/* set state and free rest */
|
||||
free(env_data);
|
||||
free(argv_data);
|
||||
pseudorandom_state = generator_state;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "widltypes.h"
|
||||
|
||||
#include <stddef.h> /* size_t */
|
||||
#include <stdint.h>
|
||||
|
||||
void *xmalloc(size_t);
|
||||
void *xrealloc(void *, size_t);
|
||||
|
@ -72,6 +73,11 @@ extern void put_pword( unsigned int val );
|
|||
extern void put_str( int indent, const char *format, ... ) __attribute__((format (printf, 2, 3)));
|
||||
extern void align_output( unsigned int align );
|
||||
|
||||
extern uint64_t pseudorandom(uint64_t add_to_state);
|
||||
extern char pseudorandom_char(void);
|
||||
extern int pseudorandom_tempfile(char* file);
|
||||
extern void init_random_generator(int argc, char **argv);
|
||||
|
||||
/* typelibs expect the minor version to be stored in the higher bits and
|
||||
* major to be stored in the lower bits */
|
||||
#define MAKEVERSION(major, minor) ((((minor) & 0xffff) << 16) | ((major) & 0xffff))
|
||||
|
|
|
@ -607,9 +607,20 @@ int main(int argc,char *argv[])
|
|||
#ifdef SIGHUP
|
||||
signal( SIGHUP, exit_on_signal );
|
||||
#endif
|
||||
init_random_generator(argc, argv);
|
||||
init_argv0_dir( argv[0] );
|
||||
|
||||
now = time(NULL);
|
||||
{
|
||||
const char* source_time = getenv("SOURCE_DATE_EPOCH");
|
||||
if (source_time == NULL)
|
||||
{
|
||||
now = time(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
now = atol(source_time);
|
||||
}
|
||||
}
|
||||
|
||||
while((optc = getopt_long_only(argc, argv, short_options, long_options, &opti)) != EOF) {
|
||||
switch(optc) {
|
||||
|
@ -938,7 +949,7 @@ int main(int argc,char *argv[])
|
|||
strcpy( name, header_name );
|
||||
strcat( name, ".XXXXXX" );
|
||||
|
||||
if ((fd = mkstemps( name, 0 )) == -1)
|
||||
if ((fd = pseudorandom_tempfile(name)) == -1)
|
||||
error("Could not generate a temp name from %s\n", name);
|
||||
|
||||
temp_name = name;
|
||||
|
|
|
@ -2747,8 +2747,10 @@ int create_msft_typelib(typelib_t *typelib)
|
|||
|
||||
/* midl adds two sets of custom data to the library: the current unix time
|
||||
and midl's version number */
|
||||
time_override = getenv( "WIDL_TIME_OVERRIDE");
|
||||
time_override = getenv("SOURCE_DATE_EPOCH");
|
||||
cur_time = time_override ? atol( time_override) : time(NULL);
|
||||
time_override = getenv( "WIDL_TIME_OVERRIDE");
|
||||
cur_time = time_override ? atol( time_override) : cur_time;
|
||||
sprintf(info_string, "Created by WIDL version %s at %s\n", PACKAGE_VERSION, ctime(&cur_time));
|
||||
set_custdata(msft, &midl_info_guid, VT_BSTR, info_string, &msft->typelib_header.CustomDataOffset);
|
||||
set_custdata(msft, &midl_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
# error You must include config.h to use this header
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -352,6 +353,11 @@ extern void put_qword( unsigned int val );
|
|||
extern void put_pword( unsigned int val );
|
||||
extern void align_output( unsigned int align );
|
||||
|
||||
extern uint64_t pseudorandom(uint64_t add_to_state);
|
||||
extern char pseudorandom_char(void);
|
||||
extern int pseudorandom_tempfile(char* file);
|
||||
extern void init_random_generator(int argc, char **argv);
|
||||
|
||||
/* global variables */
|
||||
|
||||
extern int current_line;
|
||||
|
|
|
@ -666,6 +666,7 @@ int main(int argc, char **argv)
|
|||
signal( SIGTERM, exit_on_signal );
|
||||
signal( SIGINT, exit_on_signal );
|
||||
|
||||
init_random_generator(argc, argv);
|
||||
argv = parse_options( argc, argv, spec );
|
||||
atexit( cleanup ); /* make sure we remove the output file on exit */
|
||||
|
||||
|
|
|
@ -826,7 +826,11 @@ void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 )
|
|||
ORDDEF *odp;
|
||||
|
||||
spec32->file_name = xstrdup( spec16->file_name );
|
||||
spec32->characteristics = IMAGE_FILE_DLL;
|
||||
if (spec16->characteristics & IMAGE_FILE_DLL)
|
||||
{
|
||||
spec32->characteristics = IMAGE_FILE_DLL;
|
||||
spec32->init_func = xstrdup( "DllMain" );
|
||||
}
|
||||
|
||||
/* add an export for the NE module */
|
||||
|
||||
|
|
|
@ -514,13 +514,13 @@ char *get_temp_file_name( const char *prefix, const char *suffix )
|
|||
strcpy( name + (ext - prefix), ".XXXXXX" );
|
||||
strcat( name, suffix );
|
||||
|
||||
if ((fd = mkstemps( name, strlen(suffix) )) == -1)
|
||||
if ((fd = pseudorandom_tempfile(name)) == -1)
|
||||
{
|
||||
strcpy( name, "/tmp/" );
|
||||
memcpy( name + 5, basename, ext - basename );
|
||||
strcpy( name + 5 + (ext - basename), ".XXXXXX" );
|
||||
strcat( name, suffix );
|
||||
if ((fd = mkstemps( name, strlen(suffix) )) == -1)
|
||||
if ((fd = pseudorandom_tempfile(name)) == -1)
|
||||
fatal_error( "could not generate a temp file\n" );
|
||||
}
|
||||
|
||||
|
@ -1275,3 +1275,187 @@ const char *get_asm_string_section(void)
|
|||
default: return ".section .rodata";
|
||||
}
|
||||
}
|
||||
|
||||
/* xorshift* random generator. Source: https://en.wikipedia.org/wiki/Xorshift#xorshift* */
|
||||
static uint64_t pseudorandom_state = 1;
|
||||
static const char* pseudorandom_source = NULL;
|
||||
static size_t pseudorandom_source_size = 0;
|
||||
|
||||
static uint64_t pseudorandom_algo(uint64_t* generator_state, uint64_t add_to_state)
|
||||
{
|
||||
uint64_t tmp = (*generator_state) + add_to_state;
|
||||
tmp ^= tmp >> 12;
|
||||
tmp ^= tmp << 25;
|
||||
tmp ^= tmp >> 27;
|
||||
(*generator_state) = tmp;
|
||||
return tmp * UINT64_C(0x2545F4914F6CDD1D);
|
||||
}
|
||||
|
||||
uint64_t pseudorandom(uint64_t add_to_state)
|
||||
{
|
||||
return pseudorandom_algo(&pseudorandom_state, add_to_state);
|
||||
}
|
||||
|
||||
char pseudorandom_char(void)
|
||||
{
|
||||
char tmp;
|
||||
tmp = (char) (pseudorandom(0) % 62);
|
||||
if (tmp < 10)
|
||||
{
|
||||
return '0' + tmp;
|
||||
}
|
||||
else if (tmp < 36)
|
||||
{
|
||||
return 'A' + (tmp - 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'a' + (tmp - 36);
|
||||
}
|
||||
}
|
||||
|
||||
int pseudorandom_tempfile(char* file)
|
||||
{
|
||||
/* variables */
|
||||
int result;
|
||||
|
||||
int counter;
|
||||
char *filename_pos;
|
||||
|
||||
char *debug_filename;
|
||||
FILE *debug_file;
|
||||
|
||||
/* replaces Xs */
|
||||
for (filename_pos = file; (*filename_pos) != 0; filename_pos++)
|
||||
{
|
||||
if ((*filename_pos) == 'X')
|
||||
{
|
||||
(*filename_pos) = pseudorandom_char();
|
||||
}
|
||||
}
|
||||
|
||||
/* try to open file */
|
||||
counter = 0;
|
||||
do
|
||||
{
|
||||
result = open(file, O_CREAT | O_EXCL | O_RDWR, 0600);
|
||||
if (result != -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
sleep(5);
|
||||
counter++;
|
||||
} while (counter <= 12);
|
||||
|
||||
/* add deebug info */
|
||||
if ((result != -1) && (getenv("SOURCE_RANDOM_DEBUG") != NULL))
|
||||
{
|
||||
debug_filename = strmake("%s.random_debug", file);
|
||||
debug_file = fopen(debug_filename, "wb");
|
||||
fwrite(pseudorandom_source, 1, pseudorandom_source_size, debug_file);
|
||||
fclose(debug_file);
|
||||
free(debug_filename);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void init_random_generator(int argc, char **argv)
|
||||
{
|
||||
/* variables */
|
||||
uint64_t generator_state;
|
||||
|
||||
void *argv_data;
|
||||
size_t argv_size;
|
||||
|
||||
unsigned int counter;
|
||||
void *env_data;
|
||||
size_t env_size;
|
||||
char **tmp_envs;
|
||||
|
||||
char *buffer_pos;
|
||||
char **env;
|
||||
size_t length;
|
||||
|
||||
unsigned int i;
|
||||
size_t j;
|
||||
|
||||
/* process environment */
|
||||
generator_state = 1;
|
||||
env_size = 0;
|
||||
{
|
||||
/* sort environment variables */
|
||||
counter = 0;
|
||||
for (env = environ; (*env) != NULL; env++)
|
||||
{
|
||||
counter++;
|
||||
env_size += strlen(*env) + 1;
|
||||
}
|
||||
tmp_envs = (char**) malloc(sizeof(char*) * counter);
|
||||
for (i = 0; i < counter; i++)
|
||||
{
|
||||
tmp_envs[i] = (char*) (environ[i]);
|
||||
}
|
||||
qsort(tmp_envs, counter, sizeof(char*), (int(*)(const void*, const void*)) &strcmp);
|
||||
|
||||
/* and copy them */
|
||||
env_data = malloc(env_size * sizeof(char));
|
||||
buffer_pos = env_data;
|
||||
for (i = 0; i < counter; i++)
|
||||
{
|
||||
length = strlen(tmp_envs[i]) + 1;
|
||||
memcpy(buffer_pos, tmp_envs[i], length);
|
||||
buffer_pos += length;
|
||||
}
|
||||
|
||||
/* add sorted environment to random generator */
|
||||
for (j = 0; j < env_size; j++)
|
||||
{
|
||||
pseudorandom_algo(&generator_state, ((unsigned char*) env_data)[j]);
|
||||
}
|
||||
|
||||
/* free temp environment */
|
||||
free(tmp_envs);
|
||||
}
|
||||
|
||||
/* copy argv */
|
||||
argv_size = 0;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
argv_size += strlen(argv[i]) + 1;
|
||||
}
|
||||
argv_data = malloc(sizeof(char) * argv_size);
|
||||
buffer_pos = argv_data;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
length = strlen(argv[i]) + 1;
|
||||
memcpy(buffer_pos, argv[i], length);
|
||||
buffer_pos += length;
|
||||
}
|
||||
|
||||
/* add arguments to gnerator */
|
||||
for (j = 0; j < argv_size; j++)
|
||||
{
|
||||
pseudorandom_algo(&generator_state, ((unsigned char*) argv_data)[j]);
|
||||
}
|
||||
|
||||
/* add debug if required */
|
||||
if (getenv("SOURCE_RANDOM_DEBUG") != NULL)
|
||||
{
|
||||
/* gen field */
|
||||
pseudorandom_source_size = env_size + argv_size + sizeof(generator_state);
|
||||
buffer_pos = malloc(sizeof(char) * pseudorandom_source_size);
|
||||
pseudorandom_source = buffer_pos;
|
||||
|
||||
/* copy data into it */
|
||||
memcpy(buffer_pos, env_data, env_size);
|
||||
buffer_pos += env_size;
|
||||
memcpy(buffer_pos, argv_data, argv_size);
|
||||
buffer_pos += argv_size;
|
||||
memcpy(buffer_pos, &generator_state, sizeof(generator_state));
|
||||
}
|
||||
|
||||
/* set state and free rest */
|
||||
free(env_data);
|
||||
free(argv_data);
|
||||
pseudorandom_state = generator_state;
|
||||
}
|
||||
|
|
|
@ -384,3 +384,187 @@ int spawn(const strarray* prefix, const strarray* args, int ignore_errors)
|
|||
strarray_free(arr);
|
||||
return status;
|
||||
}
|
||||
|
||||
/* xorshift* random generator. Source: https://en.wikipedia.org/wiki/Xorshift#xorshift* */
|
||||
static uint64_t pseudorandom_state = 1;
|
||||
static const char* pseudorandom_source = NULL;
|
||||
static size_t pseudorandom_source_size = 0;
|
||||
|
||||
static uint64_t pseudorandom_algo(uint64_t* generator_state, uint64_t add_to_state)
|
||||
{
|
||||
uint64_t tmp = (*generator_state) + add_to_state;
|
||||
tmp ^= tmp >> 12;
|
||||
tmp ^= tmp << 25;
|
||||
tmp ^= tmp >> 27;
|
||||
(*generator_state) = tmp;
|
||||
return tmp * UINT64_C(0x2545F4914F6CDD1D);
|
||||
}
|
||||
|
||||
uint64_t pseudorandom(uint64_t add_to_state)
|
||||
{
|
||||
return pseudorandom_algo(&pseudorandom_state, add_to_state);
|
||||
}
|
||||
|
||||
char pseudorandom_char(void)
|
||||
{
|
||||
char tmp;
|
||||
tmp = (char) (pseudorandom(0) % 62);
|
||||
if (tmp < 10)
|
||||
{
|
||||
return '0' + tmp;
|
||||
}
|
||||
else if (tmp < 36)
|
||||
{
|
||||
return 'A' + (tmp - 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'a' + (tmp - 36);
|
||||
}
|
||||
}
|
||||
|
||||
int pseudorandom_tempfile(char* file)
|
||||
{
|
||||
/* variables */
|
||||
int result;
|
||||
|
||||
int counter;
|
||||
char *filename_pos;
|
||||
|
||||
char *debug_filename;
|
||||
FILE *debug_file;
|
||||
|
||||
/* replaces Xs */
|
||||
for (filename_pos = file; (*filename_pos) != 0; filename_pos++)
|
||||
{
|
||||
if ((*filename_pos) == 'X')
|
||||
{
|
||||
(*filename_pos) = pseudorandom_char();
|
||||
}
|
||||
}
|
||||
|
||||
/* try to open file */
|
||||
counter = 0;
|
||||
do
|
||||
{
|
||||
result = open(file, O_CREAT | O_EXCL | O_RDWR, 0600);
|
||||
if (result != -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
sleep(5);
|
||||
counter++;
|
||||
} while (counter <= 12);
|
||||
|
||||
/* add deebug info */
|
||||
if ((result != -1) && (getenv("SOURCE_RANDOM_DEBUG") != NULL))
|
||||
{
|
||||
debug_filename = strmake("%s.random_debug", file);
|
||||
debug_file = fopen(debug_filename, "wb");
|
||||
fwrite(pseudorandom_source, 1, pseudorandom_source_size, debug_file);
|
||||
fclose(debug_file);
|
||||
free(debug_filename);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void init_random_generator(int argc, char **argv)
|
||||
{
|
||||
/* variables */
|
||||
uint64_t generator_state;
|
||||
|
||||
void *argv_data;
|
||||
size_t argv_size;
|
||||
|
||||
unsigned int counter;
|
||||
void *env_data;
|
||||
size_t env_size;
|
||||
char **tmp_envs;
|
||||
|
||||
char *buffer_pos;
|
||||
char **env;
|
||||
size_t length;
|
||||
|
||||
unsigned int i;
|
||||
size_t j;
|
||||
|
||||
/* process environment */
|
||||
generator_state = 1;
|
||||
env_size = 0;
|
||||
{
|
||||
/* sort environment variables */
|
||||
counter = 0;
|
||||
for (env = environ; (*env) != NULL; env++)
|
||||
{
|
||||
counter++;
|
||||
env_size += strlen(*env) + 1;
|
||||
}
|
||||
tmp_envs = (char**) malloc(sizeof(char*) * counter);
|
||||
for (i = 0; i < counter; i++)
|
||||
{
|
||||
tmp_envs[i] = (char*) (environ[i]);
|
||||
}
|
||||
qsort(tmp_envs, counter, sizeof(char*), (int(*)(const void*, const void*)) &strcmp);
|
||||
|
||||
/* and copy them */
|
||||
env_data = malloc(env_size * sizeof(char));
|
||||
buffer_pos = env_data;
|
||||
for (i = 0; i < counter; i++)
|
||||
{
|
||||
length = strlen(tmp_envs[i]) + 1;
|
||||
memcpy(buffer_pos, tmp_envs[i], length);
|
||||
buffer_pos += length;
|
||||
}
|
||||
|
||||
/* add sorted environment to random generator */
|
||||
for (j = 0; j < env_size; j++)
|
||||
{
|
||||
pseudorandom_algo(&generator_state, ((unsigned char*) env_data)[j]);
|
||||
}
|
||||
|
||||
/* free temp environment */
|
||||
free(tmp_envs);
|
||||
}
|
||||
|
||||
/* copy argv */
|
||||
argv_size = 0;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
argv_size += strlen(argv[i]) + 1;
|
||||
}
|
||||
argv_data = malloc(sizeof(char) * argv_size);
|
||||
buffer_pos = argv_data;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
length = strlen(argv[i]) + 1;
|
||||
memcpy(buffer_pos, argv[i], length);
|
||||
buffer_pos += length;
|
||||
}
|
||||
|
||||
/* add arguments to gnerator */
|
||||
for (j = 0; j < argv_size; j++)
|
||||
{
|
||||
pseudorandom_algo(&generator_state, ((unsigned char*) argv_data)[j]);
|
||||
}
|
||||
|
||||
/* add debug if required */
|
||||
if (getenv("SOURCE_RANDOM_DEBUG") != NULL)
|
||||
{
|
||||
/* gen field */
|
||||
pseudorandom_source_size = env_size + argv_size + sizeof(generator_state);
|
||||
buffer_pos = malloc(sizeof(char) * pseudorandom_source_size);
|
||||
pseudorandom_source = buffer_pos;
|
||||
|
||||
/* copy data into it */
|
||||
memcpy(buffer_pos, env_data, env_size);
|
||||
buffer_pos += env_size;
|
||||
memcpy(buffer_pos, argv_data, argv_size);
|
||||
buffer_pos += argv_size;
|
||||
memcpy(buffer_pos, &generator_state, sizeof(generator_state));
|
||||
}
|
||||
|
||||
/* set state and free rest */
|
||||
free(env_data);
|
||||
free(argv_data);
|
||||
pseudorandom_state = generator_state;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#define __attribute__(X)
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef DECLSPEC_NORETURN
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS)
|
||||
# define DECLSPEC_NORETURN __declspec(noreturn)
|
||||
|
@ -90,3 +92,8 @@ const char *find_binary( const strarray* prefix, const char *name );
|
|||
int spawn(const strarray* prefix, const strarray* arr, int ignore_errors);
|
||||
|
||||
extern int verbose;
|
||||
|
||||
uint64_t pseudorandom(uint64_t add_to_state);
|
||||
char pseudorandom_char(void);
|
||||
int pseudorandom_tempfile(char* file);
|
||||
void init_random_generator(int argc, char **argv);
|
||||
|
|
|
@ -299,7 +299,7 @@ static char* get_temp_file(const char* prefix, const char* suffix)
|
|||
/* block signals while manipulating the temp files list */
|
||||
sigprocmask( SIG_BLOCK, &signal_mask, &old_set );
|
||||
#endif
|
||||
fd = mkstemps( tmp, strlen(suffix) );
|
||||
fd = pseudorandom_tempfile(tmp);
|
||||
if (fd == -1)
|
||||
{
|
||||
/* could not create it in current directory, try in TMPDIR */
|
||||
|
@ -308,7 +308,7 @@ static char* get_temp_file(const char* prefix, const char* suffix)
|
|||
free(tmp);
|
||||
if (!(tmpdir = getenv("TMPDIR"))) tmpdir = "/tmp";
|
||||
tmp = strmake("%s/%s-XXXXXX%s", tmpdir, prefix, suffix);
|
||||
fd = mkstemps( tmp, strlen(suffix) );
|
||||
fd = pseudorandom_tempfile(tmp);
|
||||
if (fd == -1) error( "could not create temp file\n" );
|
||||
}
|
||||
close( fd );
|
||||
|
@ -1603,6 +1603,7 @@ int main(int argc, char **argv)
|
|||
sigaddset( &signal_mask, SIGTERM );
|
||||
sigaddset( &signal_mask, SIGINT );
|
||||
#endif
|
||||
init_random_generator(argc, argv);
|
||||
init_argv0_dir( argv[0] );
|
||||
|
||||
/* setup tmp file removal at exit */
|
||||
|
|
Loading…
Reference in New Issue