Closed CarterLi closed 2 years ago
Hi, not sure if you saw, but this MR already introduces support for the portability extension. Is that a hard requirement these days? I can try rebasing it on master and merging it. (Also note that master does not use VkEvent at all)
The fact that it's still a beta extension is icky. I don't know why they can't get around to making it stable if they already require it for release versions of MoltenVK...
Edit: I rebased it onto current master.
Hi, not sure if you saw, but this MR already introduces support for the portability extension. Is that a hard requirement these days? I can try rebasing it on master and merging it. (Also note that master does not use VkEvent at all)
The fact that it's still a beta extension is icky. I don't know why they can't get around to making it stable if they already require it for release versions of MoltenVK...
Edit: I rebased it onto current master.
No I didnt check the PR list on gitlab, but I am glad to see that.
What about removing the volkan version requirement, at least for macos?
What about the graphic issue?
Notice that opengl mode failed too in my first try
pl_gpu_create_gl: OpenGL error: GL_INVALID_ENUM
Any ideas?
What about removing the volkan version requirement, at least for macos?
I could do this. I'm not sure it serves a real purpose anyway, since vulkan 1.1 is ancient.
@CarterLi I updated the MR to drop the vulkan requirement. Can you test if you still get the graphical corruption with that branch? Also, can you test with a more familiar/recognizable source file? (I'm not sure what it's supposed to look like)
Finally, can you compile with nuklear and show me the configuration of the UI? (In particular, is it picking a transparent background color? What happens if you change it?)
Any ideas?
Nope. Something like an apitrace
log would probably be more useful here. Or you can try sprinkling that gl_check_err
call throughout that function, e.g.:
if (!gl_check_err(gpu, "pl_gpu_create_gl: 1")) goto error;
Replacing 1
by a bunch of different numbers. That should help narrow down which exact GL call triggers the error.
@CarterLi I updated the MR to drop the vulkan requirement. Can you test if you still get the graphical corruption with that branch? Also, can you test with a more familiar/recognizable source file? (I'm not sure what it's supposed to look like)
Finally, can you compile with nuklear and show me the configuration of the UI? (In particular, is it picking a transparent background color? What happens if you change it?)
Any ideas?
Nope. Something like an
apitrace
log would probably be more useful here. Or you can try sprinkling thatgl_check_err
call throughout that function, e.g.:if (!gl_check_err(gpu, "pl_gpu_create_gl: 1")) goto error;
Replacing
1
by a bunch of different numbers. That should help narrow down which exact GL call triggers the error.
Thanks for your quick reply, but I have to test it tomorrow ( in my timezone )
Some other projects such as ppsspp do use moltenvk on macOS but they dont have such issues
Strange
Can you test if you still get the graphical corruption with that branch?
The graphic is still corrupted
Also, can you test with a more familiar/recognizable source file?
The source file can be found here: https://github.com/iina/iina/pull/3539#issuecomment-970176043
plplay crashed when I was trying to resize the window
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: plplay [6865]
Path: /Users/USER/*/plplay
Identifier: plplay
Version: ???
Code Type: ARM-64 (Native)
Parent Process: fish [700]
Responsible: iTerm2 [696]
User ID: 501
Date/Time: 2021-11-19 10:10:16.4193 +0800
OS Version: macOS 12.0.1 (21A559)
Report Version: 12
Anonymous UUID: 6B003244-78E0-07F2-4173-072C2FD1A758
Time Awake Since Boot: 2000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000554feafa0440
Exception Codes: 0x0000000000000001, 0x0000554feafa0440
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [6865]
VM Region Info: 0x554feafa0440 is not in any region. Bytes after previous region: 93320696693825 Bytes before following region: 11751383235520
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated)
---> GAP OF 0x5f9000000000 BYTES
MALLOC_NANO 600000000000-600008000000 [128.0M] rw-/rwx SM=PRV
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x1ab76e750 objc_release + 16
1 libobjc.A.dylib 0x1ab77347c AutoreleasePoolPage::releaseUntil(objc_object**) + 200
2 libobjc.A.dylib 0x1ab76fe18 objc_autoreleasePoolPop + 208
3 CoreFoundation 0x1ab969f58 _CFAutoreleasePoolPop + 32
4 Foundation 0x1ac85535c -[NSAutoreleasePool drain] + 140
5 AppKit 0x1ae87ddd4 -[NSWindow(NSWindowResizing) _resizeWithEvent:] + 2004
6 AppKit 0x1ae7711fc -[NSTitledFrame attemptResizeWithEvent:] + 204
7 AppKit 0x1ae770f3c -[NSThemeFrame handleMouseDown:] + 288
8 AppKit 0x1ae7fca68 -[NSThemeFrame mouseDown:] + 40
9 AppKit 0x1ae6fd7d8 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4524
10 AppKit 0x1ae670c78 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2444
11 AppKit 0x1ae670080 -[NSWindow(NSEventRouting) sendEvent:] + 348
12 AppKit 0x1ae66efe4 -[NSApplication(NSEvent) sendEvent:] + 2776
13 libglfw.3.3.dylib 0x104e000c4 _glfwPlatformPollEvents + 176
14 plplay 0x104c1fb40 glfw_poll + 48 (window_glfw.c:373)
15 plplay 0x104c1f3d8 window_poll + 56 (window.c:52)
16 plplay 0x104c19844 render_loop + 880 (plplay.c:453)
17 plplay 0x104c187f0 main + 1664 (plplay.c:612)
18 dyld 0x104eb10f4 start + 520
Thread 1:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 4:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x1ab8a5954 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1ab8a5d00 mach_msg + 76
2 CoreFoundation 0x1ab9ace38 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x1ab9ab2f0 __CFRunLoopRun + 1212
4 CoreFoundation 0x1ab9aa694 CFRunLoopRunSpecific + 600
5 AppKit 0x1ae66cc24 _NSEventThread + 196
6 libsystem_pthread.dylib 0x1ab8e14ec _pthread_start + 148
7 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 5:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 6:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 7:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 8:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 9:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 10:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 11:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 12:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 13:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 14:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libavcodec.58.134.100.dylib 0x1069fb9e4 0x106638000 + 3946980
3 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 15:
0 libsystem_kernel.dylib 0x1ab8a90c0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1ab8e1ab4 _pthread_cond_wait + 1228
2 libplacebo.178.dylib 0x105665258 pl_cond_timedwait + 48 (pl_thread_pthread.h:91)
3 libplacebo.178.dylib 0x105665108 pl_queue_push_block + 136 (frame_queue.c:311)
4 plplay 0x104c193f8 decode_loop + 628 (plplay.c:280)
5 libsystem_pthread.dylib 0x1ab8e14ec _pthread_start + 148
6 libsystem_pthread.dylib 0x1ab8dc2d0 thread_start + 8
Thread 16:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 17:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 18:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 19:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 20:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 21:
0 libsystem_pthread.dylib 0x1ab8dc2bc start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000600002610420 x1: 0x0000600002480fc0 x2: 0x0000000000000000 x3: 0x00000001ab6f623c
x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x00006000024839c0
x8: 0x0000554feafa0420 x9: 0x0000554feafa0420 x10: 0x0000000142011788 x11: 0x0000000000000001
x12: 0x00000000000000fd x13: 0x0000000080f7939d x14: 0x0000000081179800 x15: 0x0000000000179800
x16: 0x00000001ab76e740 x17: 0x0000000205cc10f0 x18: 0x000000013812b940 x19: 0x0000000142011000
x20: 0x00000001420113f8 x21: 0x0000600002610420 x22: 0x00000000a1a1a1a1 x23: 0x0000000104f1c660
x24: 0xa3a3a3a3a3a3a3a3 x25: 0x0000000000000001 x26: 0x0000000000000009 x27: 0x000060000138ba80
x28: 0x00000001f5b82426 fp: 0x000000016b162c60 lr: 0x00000001ab77347c
sp: 0x000000016b162c20 pc: 0x00000001ab76e750 cpsr: 0x20000000
far: 0x0000554feafa0440 esr: 0x92000005 (Data Abort) byte read Translation fault
Binary Images:
0x1ab766000 - 0x1ab7a1fff libobjc.A.dylib (*) <2eabed7f-1e81-3a1b-bb4b-985b8dd3b77f> /usr/lib/libobjc.A.dylib
0x1ab928000 - 0x1abe6bfff com.apple.CoreFoundation (6.9) <b2ff96d0-ae99-31ef-9014-fc9964b4f3e0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1ac81f000 - 0x1acc0cfff com.apple.Foundation (6.9) <de039f1b-ffe5-3644-a8cf-7ba52c32cd73> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x1ae4be000 - 0x1af36ffff com.apple.AppKit (6.9) <518f4e68-c324-320f-9d7f-85c224eae972> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x104df0000 - 0x104e13fff libglfw.3.3.dylib (*) <d5637568-69ea-3ee7-b452-5ad48c720ed6> /opt/homebrew/*/libglfw.3.3.dylib
0x104c14000 - 0x104c67fff plplay (*) <5d3a0951-e3c4-36da-a59a-efc79abdfd73> /Users/USER/*/plplay
0x104eac000 - 0x104f0bfff dyld (*) <86a8ba48-8bb4-3b30-9cda-051f73c74f44> /usr/lib/dyld
0x1ab8da000 - 0x1ab8e6fff libsystem_pthread.dylib (*) <4786e19a-9312-38e6-80ef-9c1394548118> /usr/lib/system/libsystem_pthread.dylib
0x1ab8a4000 - 0x1ab8d9fff libsystem_kernel.dylib (*) <c8524c02-b14f-30bd-a228-c44b4a448e68> /usr/lib/system/libsystem_kernel.dylib
0x106638000 - 0x106eebfff libavcodec.58.134.100.dylib (*) <5beef38a-0514-3bc5-b009-76197b27599e> /opt/homebrew/*/libavcodec.58.134.100.dylib
0x105614000 - 0x105a8bfff libplacebo.178.dylib (*) <96d89eb8-921d-3197-a841-bfe52ac3b916> /Users/USER/*/libplacebo.178.dylib
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=904.0M resident=0K(0%) swapped_out_or_unallocated=904.0M(100%)
Writable regions: Total=1.7G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.7G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 512K 4
Activity Tracing 256K 1
CG backing stores 4992K 8
CG image 96K 5
ColorSync 512K 25
CoreAnimation 176K 10
CoreGraphics 32K 2
CoreUI image data 1120K 8
Foundation 16K 1
Kernel Alloc Once 32K 1
MALLOC 325.3M 59
MALLOC guard page 192K 11
MALLOC_MEDIUM (reserved) 952.0M 8 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.3M 22
Stack 19.1M 22
VM_ALLOCATE 272K 17
__AUTH 1938K 191
__AUTH_CONST 11.7M 351
__DATA 20.7M 394
__DATA_CONST 17.9M 414
__DATA_DIRTY 740K 122
__FONT_DATA 4K 1
__LINKEDIT 586.1M 65
__OBJC_CONST 1630K 159
__OBJC_RO 81.8M 1
__OBJC_RW 3088K 1
__TEXT 317.9M 430
__UNICODE 588K 1
dyld private memory 1024K 1
mapped file 156.2M 23
shared memory 912K 16
=========== ======= =======
TOTAL 2.9G 2375
TOTAL, minus reserved VM space 1.6G 2375
-----------
Full Report
-----------
{"app_name":"plplay","timestamp":"2021-11-19 10:10:19.00 +0800","app_version":"","slice_uuid":"5d3a0951-e3c4-36da-a59a-efc79abdfd73","build_version":"","platform":1,"share_with_app_devs":1,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.0.1 (21A559)","incident_id":"33571890-0744-4461-8B74-5382537F5297","name":"plplay"}
{
"uptime" : 2000,
"procLaunch" : "2021-11-19 10:10:10.3028 +0800",
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro18,1",
"procStartAbsTime" : 47908649743,
"coalitionID" : 753,
"osVersion" : {
"train" : "macOS 12.0.1",
"build" : "21A559",
"releaseType" : "User"
},
"captureTime" : "2021-11-19 10:10:16.4193 +0800",
"incident" : "33571890-0744-4461-8B74-5382537F5297",
"bug_type" : "309",
"pid" : 6865,
"procExitAbsTime" : 48054282749,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "plplay",
"procPath" : "\/Users\/USER\/*\/plplay",
"parentProc" : "fish",
"parentPid" : 700,
"coalitionName" : "com.googlecode.iterm2",
"crashReporterKey" : "6B003244-78E0-07F2-4173-072C2FD1A758",
"responsiblePid" : 696,
"responsibleProc" : "iTerm2",
"sip" : "enabled",
"vmRegionInfo" : "0x554feafa0440 is not in any region. Bytes after previous region: 93320696693825 Bytes before following region: 11751383235520\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n commpage (reserved) 1000000000-7000000000 [384.0G] ---\/--- SM=NUL ...(unallocated)\n---> GAP OF 0x5f9000000000 BYTES\n MALLOC_NANO 600000000000-600008000000 [128.0M] rw-\/rwx SM=PRV ",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000001, 0x0000554feafa0440","rawCodes":[1,93801733030976],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000554feafa0440"},
"termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":6865},
"vmregioninfo" : "0x554feafa0440 is not in any region. Bytes after previous region: 93320696693825 Bytes before following region: 11751383235520\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n commpage (reserved) 1000000000-7000000000 [384.0G] ---\/--- SM=NUL ...(unallocated)\n---> GAP OF 0x5f9000000000 BYTES\n MALLOC_NANO 600000000000-600008000000 [128.0M] rw-\/rwx SM=PRV ",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 0,
"threads" : [{"triggered":true,"id":40170,"threadState":{"x":[{"value":105553156178976},{"value":105553154543552},{"value":0},{"value":7171170876,"symbolLocation":0,"symbol":"nanov2_free_definite_size"},{"value":0},{"value":0},{"value":0},{"value":105553154554304},{"value":93801733030944},{"value":93801733030944},{"value":5402335112},{"value":1},{"value":253},{"value":2163708829},{"value":2165807104},{"value":1546240},{"value":7171663680,"symbolLocation":0,"symbol":"objc_release"},{"value":8687194352},{"value":5235718464},{"value":5402333184},{"value":5402334200},{"value":105553156178976},{"value":2711724449},{"value":4377921120,"symbolLocation":224,"symbol":"_main_thread"},{"value":11791448172606497699},{"value":1},{"value":9},{"value":105553136761472},{"value":8417453094,"objc-selector":"nextEventMatchingMask:untilDate:inMode:dequeue:"}],"flavor":"ARM_THREAD_STATE64","lr":{"value":7171683452},"cpsr":{"value":536870912},"fp":{"value":6091582560},"sp":{"value":6091582496},"esr":{"value":2449473541,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":7171663696,"matchesCrashFrame":1},"far":{"value":93801733030976}},"queue":"com.apple.main-thread","frames":[{"imageOffset":34640,"symbol":"objc_release","symbolLocation":16,"imageIndex":0},{"imageOffset":54396,"symbol":"AutoreleasePoolPage::releaseUntil(objc_object**)","symbolLocation":200,"imageIndex":0},{"imageOffset":40472,"symbol":"objc_autoreleasePoolPop","symbolLocation":208,"imageIndex":0},{"imageOffset":270168,"symbol":"_CFAutoreleasePoolPop","symbolLocation":32,"imageIndex":1},{"imageOffset":222044,"symbol":"-[NSAutoreleasePool drain]","symbolLocation":140,"imageIndex":2},{"imageOffset":3931604,"symbol":"-[NSWindow(NSWindowResizing) _resizeWithEvent:]","symbolLocation":2004,"imageIndex":3},{"imageOffset":2830844,"symbol":"-[NSTitledFrame attemptResizeWithEvent:]","symbolLocation":204,"imageIndex":3},{"imageOffset":2830140,"symbol":"-[NSThemeFrame handleMouseDown:]","symbolLocation":288,"imageIndex":3},{"imageOffset":3402344,"symbol":"-[NSThemeFrame mouseDown:]","symbolLocation":40,"imageIndex":3},{"imageOffset":2357208,"symbol":"-[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:]","symbolLocation":4524,"imageIndex":3},{"imageOffset":1780856,"symbol":"-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]","symbolLocation":2444,"imageIndex":3},{"imageOffset":1777792,"symbol":"-[NSWindow(NSEventRouting) sendEvent:]","symbolLocation":348,"imageIndex":3},{"imageOffset":1773540,"symbol":"-[NSApplication(NSEvent) sendEvent:]","symbolLocation":2776,"imageIndex":3},{"imageOffset":65732,"symbol":"_glfwPlatformPollEvents","symbolLocation":176,"imageIndex":4},{"imageOffset":47936,"sourceLine":373,"sourceFile":"window_glfw.c","symbol":"glfw_poll","imageIndex":5,"symbolLocation":48},{"imageOffset":46040,"sourceLine":52,"sourceFile":"window.c","symbol":"window_poll","imageIndex":5,"symbolLocation":56},{"imageOffset":22596,"sourceLine":453,"sourceFile":"plplay.c","symbol":"render_loop","imageIndex":5,"symbolLocation":880},{"imageOffset":18416,"sourceLine":612,"sourceFile":"plplay.c","symbol":"main","imageIndex":5,"symbolLocation":1664},{"imageOffset":20724,"symbol":"start","symbolLocation":520,"imageIndex":6}]},{"id":40180,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40181,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40195,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40203,"name":"com.apple.NSEventThread","frames":[{"imageOffset":6484,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":8},{"imageOffset":7424,"symbol":"mach_msg","symbolLocation":76,"imageIndex":8},{"imageOffset":544312,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":372,"imageIndex":1},{"imageOffset":537328,"symbol":"__CFRunLoopRun","symbolLocation":1212,"imageIndex":1},{"imageOffset":534164,"symbol":"CFRunLoopRunSpecific","symbolLocation":600,"imageIndex":1},{"imageOffset":1764388,"symbol":"_NSEventThread","symbolLocation":196,"imageIndex":3},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":7},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40211,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40212,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40213,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40214,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40215,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40216,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40217,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40218,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40219,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40220,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":3946980,"imageIndex":9},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40221,"frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":8},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":7},{"imageOffset":332376,"sourceLine":91,"sourceFile":"pl_thread_pthread.h","symbol":"pl_cond_timedwait","imageIndex":10,"symbolLocation":48},{"imageOffset":332040,"sourceLine":311,"sourceFile":"frame_queue.c","symbol":"pl_queue_push_block","imageIndex":10,"symbolLocation":136},{"imageOffset":21496,"sourceLine":280,"sourceFile":"plplay.c","symbol":"decode_loop","imageIndex":5,"symbolLocation":628},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":7},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":7}]},{"id":40249,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40250,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40271,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40272,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40273,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]},{"id":40274,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":7}]}],
"usedImages" : [
{
"source" : "P",
"arch" : "arm64e",
"base" : 7171629056,
"size" : 245760,
"uuid" : "2eabed7f-1e81-3a1b-bb4b-985b8dd3b77f",
"path" : "\/usr\/lib\/libobjc.A.dylib",
"name" : "libobjc.A.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7173472256,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.CoreFoundation",
"size" : 5521408,
"uuid" : "b2ff96d0-ae99-31ef-9014-fc9964b4f3e0",
"path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
"name" : "CoreFoundation",
"CFBundleVersion" : "1855.105"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7189164032,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.Foundation",
"size" : 4120576,
"uuid" : "de039f1b-ffe5-3644-a8cf-7ba52c32cd73",
"path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
"name" : "Foundation",
"CFBundleVersion" : "1855.105"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7219175424,
"CFBundleShortVersionString" : "6.9",
"CFBundleIdentifier" : "com.apple.AppKit",
"size" : 15409152,
"uuid" : "518f4e68-c324-320f-9d7f-85c224eae972",
"path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
"name" : "AppKit",
"CFBundleVersion" : "2113"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4376690688,
"size" : 147456,
"uuid" : "d5637568-69ea-3ee7-b452-5ad48c720ed6",
"path" : "\/opt\/homebrew\/*\/libglfw.3.3.dylib",
"name" : "libglfw.3.3.dylib"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4374740992,
"size" : 344064,
"uuid" : "5d3a0951-e3c4-36da-a59a-efc79abdfd73",
"path" : "\/Users\/USER\/*\/plplay",
"name" : "plplay"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 4377460736,
"size" : 393216,
"uuid" : "86a8ba48-8bb4-3b30-9cda-051f73c74f44",
"path" : "\/usr\/lib\/dyld",
"name" : "dyld"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7173152768,
"size" : 53248,
"uuid" : "4786e19a-9312-38e6-80ef-9c1394548118",
"path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
"name" : "libsystem_pthread.dylib"
},
{
"source" : "P",
"arch" : "arm64e",
"base" : 7172931584,
"size" : 221184,
"uuid" : "c8524c02-b14f-30bd-a228-c44b4a448e68",
"path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
"name" : "libsystem_kernel.dylib"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4402151424,
"size" : 9125888,
"uuid" : "5beef38a-0514-3bc5-b009-76197b27599e",
"path" : "\/opt\/homebrew\/*\/libavcodec.58.134.100.dylib",
"name" : "libavcodec.58.134.100.dylib"
},
{
"source" : "P",
"arch" : "arm64",
"base" : 4385226752,
"size" : 4685824,
"uuid" : "96d89eb8-921d-3197-a841-bfe52ac3b916",
"path" : "\/Users\/USER\/*\/libplacebo.178.dylib",
"name" : "libplacebo.178.dylib"
},
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
}
],
"sharedCache" : {
"base" : 7169982464,
"size" : 3072180224,
"uuid" : "a6162d66-93e3-3251-93cc-b11f7c8c830e"
},
"vmSummary" : "ReadOnly portion of Libraries: Total=904.0M resident=0K(0%) swapped_out_or_unallocated=904.0M(100%)\nWritable regions: Total=1.7G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.7G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 512K 4 \nActivity Tracing 256K 1 \nCG backing stores 4992K 8 \nCG image 96K 5 \nColorSync 512K 25 \nCoreAnimation 176K 10 \nCoreGraphics 32K 2 \nCoreUI image data 1120K 8 \nFoundation 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 325.3M 59 \nMALLOC guard page 192K 11 \nMALLOC_MEDIUM (reserved) 952.0M 8 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.3M 22 \nStack 19.1M 22 \nVM_ALLOCATE 272K 17 \n__AUTH 1938K 191 \n__AUTH_CONST 11.7M 351 \n__DATA 20.7M 394 \n__DATA_CONST 17.9M 414 \n__DATA_DIRTY 740K 122 \n__FONT_DATA 4K 1 \n__LINKEDIT 586.1M 65 \n__OBJC_CONST 1630K 159 \n__OBJC_RO 81.8M 1 \n__OBJC_RW 3088K 1 \n__TEXT 317.9M 430 \n__UNICODE 588K 1 \ndyld private memory 1024K 1 \nmapped file 156.2M 23 \nshared memory 912K 16 \n=========== ======= ======= \nTOTAL 2.9G 2375 \nTOTAL, minus reserved VM space 1.6G 2375 \n",
"legacyInfo" : {
"threadTriggered" : {
"queue" : "com.apple.main-thread"
}
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "60da5e84ab0ca017dace9abf",
"factorPackIds" : {
},
"deploymentId" : 240000008
},
{
"rolloutId" : "607844aa04477260f58a8077",
"factorPackIds" : {
"SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
},
"deploymentId" : 240000066
},
{
"rolloutId" : "5ffde50ce2aacd000d47a95f",
"factorPackIds" : {
},
"deploymentId" : 240000076
},
{
"rolloutId" : "602ad4dac86151000cf27e46",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "6181ebb28763315b9604755e"
},
"deploymentId" : 240000271
},
{
"rolloutId" : "5fc94383418129005b4e9ae0",
"factorPackIds" : {
},
"deploymentId" : 240000162
},
{
"rolloutId" : "601d9415f79519000ccd4b69",
"factorPackIds" : {
"SIRI_TEXT_TO_SPEECH" : "6194416dea7ed64a7812a429"
},
"deploymentId" : 240000322
}
],
"experiments" : [
]
}
}
Model: MacBookPro18,1, BootROM 7429.41.5, proc 10:8:2 processors, 16 GB, SMC
Graphics: Apple M1 Pro, Apple M1 Pro, Built-In
Display: Color LCD, 3456 x 2234 Retina, Main, MirrorOff, Online
Display: DELL P2421D, 2560 x 1440 (QHD/WQHD - Wide Quad High Definition), MirrorOff, Online
Memory Module: LPDDR5
AirPort: Wi-Fi, wl0: Sep 24 2021 15:49:44 version 20.10.853.23.8.7.106 FWID 01-78e271b2
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB3.0 Hub
USB Device: USB2.0 Hub
USB Device: Gaming Keyboard G610
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
It didn't crash with sdl2 mode. I don't know if it was a glfw issue or plplay issue. It's constantly reproducible
Nope. Something like an
apitrace
log would probably be more useful here. Or you can try sprinkling thatgl_check_err
call throughout that function, e.g.:if (!gl_check_err(gpu, "pl_gpu_create_gl: 1")) goto error;
Replacing
1
by a bunch of different numbers. That should help narrow down which exact GL call triggers the error.
Seems that this line is problematic
It works fine on my end.
The Meson build system
Version: 0.60.1
Source dir: /Users/R-DO/Developer/libplacebo
Build dir: /Users/R-DO/Developer/libplacebo/build
Build type: native build
Project name: libplacebo
Project version: 4.178.0
C compiler for the host machine: cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.3)")
C linker for the host machine: cc ld64 711
C++ compiler for the host machine: c++ (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.3)")
C++ linker for the host machine: c++ ld64 711
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program git found: YES (/usr/bin/git)
Compiler for C supports arguments -Wincompatible-pointer-types: YES
Compiler for C supports link arguments -Wl,--exclude-libs=ALL: NO
Program python3 found: YES (/usr/local/opt/python@3.10/bin/python3.10)
Library m found: YES
Run-time dependency threads found: YES
Header <pthread.h> has symbol "pthread_condattr_setclock" with dependency threads: NO
Found pkg-config: /usr/local/bin/pkg-config (0.29.2)
Run-time dependency vulkan found: YES
Found CMake: /usr/local/bin/cmake (3.21.4)
Run-time dependency epoxy found: NO (tried pkgconfig, framework and cmake)
Run-time dependency shaderc found: YES 2021.3.1
Run-time dependency spirv-cross-c-shared found: YES 0.48.0
Library version found: NO
Check usable header "d3d11_4.h" : NO
Run-time dependency libunwind found: NO (tried pkgconfig, framework and cmake)
Message: Skipping `glslang` because `shaderc` is available
Run-time dependency lcms2 found: YES 2.12
Configuring config.h using configuration
Configuring config_internal.h using configuration
Run-time dependency glfw3 found: NO (tried pkgconfig, framework and cmake)
Run-time dependency sdl2 found: YES 2.0.16
Run-time dependency sdl2_image found: YES 2.0.5
Dependency threads found: YES unknown (cached)
Run-time dependency libavcodec found: YES 58.134.100
Run-time dependency libavformat found: YES 58.76.100
Run-time dependency libavutil found: YES 56.70.100
Has header "nuklear.h" : YES
Configuring config_demos.h using configuration
Build targets in project: 8
libplacebo 4.178.0
User defined options
backend : ninja
vulkan-registry: /Users/R-DO/VulkanSDK/1.2.189.0/macOS/share/vulkan/registry/vk.xml
Found ninja-1.10.2 at /usr/local/bin/ninja
But sometimes it shows me this error:
It didn't crash with sdl2 mode. I don't know if it was a glfw issue or plplay issue. It's constantly reproducible
Looks like a GLFW issue. Our usage of the GLFW API is not exactly complex. Simply calling glfwPollEvents
should not segfault.
Seems that this line is problematic
Thanks, will fix.
Thanks, will fix.
Pushed a fix for it. Wonder how far OpenGL gets for you now?
But sometimes it shows me this error:
Should be fixed as well.
But sometimes it shows me this error:
Should be fixed as well.
Not getting any error now. Thanks.
Thanks, will fix.
Pushed a fix for it. Wonder how far OpenGL gets for you now?
$ build/demos/plplay -v ~/HDR.webm
Opening file: '/Users/carter/HDR.webm'
Format: matroska,webm
Duration: 45.433 s
Found video track (stream 0)
Resolution: 1920 x 1080
FPS: 60.000000
Bitrate: 0 kbps
Format: yuv420p10le
Initialized libplacebo v4.157.0-153-g89b11e2 (API v178)
Attempting to initialize API: SDL2 (opengl)
Detected OpenGL version strings:
GL_VERSION: 2.1 Metal - 76.1
GL_VENDOR: Apple
GL_RENDERER: Apple M1 Pro
GL_EXTENSIONS: GL_ARB_color_buffer_float GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_instanced_arrays GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_provoking_vertex GL_ARB_seamless_cube_map GL_ARB_shader_objects GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_sync GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_transpose_matrix GL_ARB_vertex_array_bgra GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_draw_buffers2 GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture_array GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod_bias GL_EXT_texture_rectangle GL_EXT_texture_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_EXT_transform_feedback GL_EXT_vertex_array_bgra GL_APPLE_aux_depth_stencil GL_APPLE_client_storage GL_APPLE_element_array GL_APPLE_fence GL_APPLE_float_pixels GL_APPLE_flush_buffer_range GL_APPLE_flush_render GL_APPLE_packed_pixels GL_APPLE_pixel_buffer GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_specular_vector GL_APPLE_texture_range GL_APPLE_transform_hint GL_APPLE_vertex_array_object GL_APPLE_vertex_point_size GL_APPLE_vertex_program_evaluators GL_APPLE_ycbcr_422 GL_ATI_separate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_IBM_rasterpos_clip GL_NV_blend_square GL_NV_conditional_render GL_NV_depth_clamp GL_NV_fog_distance GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod
OpenGL debugging requested, but GL_KHR_debug is not available... ignoring!
GL_SHADING_LANGUAGE_VERSION: 1.20
GPU information:
GLSL version: 120
subgroup_size: 0
min_gather_offset: 0
max_gather_offset: 0
Limits:
thread_safe: 1
callbacks: 1
max_buf_size: 18446744073709551615
max_ubo_size: 0
max_ssbo_size: 0
max_vbo_size: 18446744073709551615
max_mapped_size: 0
max_buffer_texels: 0
align_host_ptr: 0
max_tex_1d_dim: 16384
max_tex_2d_dim: 16384
max_tex_3d_dim: 2048
blittable_1d_3d: 0
buf_transfer: 1
align_tex_xfer_pitch: 4
align_tex_xfer_offset: 32
max_variables: 64
max_constants: 0
max_pushc_size: 0
align_vertex_stride: 1
fragment_queues: 1
compute_queues: 1
GPU texture formats:
NAME TYPE SIZE COMP CAPS EMU DEPTH HOST_BITS GLSL_TYPE GLSL_FMT FOURCC
r8 UNORM 1 R S-LRbBV--H-- n {8 0 0 0 } {8 0 0 0 } float r8 R8
rg8 UNORM 2 RG S-LRbBV--H-- n {8 8 0 0 } {8 8 0 0 } vec2 rg8 GR88
rgba8 UNORM 4 RGBA S-LRbBV--H-- n {8 8 8 8 } {8 8 8 8 } vec4 rgba8 AB24
bgra8 UNORM 4 BGRA S-LRbBV--H-- n {8 8 8 8 } {8 8 8 8 } vec4 rgba8 AR24
r16 UNORM 2 R S-LRbBV--H-- n {16 0 0 0 } {16 0 0 0 } float r16 R16
rg16 UNORM 4 RG S-LRbBV--H-- n {16 16 0 0 } {16 16 0 0 } vec2 rg16 GR32
rgba16 UNORM 8 RGBA S-LRbBV--H-- n {16 16 16 16} {16 16 16 16} vec4 rgba16
rgb8 UNORM 3 RGB S-LRbBV--H-- y {8 8 8 0 } {8 8 8 0 } vec3 BG24
rgb16 UNORM 6 RGB S-LRbBV--H-- y {16 16 16 0 } {16 16 16 0 } vec3
r32f FLOAT 4 R S-LRbBV--H-- y {32 0 0 0 } {32 0 0 0 } float r32f
rg32f FLOAT 8 RG S-LRbBV--H-- y {32 32 0 0 } {32 32 0 0 } vec2 rg32f
rgb32f FLOAT 12 RGB S-LRbBV--H-- y {32 32 32 0 } {32 32 32 0 } vec3
rgba32f FLOAT 16 RGBA S-LRbBV--H-- y {32 32 32 32} {32 32 32 32} vec4 rgba32f
r16f FLOAT 4 R S-LRbB---H-- y {16 0 0 0 } {32 0 0 0 } float r16f
rg16f FLOAT 8 RG S-LRbB---H-- y {16 16 0 0 } {32 32 0 0 } vec2 rg16f
rgb16f FLOAT 12 RGB S-LRbB---H-- y {16 16 16 0 } {32 32 32 0 } vec3
rgba16f FLOAT 16 RGBA S-LRbB---H-- y {16 16 16 16} {32 32 32 32} vec4 rgba16f
Codec: vp9 (Google VP9)
Found no storable FBO format; compute shaders disabled
(Re)creating 1920x1080x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 1920x1080x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format rg16
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_0;
[ 3] uniform sampler2D _src_tex_0_1;
[ 4] uniform float _const_2_0;
[ 5] uniform float _const_2_1;
[ 6] attribute vec2 _tex_coord_1_0_v;
[ 7] varying vec2 _tex_coord_1_0;
[ 8] attribute vec2 _tex_coord_1_1_v;
[ 9] varying vec2 _tex_coord_1_1;
[ 10] attribute vec2 _position_4_0_v;
[ 11] void main() {
[ 12] _tex_coord_1_0 = _tex_coord_1_0_v;
[ 13] _tex_coord_1_1 = _tex_coord_1_1_v;
[ 14] vec2 va_pos = _position_4_0_v;
[ 15] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 16] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_0;
[ 3] uniform sampler2D _src_tex_0_1;
[ 4] uniform float _const_2_0;
[ 5] uniform float _const_2_1;
[ 6] varying vec2 _tex_coord_1_0;
[ 7] varying vec2 _tex_coord_1_1;
[ 8]
[ 9] vec4 _sub_3_0() {
[ 10] // pl_shader_sample_direct
[ 11] vec4 color = vec4(_const_2_1) * texture2D(_src_tex_0_1, _tex_coord_1_1);
[ 12] return color;
[ 13] }
[ 14]
[ 15] vec4 _main_5_0() {
[ 16] vec4 tmp;
[ 17] // pl_shader_sample_direct
[ 18] vec4 color = vec4(_const_2_0) * texture2D(_src_tex_0_0, _tex_coord_1_0);
[ 19] tmp = _sub_3_0();
[ 20] color[1] = tmp[0];
[ 21] return color;
[ 22] }
[ 23]
[ 24] void main() {
[ 25] gl_FragColor = _main_5_0();
[ 26] }
shader compile log (status=1):
shader link log (status=1):
Spent 4.385 ms compiling shader
LUT cache invalidated, regenerating..
(Re)creating 960x1080x0 texture with format rg32f
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_0;
[ 3] uniform sampler2D _weights_5_0;
[ 4] uniform vec2 _tex_size_2_0;
[ 5] uniform vec2 _tex_pt_3_0;
[ 6] uniform float _const_7_0;
[ 7] uniform float _const_8_0;
[ 8] uniform float _const_10_0;
[ 9] uniform float _const_11_0;
[ 10] uniform float _const_12_0;
[ 11] attribute vec2 _tex_coord_1_0_v;
[ 12] varying vec2 _tex_coord_1_0;
[ 13] attribute vec2 _position_13_0_v;
[ 14] void main() {
[ 15] _tex_coord_1_0 = _tex_coord_1_0_v;
[ 16] vec2 va_pos = _position_13_0_v;
[ 17] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 18] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_0;
[ 3] uniform sampler2D _weights_5_0;
[ 4] uniform vec2 _tex_size_2_0;
[ 5] uniform vec2 _tex_pt_3_0;
[ 6] uniform float _const_7_0;
[ 7] uniform float _const_8_0;
[ 8] uniform float _const_10_0;
[ 9] uniform float _const_11_0;
[ 10] uniform float _const_12_0;
[ 11] varying vec2 _tex_coord_1_0;
[ 12]
[ 13] #define _LUT_POS_6_0(x) mix(_const_7_0, _const_8_0, (x))
[ 14] #define _LUT_POS_9_0(x) mix(_const_10_0, _const_11_0, (x))
[ 15] #define _lut_4_0(pos) (texture2D(_weights_5_0, vec2(\
[ 16] _LUT_POS_6_0(vec2(pos).x)\
[ 17] ,_LUT_POS_9_0(vec2(pos).y)\
[ 18] )).xyzw)
[ 19] vec4 _main_14_0() {
[ 20] // pl_shader_sample_ortho
[ 21] vec4 color = vec4(0.0);
[ 22] {
[ 23] vec2 pos = _tex_coord_1_0, size = _tex_size_2_0, pt = _tex_pt_3_0;
[ 24] vec2 dir = vec2(0.0, 1.0);
[ 25] pt *= dir;
[ 26] vec2 fcoord2 = fract(pos * size - vec2(0.5));
[ 27] float fcoord = dot(fcoord2, dir);
[ 28] vec2 base = pos - fcoord * pt - pt * vec2(2.0);
[ 29] float weight;
[ 30] vec4 ws, c;
[ 31] // scaler samples
[ 32] ws = _lut_4_0(vec2(0.00000000000000000000, fcoord));
[ 33] weight = ws[0];
[ 34] c = texture2D(_src_tex_0_0, base + pt * vec2(0.0));
[ 35] color[0] += weight * c[0];
[ 36] color[1] += weight * c[1];
[ 37] weight = ws[1];
[ 38] c = texture2D(_src_tex_0_0, base + pt * vec2(1.0));
[ 39] color[0] += weight * c[0];
[ 40] color[1] += weight * c[1];
[ 41] weight = ws[2];
[ 42] c = texture2D(_src_tex_0_0, base + pt * vec2(2.0));
[ 43] color[0] += weight * c[0];
[ 44] color[1] += weight * c[1];
[ 45] weight = ws[3];
[ 46] c = texture2D(_src_tex_0_0, base + pt * vec2(3.0));
[ 47] color[0] += weight * c[0];
[ 48] color[1] += weight * c[1];
[ 49] ws = _lut_4_0(vec2(1.00000000000000000000, fcoord));
[ 50] weight = ws[0];
[ 51] c = texture2D(_src_tex_0_0, base + pt * vec2(4.0));
[ 52] color[0] += weight * c[0];
[ 53] color[1] += weight * c[1];
[ 54] weight = ws[1];
[ 55] c = texture2D(_src_tex_0_0, base + pt * vec2(5.0));
[ 56] color[0] += weight * c[0];
[ 57] color[1] += weight * c[1];
[ 58] color *= vec4(_const_12_0);
[ 59] color.a = 1.0;
[ 60] }
[ 61] return color;
[ 62] }
[ 63]
[ 64] void main() {
[ 65] gl_FragColor = _main_14_0();
[ 66] }
shader compile log (status=1):
shader link log (status=1):
Spent 1.233 ms compiling shader
LUT cache invalidated, regenerating..
LUT cache invalidated, regenerating..
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_3;
[ 3] uniform sampler2D _src_tex_0_4;
[ 4] uniform sampler2D _weights_5_4;
[ 5] uniform sampler2D _weights_29_2;
[ 6] uniform float _const_2_3;
[ 7] uniform vec2 _tex_size_2_4;
[ 8] uniform vec2 _tex_pt_3_4;
[ 9] uniform float _const_7_4;
[ 10] uniform float _const_8_4;
[ 11] uniform float _const_10_4;
[ 12] uniform float _const_11_4;
[ 13] uniform float _const_12_4;
[ 14] uniform mat3 _cmat_2_2;
[ 15] uniform vec3 _cmat_c_3_2;
[ 16] uniform float _const_4_2;
[ 17] uniform float _const_5_2;
[ 18] uniform float _dst_range_6_2;
[ 19] uniform float _src_floor_7_2;
[ 20] uniform float _dst_peak_8_2;
[ 21] uniform float _dst_floor_9_2;
[ 22] uniform float _const_10_2;
[ 23] uniform float _dst_avg_11_2;
[ 24] uniform float _const_12_2;
[ 25] uniform float _const_13_2;
[ 26] uniform float _const_14_2;
[ 27] uniform float _const_15_2;
[ 28] uniform float _const_16_2;
[ 29] uniform float _const_17_2;
[ 30] uniform float _const_18_2;
[ 31] uniform mat3 _cms_matrix_19_2;
[ 32] uniform float _const_20_2;
[ 33] uniform float _const_21_2;
[ 34] uniform float _const_23_2;
[ 35] uniform float _const_24_2;
[ 36] uniform float _const_25_2;
[ 37] uniform float _const_26_2;
[ 38] uniform float _const_27_2;
[ 39] uniform float _const_31_2;
[ 40] uniform float _const_32_2;
[ 41] uniform float _const_34_2;
[ 42] uniform float _const_35_2;
[ 43] uniform float _const_36_2;
[ 44] uniform float _const_37_2;
[ 45] uniform float _const_38_2;
[ 46] attribute vec2 _tex_coord_1_3_v;
[ 47] varying vec2 _tex_coord_1_3;
[ 48] attribute vec2 _tex_coord_1_4_v;
[ 49] varying vec2 _tex_coord_1_4;
[ 50] attribute vec2 _position_40_2_v;
[ 51] void main() {
[ 52] _tex_coord_1_3 = _tex_coord_1_3_v;
[ 53] _tex_coord_1_4 = _tex_coord_1_4_v;
[ 54] vec2 va_pos = _position_40_2_v;
[ 55] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 56] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_3;
[ 3] uniform sampler2D _src_tex_0_4;
[ 4] uniform sampler2D _weights_5_4;
[ 5] uniform sampler2D _weights_29_2;
[ 6] uniform float _const_2_3;
[ 7] uniform vec2 _tex_size_2_4;
[ 8] uniform vec2 _tex_pt_3_4;
[ 9] uniform float _const_7_4;
[ 10] uniform float _const_8_4;
[ 11] uniform float _const_10_4;
[ 12] uniform float _const_11_4;
[ 13] uniform float _const_12_4;
[ 14] uniform mat3 _cmat_2_2;
[ 15] uniform vec3 _cmat_c_3_2;
[ 16] uniform float _const_4_2;
[ 17] uniform float _const_5_2;
[ 18] uniform float _dst_range_6_2;
[ 19] uniform float _src_floor_7_2;
[ 20] uniform float _dst_peak_8_2;
[ 21] uniform float _dst_floor_9_2;
[ 22] uniform float _const_10_2;
[ 23] uniform float _dst_avg_11_2;
[ 24] uniform float _const_12_2;
[ 25] uniform float _const_13_2;
[ 26] uniform float _const_14_2;
[ 27] uniform float _const_15_2;
[ 28] uniform float _const_16_2;
[ 29] uniform float _const_17_2;
[ 30] uniform float _const_18_2;
[ 31] uniform mat3 _cms_matrix_19_2;
[ 32] uniform float _const_20_2;
[ 33] uniform float _const_21_2;
[ 34] uniform float _const_23_2;
[ 35] uniform float _const_24_2;
[ 36] uniform float _const_25_2;
[ 37] uniform float _const_26_2;
[ 38] uniform float _const_27_2;
[ 39] uniform float _const_31_2;
[ 40] uniform float _const_32_2;
[ 41] uniform float _const_34_2;
[ 42] uniform float _const_35_2;
[ 43] uniform float _const_36_2;
[ 44] uniform float _const_37_2;
[ 45] uniform float _const_38_2;
[ 46] varying vec2 _tex_coord_1_3;
[ 47] varying vec2 _tex_coord_1_4;
[ 48]
[ 49] vec4 _sub_0_2() {
[ 50] // pl_shader_sample_direct
[ 51] vec4 color = vec4(_const_2_3) * texture2D(_src_tex_0_3, _tex_coord_1_3);
[ 52] return color;
[ 53] }
[ 54]
[ 55] #define _LUT_POS_6_4(x) mix(_const_7_4, _const_8_4, (x))
[ 56] #define _LUT_POS_9_4(x) mix(_const_10_4, _const_11_4, (x))
[ 57] #define _lut_4_4(pos) (texture2D(_weights_5_4, vec2(\
[ 58] _LUT_POS_6_4(vec2(pos).x)\
[ 59] ,_LUT_POS_9_4(vec2(pos).y)\
[ 60] )).xyzw)
[ 61] vec4 _sub_1_2() {
[ 62] // pl_shader_sample_ortho
[ 63] vec4 color = vec4(0.0);
[ 64] {
[ 65] vec2 pos = _tex_coord_1_4, size = _tex_size_2_4, pt = _tex_pt_3_4;
[ 66] vec2 dir = vec2(1.0, 0.0);
[ 67] pt *= dir;
[ 68] vec2 fcoord2 = fract(pos * size - vec2(0.5));
[ 69] float fcoord = dot(fcoord2, dir);
[ 70] vec2 base = pos - fcoord * pt - pt * vec2(2.0);
[ 71] float weight;
[ 72] vec4 ws, c;
[ 73] // scaler samples
[ 74] ws = _lut_4_4(vec2(0.00000000000000000000, fcoord));
[ 75] weight = ws[0];
[ 76] c = texture2D(_src_tex_0_4, base + pt * vec2(0.0));
[ 77] color[0] += weight * c[0];
[ 78] color[1] += weight * c[1];
[ 79] weight = ws[1];
[ 80] c = texture2D(_src_tex_0_4, base + pt * vec2(1.0));
[ 81] color[0] += weight * c[0];
[ 82] color[1] += weight * c[1];
[ 83] weight = ws[2];
[ 84] c = texture2D(_src_tex_0_4, base + pt * vec2(2.0));
[ 85] color[0] += weight * c[0];
[ 86] color[1] += weight * c[1];
[ 87] weight = ws[3];
[ 88] c = texture2D(_src_tex_0_4, base + pt * vec2(3.0));
[ 89] color[0] += weight * c[0];
[ 90] color[1] += weight * c[1];
[ 91] ws = _lut_4_4(vec2(1.00000000000000000000, fcoord));
[ 92] weight = ws[0];
[ 93] c = texture2D(_src_tex_0_4, base + pt * vec2(4.0));
[ 94] color[0] += weight * c[0];
[ 95] color[1] += weight * c[1];
[ 96] weight = ws[1];
[ 97] c = texture2D(_src_tex_0_4, base + pt * vec2(5.0));
[ 98] color[0] += weight * c[0];
[ 99] color[1] += weight * c[1];
[100] color *= vec4(_const_12_4);
[101] color.a = 1.0;
[102] }
[103] return color;
[104] }
[105]
[106] #define _luma_coeffs_22_2 vec3(_const_23_2, _const_24_2, _const_25_2)
[107] #define _LUT_POS_30_2(x) mix(_const_31_2, _const_32_2, (x))
[108] #define _LUT_POS_33_2(x) mix(_const_34_2, _const_35_2, (x))
[109] #define _lut_28_2(pos) (texture2D(_weights_29_2, vec2(\
[110] _LUT_POS_30_2(vec2(pos).x)\
[111] ,_LUT_POS_33_2(vec2(pos).y)\
[112] )).x)
[113] vec4 _main_41_2() {
[114] vec4 color = vec4(0.0, 0.5, 0.5, 1.0);
[115] // pass_read_image
[116] {
[117] vec4 tmp;
[118] tmp = _sub_0_2();
[119] color[0] = tmp[0];
[120] tmp = _sub_1_2();
[121] color[1] = tmp[0];
[122] color[2] = tmp[1];
[123] }
[124] // pl_shader_decode_color
[125] {
[126] color.rgb = _cmat_2_2 * color.rgb + _cmat_c_3_2;
[127] }
[128] // pl_shader_color_map
[129] {
[130] // pl_shader_linearize
[131] color.rgb = max(color.rgb, 0.0);
[132] color.rgb = pow(color.rgb, vec3(1.0/78.84375000000000000000));
[133] color.rgb = max(color.rgb - vec3(0.83593750000000000000), 0.0)
[134] / (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * color.rgb);
[135] color.rgb = pow(color.rgb, vec3(1.0/0.15930175781250000000));
[136] color.rgb *= vec3(49.26108374384236298501);
[137] // pl_shader_tone_map
[138] {
[139] float sig_peak = _const_4_2;
[140] float sig_avg = _const_5_2;
[141] int sig_idx = 0;
[142] if (color[1] > color[sig_idx]) sig_idx = 1;
[143] if (color[2] > color[sig_idx]) sig_idx = 2;
[144] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
[145] vec3 sig_orig = color.rgb;
[146] float slope = min(_const_10_2, _dst_avg_11_2 / sig_avg);
[147] sig *= slope;
[148] sig_peak *= slope;
[149] vec4 sig_pq = vec4(sig.rgb, sig_peak);
[150] sig_pq *= vec4(1.0/49.26108374384236298501);
[151] sig_pq = pow(max(sig_pq, 0.0), vec4(0.15930175781250000000));
[152] sig_pq = (vec4(0.83593750000000000000) + vec4(18.85156250000000000000) * sig_pq)
[153] / (vec4(1.0) + vec4(18.68750000000000000000) * sig_pq);
[154] sig_pq = pow(sig_pq, vec4(78.84375000000000000000));
[155] float scale = 1.0 / (sig_pq.a - _const_12_2);
[156] sig = clamp(vec3(scale) * (sig_pq.rgb - vec3(_const_12_2)), 0.0, 1.0);
[157] float maxLum = _const_13_2 * scale;
[158] float ks = 1.5 * maxLum - 0.5;
[159] vec3 tb = (sig - vec3(ks)) / vec3(1.0 - ks);
[160] vec3 tb2 = tb * tb;
[161] vec3 tb3 = tb2 * tb;
[162] vec3 pb = (2.0 * tb3 - 3.0 * tb2 + vec3(1.0)) * vec3(ks) +
[163] (tb3 - 2.0 * tb2 + tb) * vec3(1.0 - ks) +
[164] (-2.0 * tb3 + 3.0 * tb2) * vec3(maxLum);
[165] sig = mix(sig, pb, vec3(greaterThan(sig, vec3(ks))));
[166] float minLum = _const_14_2 * scale;
[167] float p = 4.0;
[168] if (minLum >= 0.0)
[169] p = min(1.0 / minLum, 4.0);
[170] vec3 boost = vec3(minLum) * pow(vec3(1.0) - sig, vec3(p));
[171] vec3 sig_lift = sig + boost;
[172] if (maxLum < 1.0) {
[173] sig_lift -= vec3(minLum);
[174] sig_lift /= 1.0 + minLum / maxLum * pow(1.0 - maxLum, p);
[175] sig_lift += vec3(minLum);
[176] }
[177] sig = mix(sig, sig_lift, vec3(lessThan(sig, vec3(1.0))));
[178] sig = vec3(sig_pq.a - _const_12_2) * sig + vec3(_const_12_2);
[179] sig = pow(max(sig, 0.0), vec3(1.0/78.84375000000000000000));
[180] sig = max(sig - vec3(0.83593750000000000000), 0.0) /
[181] (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * sig);
[182] sig = pow(sig, vec3(1.0/0.15930175781250000000));
[183] sig *= vec3(49.26108374384236298501);
[184] float orig = max(sig_orig[sig_idx], 1e-10);
[185] vec3 sig_lin = sig_orig * sig[sig_idx] / orig;
[186] float coeff = max(sig[sig_idx] - _const_15_2, 1e-6) /
[187] max(sig[sig_idx], 1.0);
[188] coeff = _const_16_2 * pow(coeff / _const_17_2, _const_18_2);
[189] color.rgb = mix(sig_lin, sig, coeff);
[190] }
[191] color.rgb = _cms_matrix_19_2 * color.rgb;
[192] float cmin = min(min(color.r, color.g), color.b);
[193] if (cmin < _const_20_2) {
[194] float luma = dot(_luma_coeffs_22_2, color.rgb);
[195] float coeff = (_const_20_2 - cmin) / (luma - cmin);
[196] coeff = clamp(coeff, 0.0, 1.0);
[197] color.rgb = mix(color.rgb, vec3(luma), coeff);
[198] }
[199] float cmax = 1.0/_const_21_2 * max(max(color.r, color.g), color.b);
[200] if (cmax > 1.0)
[201] color.rgb /= cmax;
[202] // pl_shader_delinearize
[203] color.rgb = max(color.rgb, 0.0);
[204] color.rgb = pow(vec3(_const_26_2) * color.rgb, vec3(1.0/2.4)) - vec3(_const_27_2);
[205] }
[206] // pl_shader_encode_color
[207] {
[208] }
[209] // pl_shader_dither
[210] {
[211] float bias;
[212] vec2 pos = fract(gl_FragCoord.xy * 1.0/_const_36_2);
[213] bias = _lut_28_2(ivec2(pos * _const_37_2));
[214] color = vec4(255.0) * color + vec4(bias);
[215] color = floor(color) * vec4(1.0 / 255.0);
[216] }
[217] color *= vec4(1.0 / _const_38_2);
[218] vec4 _orig_color_39_2 = color;
[219] color = vec4(0.0, 0.0, 0.0, 1.0);
[220] color[0] = _orig_color_39_2[0];
[221] color[1] = _orig_color_39_2[1];
[222] color[2] = _orig_color_39_2[2];
[223] color[3] = _orig_color_39_2[3];
[224] return color;
[225] }
[226]
[227] void main() {
[228] gl_FragColor = _main_41_2();
[229] }
shader compile log (status=1):
shader link log (status=1):
Spent 3.443 ms compiling shader
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D ui_tex;
[ 3] uniform mat2 _proj_0_0;
[ 4] uniform vec2 _offset_1_0;
[ 5] attribute vec2 pos_v;
[ 6] attribute vec2 coord_v;
[ 7] varying vec2 coord;
[ 8] attribute vec4 vcolor_v;
[ 9] varying vec4 vcolor;
[ 10] void main() {
[ 11] vec2 va_pos = pos_v;
[ 12] va_pos = _proj_0_0 * va_pos;
[ 13] va_pos += _offset_1_0;
[ 14] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 15] coord = coord_v;
[ 16] vcolor = vcolor_v;
[ 17] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D ui_tex;
[ 3] uniform mat2 _proj_0_0;
[ 4] uniform vec2 _offset_1_0;
[ 5] varying vec2 coord;
[ 6] varying vec4 vcolor;
[ 7]
[ 8] vec4 _main_2_0() {
[ 9] // pl_shader_custom
[ 10] vec4 color = vec4(0.0);
[ 11] {
[ 12] color = texture2D(ui_tex, coord).r * vcolor;
[ 13] }
[ 14] // pl_shader_color_map
[ 15] {
[ 16] }
[ 17] // pl_shader_encode_color
[ 18] {
[ 19] }
[ 20] return color;
[ 21] }
[ 22]
[ 23] void main() {
[ 24] gl_FragColor = _main_2_0();
[ 25] }
shader compile log (status=1):
shader link log (status=1):
Spent 0.446 ms compiling shader
Dropped frame with PTS 0.033
Dropped frame with PTS 0.050
Dropped frame with PTS 0.067
Dropped frame with PTS 0.083
Dropped frame with PTS 0.100
Dropped frame with PTS 0.117
Dropped frame with PTS 0.133
Dropped frame with PTS 0.150
Dropped frame with PTS 0.167
Dropped frame with PTS 0.183
Dropped frame with PTS 0.200
Dropped frame with PTS 0.217
Dropped frame with PTS 0.233
Dropped frame with PTS 0.250
Dropped frame with PTS 0.267
Dropped frame with PTS 0.283
Dropped frame with PTS 0.300
Dropped frame with PTS 0.317
Dropped frame with PTS 0.333
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x1081x0 texture with format rg32f
(Re)creating 1920x1081x0 texture with format rgb32f
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_3;
[ 3] uniform sampler2D _src_tex_0_4;
[ 4] uniform sampler2D _weights_5_4;
[ 5] uniform float _const_2_3;
[ 6] uniform vec2 _tex_size_2_4;
[ 7] uniform vec2 _tex_pt_3_4;
[ 8] uniform float _const_7_4;
[ 9] uniform float _const_8_4;
[ 10] uniform float _const_10_4;
[ 11] uniform float _const_11_4;
[ 12] uniform float _const_12_4;
[ 13] uniform mat3 _cmat_2_2;
[ 14] uniform vec3 _cmat_c_3_2;
[ 15] attribute vec2 _tex_coord_1_3_v;
[ 16] varying vec2 _tex_coord_1_3;
[ 17] attribute vec2 _tex_coord_1_4_v;
[ 18] varying vec2 _tex_coord_1_4;
[ 19] attribute vec2 _position_4_2_v;
[ 20] void main() {
[ 21] _tex_coord_1_3 = _tex_coord_1_3_v;
[ 22] _tex_coord_1_4 = _tex_coord_1_4_v;
[ 23] vec2 va_pos = _position_4_2_v;
[ 24] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 25] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_3;
[ 3] uniform sampler2D _src_tex_0_4;
[ 4] uniform sampler2D _weights_5_4;
[ 5] uniform float _const_2_3;
[ 6] uniform vec2 _tex_size_2_4;
[ 7] uniform vec2 _tex_pt_3_4;
[ 8] uniform float _const_7_4;
[ 9] uniform float _const_8_4;
[ 10] uniform float _const_10_4;
[ 11] uniform float _const_11_4;
[ 12] uniform float _const_12_4;
[ 13] uniform mat3 _cmat_2_2;
[ 14] uniform vec3 _cmat_c_3_2;
[ 15] varying vec2 _tex_coord_1_3;
[ 16] varying vec2 _tex_coord_1_4;
[ 17]
[ 18] vec4 _sub_0_2() {
[ 19] // pl_shader_sample_direct
[ 20] vec4 color = vec4(_const_2_3) * texture2D(_src_tex_0_3, _tex_coord_1_3);
[ 21] return color;
[ 22] }
[ 23]
[ 24] #define _LUT_POS_6_4(x) mix(_const_7_4, _const_8_4, (x))
[ 25] #define _LUT_POS_9_4(x) mix(_const_10_4, _const_11_4, (x))
[ 26] #define _lut_4_4(pos) (texture2D(_weights_5_4, vec2(\
[ 27] _LUT_POS_6_4(vec2(pos).x)\
[ 28] ,_LUT_POS_9_4(vec2(pos).y)\
[ 29] )).xyzw)
[ 30] vec4 _sub_1_2() {
[ 31] // pl_shader_sample_ortho
[ 32] vec4 color = vec4(0.0);
[ 33] {
[ 34] vec2 pos = _tex_coord_1_4, size = _tex_size_2_4, pt = _tex_pt_3_4;
[ 35] vec2 dir = vec2(1.0, 0.0);
[ 36] pt *= dir;
[ 37] vec2 fcoord2 = fract(pos * size - vec2(0.5));
[ 38] float fcoord = dot(fcoord2, dir);
[ 39] vec2 base = pos - fcoord * pt - pt * vec2(2.0);
[ 40] float weight;
[ 41] vec4 ws, c;
[ 42] // scaler samples
[ 43] ws = _lut_4_4(vec2(0.00000000000000000000, fcoord));
[ 44] weight = ws[0];
[ 45] c = texture2D(_src_tex_0_4, base + pt * vec2(0.0));
[ 46] color[0] += weight * c[0];
[ 47] color[1] += weight * c[1];
[ 48] weight = ws[1];
[ 49] c = texture2D(_src_tex_0_4, base + pt * vec2(1.0));
[ 50] color[0] += weight * c[0];
[ 51] color[1] += weight * c[1];
[ 52] weight = ws[2];
[ 53] c = texture2D(_src_tex_0_4, base + pt * vec2(2.0));
[ 54] color[0] += weight * c[0];
[ 55] color[1] += weight * c[1];
[ 56] weight = ws[3];
[ 57] c = texture2D(_src_tex_0_4, base + pt * vec2(3.0));
[ 58] color[0] += weight * c[0];
[ 59] color[1] += weight * c[1];
[ 60] ws = _lut_4_4(vec2(1.00000000000000000000, fcoord));
[ 61] weight = ws[0];
[ 62] c = texture2D(_src_tex_0_4, base + pt * vec2(4.0));
[ 63] color[0] += weight * c[0];
[ 64] color[1] += weight * c[1];
[ 65] weight = ws[1];
[ 66] c = texture2D(_src_tex_0_4, base + pt * vec2(5.0));
[ 67] color[0] += weight * c[0];
[ 68] color[1] += weight * c[1];
[ 69] color *= vec4(_const_12_4);
[ 70] color.a = 1.0;
[ 71] }
[ 72] return color;
[ 73] }
[ 74]
[ 75] vec4 _main_5_2() {
[ 76] vec4 color = vec4(0.0, 0.5, 0.5, 1.0);
[ 77] // pass_read_image
[ 78] {
[ 79] vec4 tmp;
[ 80] tmp = _sub_0_2();
[ 81] color[0] = tmp[0];
[ 82] tmp = _sub_1_2();
[ 83] color[1] = tmp[0];
[ 84] color[2] = tmp[1];
[ 85] }
[ 86] // pl_shader_decode_color
[ 87] {
[ 88] color.rgb = _cmat_2_2 * color.rgb + _cmat_c_3_2;
[ 89] }
[ 90] // pl_shader_linearize
[ 91] color.rgb = max(color.rgb, 0.0);
[ 92] color.rgb = pow(color.rgb, vec3(1.0/78.84375000000000000000));
[ 93] color.rgb = max(color.rgb - vec3(0.83593750000000000000), 0.0)
[ 94] / (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * color.rgb);
[ 95] color.rgb = pow(color.rgb, vec3(1.0/0.15930175781250000000));
[ 96] color.rgb *= vec3(49.26108374384236298501);
[ 97] return color;
[ 98] }
[ 99]
[100] void main() {
[101] gl_FragColor = _main_5_2();
[102] }
shader compile log (status=1):
shader link log (status=1):
Spent 4.905 ms compiling shader
LUT cache invalidated, regenerating..
(Re)creating 1920x973x0 texture with format rgb32f
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_0;
[ 3] uniform sampler2D _weights_5_0;
[ 4] uniform vec2 _tex_size_2_0;
[ 5] uniform vec2 _tex_pt_3_0;
[ 6] uniform float _const_7_0;
[ 7] uniform float _const_8_0;
[ 8] uniform float _const_10_0;
[ 9] uniform float _const_11_0;
[ 10] uniform float _const_12_0;
[ 11] attribute vec2 _tex_coord_1_0_v;
[ 12] varying vec2 _tex_coord_1_0;
[ 13] attribute vec2 _position_13_0_v;
[ 14] void main() {
[ 15] _tex_coord_1_0 = _tex_coord_1_0_v;
[ 16] vec2 va_pos = _position_13_0_v;
[ 17] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 18] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_0;
[ 3] uniform sampler2D _weights_5_0;
[ 4] uniform vec2 _tex_size_2_0;
[ 5] uniform vec2 _tex_pt_3_0;
[ 6] uniform float _const_7_0;
[ 7] uniform float _const_8_0;
[ 8] uniform float _const_10_0;
[ 9] uniform float _const_11_0;
[ 10] uniform float _const_12_0;
[ 11] varying vec2 _tex_coord_1_0;
[ 12]
[ 13] #define _LUT_POS_6_0(x) mix(_const_7_0, _const_8_0, (x))
[ 14] #define _LUT_POS_9_0(x) mix(_const_10_0, _const_11_0, (x))
[ 15] #define _lut_4_0(pos) (texture2D(_weights_5_0, vec2(\
[ 16] _LUT_POS_6_0(vec2(pos).x)\
[ 17] ,_LUT_POS_9_0(vec2(pos).y)\
[ 18] )).xyzw)
[ 19] vec4 _main_14_0() {
[ 20] // pl_shader_sample_ortho
[ 21] vec4 color = vec4(0.0);
[ 22] {
[ 23] vec2 pos = _tex_coord_1_0, size = _tex_size_2_0, pt = _tex_pt_3_0;
[ 24] vec2 dir = vec2(0.0, 1.0);
[ 25] pt *= dir;
[ 26] vec2 fcoord2 = fract(pos * size - vec2(0.5));
[ 27] float fcoord = dot(fcoord2, dir);
[ 28] vec2 base = pos - fcoord * pt - pt * vec2(2.0);
[ 29] float weight;
[ 30] vec4 ws, c;
[ 31] // scaler samples
[ 32] ws = _lut_4_0(vec2(0.00000000000000000000, fcoord));
[ 33] weight = ws[0];
[ 34] c = texture2D(_src_tex_0_0, base + pt * vec2(0.0));
[ 35] color[0] += weight * c[0];
[ 36] color[1] += weight * c[1];
[ 37] color[2] += weight * c[2];
[ 38] weight = ws[1];
[ 39] c = texture2D(_src_tex_0_0, base + pt * vec2(1.0));
[ 40] color[0] += weight * c[0];
[ 41] color[1] += weight * c[1];
[ 42] color[2] += weight * c[2];
[ 43] weight = ws[2];
[ 44] c = texture2D(_src_tex_0_0, base + pt * vec2(2.0));
[ 45] color[0] += weight * c[0];
[ 46] color[1] += weight * c[1];
[ 47] color[2] += weight * c[2];
[ 48] weight = ws[3];
[ 49] c = texture2D(_src_tex_0_0, base + pt * vec2(3.0));
[ 50] color[0] += weight * c[0];
[ 51] color[1] += weight * c[1];
[ 52] color[2] += weight * c[2];
[ 53] ws = _lut_4_0(vec2(1.00000000000000000000, fcoord));
[ 54] weight = ws[0];
[ 55] c = texture2D(_src_tex_0_0, base + pt * vec2(4.0));
[ 56] color[0] += weight * c[0];
[ 57] color[1] += weight * c[1];
[ 58] color[2] += weight * c[2];
[ 59] weight = ws[1];
[ 60] c = texture2D(_src_tex_0_0, base + pt * vec2(5.0));
[ 61] color[0] += weight * c[0];
[ 62] color[1] += weight * c[1];
[ 63] color[2] += weight * c[2];
[ 64] color *= vec4(_const_12_0);
[ 65] color.a = 1.0;
[ 66] }
[ 67] return color;
[ 68] }
[ 69]
[ 70] void main() {
[ 71] gl_FragColor = _main_14_0();
[ 72] }
shader compile log (status=1):
shader link log (status=1):
Spent 3.120 ms compiling shader
LUT cache invalidated, regenerating..
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_5;
[ 3] uniform sampler2D _weights_5_5;
[ 4] uniform sampler2D _weights_38_5;
[ 5] uniform vec2 _tex_size_2_5;
[ 6] uniform vec2 _tex_pt_3_5;
[ 7] uniform float _const_7_5;
[ 8] uniform float _const_8_5;
[ 9] uniform float _const_10_5;
[ 10] uniform float _const_11_5;
[ 11] uniform float _const_12_5;
[ 12] uniform float _const_13_5;
[ 13] uniform float _const_14_5;
[ 14] uniform float _dst_range_15_5;
[ 15] uniform float _src_floor_16_5;
[ 16] uniform float _dst_peak_17_5;
[ 17] uniform float _dst_floor_18_5;
[ 18] uniform float _const_19_5;
[ 19] uniform float _dst_avg_20_5;
[ 20] uniform float _const_21_5;
[ 21] uniform float _const_22_5;
[ 22] uniform float _const_23_5;
[ 23] uniform float _const_24_5;
[ 24] uniform float _const_25_5;
[ 25] uniform float _const_26_5;
[ 26] uniform float _const_27_5;
[ 27] uniform mat3 _cms_matrix_28_5;
[ 28] uniform float _const_29_5;
[ 29] uniform float _const_30_5;
[ 30] uniform float _const_32_5;
[ 31] uniform float _const_33_5;
[ 32] uniform float _const_34_5;
[ 33] uniform float _const_35_5;
[ 34] uniform float _const_36_5;
[ 35] uniform float _const_40_5;
[ 36] uniform float _const_41_5;
[ 37] uniform float _const_43_5;
[ 38] uniform float _const_44_5;
[ 39] uniform float _const_45_5;
[ 40] uniform float _const_46_5;
[ 41] uniform float _const_47_5;
[ 42] attribute vec2 _tex_coord_1_5_v;
[ 43] varying vec2 _tex_coord_1_5;
[ 44] attribute vec2 _position_49_5_v;
[ 45] void main() {
[ 46] _tex_coord_1_5 = _tex_coord_1_5_v;
[ 47] vec2 va_pos = _position_49_5_v;
[ 48] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 49] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_5;
[ 3] uniform sampler2D _weights_5_5;
[ 4] uniform sampler2D _weights_38_5;
[ 5] uniform vec2 _tex_size_2_5;
[ 6] uniform vec2 _tex_pt_3_5;
[ 7] uniform float _const_7_5;
[ 8] uniform float _const_8_5;
[ 9] uniform float _const_10_5;
[ 10] uniform float _const_11_5;
[ 11] uniform float _const_12_5;
[ 12] uniform float _const_13_5;
[ 13] uniform float _const_14_5;
[ 14] uniform float _dst_range_15_5;
[ 15] uniform float _src_floor_16_5;
[ 16] uniform float _dst_peak_17_5;
[ 17] uniform float _dst_floor_18_5;
[ 18] uniform float _const_19_5;
[ 19] uniform float _dst_avg_20_5;
[ 20] uniform float _const_21_5;
[ 21] uniform float _const_22_5;
[ 22] uniform float _const_23_5;
[ 23] uniform float _const_24_5;
[ 24] uniform float _const_25_5;
[ 25] uniform float _const_26_5;
[ 26] uniform float _const_27_5;
[ 27] uniform mat3 _cms_matrix_28_5;
[ 28] uniform float _const_29_5;
[ 29] uniform float _const_30_5;
[ 30] uniform float _const_32_5;
[ 31] uniform float _const_33_5;
[ 32] uniform float _const_34_5;
[ 33] uniform float _const_35_5;
[ 34] uniform float _const_36_5;
[ 35] uniform float _const_40_5;
[ 36] uniform float _const_41_5;
[ 37] uniform float _const_43_5;
[ 38] uniform float _const_44_5;
[ 39] uniform float _const_45_5;
[ 40] uniform float _const_46_5;
[ 41] uniform float _const_47_5;
[ 42] varying vec2 _tex_coord_1_5;
[ 43]
[ 44] #define _LUT_POS_6_5(x) mix(_const_7_5, _const_8_5, (x))
[ 45] #define _LUT_POS_9_5(x) mix(_const_10_5, _const_11_5, (x))
[ 46] #define _lut_4_5(pos) (texture2D(_weights_5_5, vec2(\
[ 47] _LUT_POS_6_5(vec2(pos).x)\
[ 48] ,_LUT_POS_9_5(vec2(pos).y)\
[ 49] )).xyzw)
[ 50] #define _luma_coeffs_31_5 vec3(_const_32_5, _const_33_5, _const_34_5)
[ 51] #define _LUT_POS_39_5(x) mix(_const_40_5, _const_41_5, (x))
[ 52] #define _LUT_POS_42_5(x) mix(_const_43_5, _const_44_5, (x))
[ 53] #define _lut_37_5(pos) (texture2D(_weights_38_5, vec2(\
[ 54] _LUT_POS_39_5(vec2(pos).x)\
[ 55] ,_LUT_POS_42_5(vec2(pos).y)\
[ 56] )).x)
[ 57] vec4 _main_50_5() {
[ 58] // pl_shader_sample_ortho
[ 59] vec4 color = vec4(0.0);
[ 60] {
[ 61] vec2 pos = _tex_coord_1_5, size = _tex_size_2_5, pt = _tex_pt_3_5;
[ 62] vec2 dir = vec2(1.0, 0.0);
[ 63] pt *= dir;
[ 64] vec2 fcoord2 = fract(pos * size - vec2(0.5));
[ 65] float fcoord = dot(fcoord2, dir);
[ 66] vec2 base = pos - fcoord * pt - pt * vec2(2.0);
[ 67] float weight;
[ 68] vec4 ws, c;
[ 69] // scaler samples
[ 70] ws = _lut_4_5(vec2(0.00000000000000000000, fcoord));
[ 71] weight = ws[0];
[ 72] c = texture2D(_src_tex_0_5, base + pt * vec2(0.0));
[ 73] color[0] += weight * c[0];
[ 74] color[1] += weight * c[1];
[ 75] color[2] += weight * c[2];
[ 76] weight = ws[1];
[ 77] c = texture2D(_src_tex_0_5, base + pt * vec2(1.0));
[ 78] color[0] += weight * c[0];
[ 79] color[1] += weight * c[1];
[ 80] color[2] += weight * c[2];
[ 81] weight = ws[2];
[ 82] c = texture2D(_src_tex_0_5, base + pt * vec2(2.0));
[ 83] color[0] += weight * c[0];
[ 84] color[1] += weight * c[1];
[ 85] color[2] += weight * c[2];
[ 86] weight = ws[3];
[ 87] c = texture2D(_src_tex_0_5, base + pt * vec2(3.0));
[ 88] color[0] += weight * c[0];
[ 89] color[1] += weight * c[1];
[ 90] color[2] += weight * c[2];
[ 91] ws = _lut_4_5(vec2(1.00000000000000000000, fcoord));
[ 92] weight = ws[0];
[ 93] c = texture2D(_src_tex_0_5, base + pt * vec2(4.0));
[ 94] color[0] += weight * c[0];
[ 95] color[1] += weight * c[1];
[ 96] color[2] += weight * c[2];
[ 97] weight = ws[1];
[ 98] c = texture2D(_src_tex_0_5, base + pt * vec2(5.0));
[ 99] color[0] += weight * c[0];
[100] color[1] += weight * c[1];
[101] color[2] += weight * c[2];
[102] color *= vec4(_const_12_5);
[103] color.a = 1.0;
[104] }
[105] // pl_shader_color_map
[106] {
[107] // pl_shader_tone_map
[108] {
[109] float sig_peak = _const_13_5;
[110] float sig_avg = _const_14_5;
[111] int sig_idx = 0;
[112] if (color[1] > color[sig_idx]) sig_idx = 1;
[113] if (color[2] > color[sig_idx]) sig_idx = 2;
[114] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
[115] vec3 sig_orig = color.rgb;
[116] float slope = min(_const_19_5, _dst_avg_20_5 / sig_avg);
[117] sig *= slope;
[118] sig_peak *= slope;
[119] vec4 sig_pq = vec4(sig.rgb, sig_peak);
[120] sig_pq *= vec4(1.0/49.26108374384236298501);
[121] sig_pq = pow(max(sig_pq, 0.0), vec4(0.15930175781250000000));
[122] sig_pq = (vec4(0.83593750000000000000) + vec4(18.85156250000000000000) * sig_pq)
[123] / (vec4(1.0) + vec4(18.68750000000000000000) * sig_pq);
[124] sig_pq = pow(sig_pq, vec4(78.84375000000000000000));
[125] float scale = 1.0 / (sig_pq.a - _const_21_5);
[126] sig = clamp(vec3(scale) * (sig_pq.rgb - vec3(_const_21_5)), 0.0, 1.0);
[127] float maxLum = _const_22_5 * scale;
[128] float ks = 1.5 * maxLum - 0.5;
[129] vec3 tb = (sig - vec3(ks)) / vec3(1.0 - ks);
[130] vec3 tb2 = tb * tb;
[131] vec3 tb3 = tb2 * tb;
[132] vec3 pb = (2.0 * tb3 - 3.0 * tb2 + vec3(1.0)) * vec3(ks) +
[133] (tb3 - 2.0 * tb2 + tb) * vec3(1.0 - ks) +
[134] (-2.0 * tb3 + 3.0 * tb2) * vec3(maxLum);
[135] sig = mix(sig, pb, vec3(greaterThan(sig, vec3(ks))));
[136] float minLum = _const_23_5 * scale;
[137] float p = 4.0;
[138] if (minLum >= 0.0)
[139] p = min(1.0 / minLum, 4.0);
[140] vec3 boost = vec3(minLum) * pow(vec3(1.0) - sig, vec3(p));
[141] vec3 sig_lift = sig + boost;
[142] if (maxLum < 1.0) {
[143] sig_lift -= vec3(minLum);
[144] sig_lift /= 1.0 + minLum / maxLum * pow(1.0 - maxLum, p);
[145] sig_lift += vec3(minLum);
[146] }
[147] sig = mix(sig, sig_lift, vec3(lessThan(sig, vec3(1.0))));
[148] sig = vec3(sig_pq.a - _const_21_5) * sig + vec3(_const_21_5);
[149] sig = pow(max(sig, 0.0), vec3(1.0/78.84375000000000000000));
[150] sig = max(sig - vec3(0.83593750000000000000), 0.0) /
[151] (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * sig);
[152] sig = pow(sig, vec3(1.0/0.15930175781250000000));
[153] sig *= vec3(49.26108374384236298501);
[154] float orig = max(sig_orig[sig_idx], 1e-10);
[155] vec3 sig_lin = sig_orig * sig[sig_idx] / orig;
[156] float coeff = max(sig[sig_idx] - _const_24_5, 1e-6) /
[157] max(sig[sig_idx], 1.0);
[158] coeff = _const_25_5 * pow(coeff / _const_26_5, _const_27_5);
[159] color.rgb = mix(sig_lin, sig, coeff);
[160] }
[161] color.rgb = _cms_matrix_28_5 * color.rgb;
[162] float cmin = min(min(color.r, color.g), color.b);
[163] if (cmin < _const_29_5) {
[164] float luma = dot(_luma_coeffs_31_5, color.rgb);
[165] float coeff = (_const_29_5 - cmin) / (luma - cmin);
[166] coeff = clamp(coeff, 0.0, 1.0);
[167] color.rgb = mix(color.rgb, vec3(luma), coeff);
[168] }
[169] float cmax = 1.0/_const_30_5 * max(max(color.r, color.g), color.b);
[170] if (cmax > 1.0)
[171] color.rgb /= cmax;
[172] // pl_shader_delinearize
[173] color.rgb = max(color.rgb, 0.0);
[174] color.rgb = pow(vec3(_const_35_5) * color.rgb, vec3(1.0/2.4)) - vec3(_const_36_5);
[175] }
[176] // pl_shader_encode_color
[177] {
[178] }
[179] // pl_shader_dither
[180] {
[181] float bias;
[182] vec2 pos = fract(gl_FragCoord.xy * 1.0/_const_45_5);
[183] bias = _lut_37_5(ivec2(pos * _const_46_5));
[184] color = vec4(255.0) * color + vec4(bias);
[185] color = floor(color) * vec4(1.0 / 255.0);
[186] }
[187] color *= vec4(1.0 / _const_47_5);
[188] vec4 _orig_color_48_5 = color;
[189] color = vec4(0.0, 0.0, 0.0, 1.0);
[190] color[0] = _orig_color_48_5[0];
[191] color[1] = _orig_color_48_5[1];
[192] color[2] = _orig_color_48_5[2];
[193] color[3] = _orig_color_48_5[3];
[194] return color;
[195] }
[196]
[197] void main() {
[198] gl_FragColor = _main_50_5();
[199] }
shader compile log (status=1):
shader link log (status=1):
Spent 9.031 ms compiling shader
Dropped frame with PTS 0.350
(Re)creating 1920x1080x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 1728x973x0 texture with format rgba32f
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_5;
[ 3] uniform sampler2D _weights_5_5;
[ 4] uniform vec2 _tex_size_2_5;
[ 5] uniform vec2 _tex_pt_3_5;
[ 6] uniform float _const_7_5;
[ 7] uniform float _const_8_5;
[ 8] uniform float _const_10_5;
[ 9] uniform float _const_11_5;
[ 10] uniform float _const_12_5;
[ 11] attribute vec2 _tex_coord_1_5_v;
[ 12] varying vec2 _tex_coord_1_5;
[ 13] attribute vec2 _position_13_5_v;
[ 14] void main() {
[ 15] _tex_coord_1_5 = _tex_coord_1_5_v;
[ 16] vec2 va_pos = _position_13_5_v;
[ 17] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 18] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _src_tex_0_5;
[ 3] uniform sampler2D _weights_5_5;
[ 4] uniform vec2 _tex_size_2_5;
[ 5] uniform vec2 _tex_pt_3_5;
[ 6] uniform float _const_7_5;
[ 7] uniform float _const_8_5;
[ 8] uniform float _const_10_5;
[ 9] uniform float _const_11_5;
[ 10] uniform float _const_12_5;
[ 11] varying vec2 _tex_coord_1_5;
[ 12]
[ 13] #define _LUT_POS_6_5(x) mix(_const_7_5, _const_8_5, (x))
[ 14] #define _LUT_POS_9_5(x) mix(_const_10_5, _const_11_5, (x))
[ 15] #define _lut_4_5(pos) (texture2D(_weights_5_5, vec2(\
[ 16] _LUT_POS_6_5(vec2(pos).x)\
[ 17] ,_LUT_POS_9_5(vec2(pos).y)\
[ 18] )).xyzw)
[ 19] vec4 _main_14_5() {
[ 20] // pl_shader_sample_ortho
[ 21] vec4 color = vec4(0.0);
[ 22] {
[ 23] vec2 pos = _tex_coord_1_5, size = _tex_size_2_5, pt = _tex_pt_3_5;
[ 24] vec2 dir = vec2(1.0, 0.0);
[ 25] pt *= dir;
[ 26] vec2 fcoord2 = fract(pos * size - vec2(0.5));
[ 27] float fcoord = dot(fcoord2, dir);
[ 28] vec2 base = pos - fcoord * pt - pt * vec2(2.0);
[ 29] float weight;
[ 30] vec4 ws, c;
[ 31] // scaler samples
[ 32] ws = _lut_4_5(vec2(0.00000000000000000000, fcoord));
[ 33] weight = ws[0];
[ 34] c = texture2D(_src_tex_0_5, base + pt * vec2(0.0));
[ 35] color[0] += weight * c[0];
[ 36] color[1] += weight * c[1];
[ 37] color[2] += weight * c[2];
[ 38] weight = ws[1];
[ 39] c = texture2D(_src_tex_0_5, base + pt * vec2(1.0));
[ 40] color[0] += weight * c[0];
[ 41] color[1] += weight * c[1];
[ 42] color[2] += weight * c[2];
[ 43] weight = ws[2];
[ 44] c = texture2D(_src_tex_0_5, base + pt * vec2(2.0));
[ 45] color[0] += weight * c[0];
[ 46] color[1] += weight * c[1];
[ 47] color[2] += weight * c[2];
[ 48] weight = ws[3];
[ 49] c = texture2D(_src_tex_0_5, base + pt * vec2(3.0));
[ 50] color[0] += weight * c[0];
[ 51] color[1] += weight * c[1];
[ 52] color[2] += weight * c[2];
[ 53] ws = _lut_4_5(vec2(1.00000000000000000000, fcoord));
[ 54] weight = ws[0];
[ 55] c = texture2D(_src_tex_0_5, base + pt * vec2(4.0));
[ 56] color[0] += weight * c[0];
[ 57] color[1] += weight * c[1];
[ 58] color[2] += weight * c[2];
[ 59] weight = ws[1];
[ 60] c = texture2D(_src_tex_0_5, base + pt * vec2(5.0));
[ 61] color[0] += weight * c[0];
[ 62] color[1] += weight * c[1];
[ 63] color[2] += weight * c[2];
[ 64] color *= vec4(_const_12_5);
[ 65] color.a = 1.0;
[ 66] }
[ 67] return color;
[ 68] }
[ 69]
[ 70] void main() {
[ 71] gl_FragColor = _main_14_5();
[ 72] }
shader compile log (status=1):
shader link log (status=1):
Spent 3.445 ms compiling shader
(Re)creating 1728x973x0 texture with format rgba32f
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _frame_0_0;
[ 3] uniform sampler2D _frame_3_0;
[ 4] uniform sampler2D _weights_31_0;
[ 5] uniform float _weight_2_0;
[ 6] uniform float _weight_5_0;
[ 7] uniform float _const_6_0;
[ 8] uniform float _const_7_0;
[ 9] uniform float _dst_range_8_0;
[ 10] uniform float _src_floor_9_0;
[ 11] uniform float _dst_peak_10_0;
[ 12] uniform float _dst_floor_11_0;
[ 13] uniform float _const_12_0;
[ 14] uniform float _dst_avg_13_0;
[ 15] uniform float _const_14_0;
[ 16] uniform float _const_15_0;
[ 17] uniform float _const_16_0;
[ 18] uniform float _const_17_0;
[ 19] uniform float _const_18_0;
[ 20] uniform float _const_19_0;
[ 21] uniform float _const_20_0;
[ 22] uniform mat3 _cms_matrix_21_0;
[ 23] uniform float _const_22_0;
[ 24] uniform float _const_23_0;
[ 25] uniform float _const_25_0;
[ 26] uniform float _const_26_0;
[ 27] uniform float _const_27_0;
[ 28] uniform float _const_28_0;
[ 29] uniform float _const_29_0;
[ 30] uniform float _const_33_0;
[ 31] uniform float _const_34_0;
[ 32] uniform float _const_36_0;
[ 33] uniform float _const_37_0;
[ 34] uniform float _const_38_0;
[ 35] uniform float _const_39_0;
[ 36] uniform float _const_40_0;
[ 37] attribute vec2 _tex_coord_1_0_v;
[ 38] varying vec2 _tex_coord_1_0;
[ 39] attribute vec2 _tex_coord_4_0_v;
[ 40] varying vec2 _tex_coord_4_0;
[ 41] attribute vec2 _position_42_0_v;
[ 42] void main() {
[ 43] _tex_coord_1_0 = _tex_coord_1_0_v;
[ 44] _tex_coord_4_0 = _tex_coord_4_0_v;
[ 45] vec2 va_pos = _position_42_0_v;
[ 46] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 47] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _frame_0_0;
[ 3] uniform sampler2D _frame_3_0;
[ 4] uniform sampler2D _weights_31_0;
[ 5] uniform float _weight_2_0;
[ 6] uniform float _weight_5_0;
[ 7] uniform float _const_6_0;
[ 8] uniform float _const_7_0;
[ 9] uniform float _dst_range_8_0;
[ 10] uniform float _src_floor_9_0;
[ 11] uniform float _dst_peak_10_0;
[ 12] uniform float _dst_floor_11_0;
[ 13] uniform float _const_12_0;
[ 14] uniform float _dst_avg_13_0;
[ 15] uniform float _const_14_0;
[ 16] uniform float _const_15_0;
[ 17] uniform float _const_16_0;
[ 18] uniform float _const_17_0;
[ 19] uniform float _const_18_0;
[ 20] uniform float _const_19_0;
[ 21] uniform float _const_20_0;
[ 22] uniform mat3 _cms_matrix_21_0;
[ 23] uniform float _const_22_0;
[ 24] uniform float _const_23_0;
[ 25] uniform float _const_25_0;
[ 26] uniform float _const_26_0;
[ 27] uniform float _const_27_0;
[ 28] uniform float _const_28_0;
[ 29] uniform float _const_29_0;
[ 30] uniform float _const_33_0;
[ 31] uniform float _const_34_0;
[ 32] uniform float _const_36_0;
[ 33] uniform float _const_37_0;
[ 34] uniform float _const_38_0;
[ 35] uniform float _const_39_0;
[ 36] uniform float _const_40_0;
[ 37] varying vec2 _tex_coord_1_0;
[ 38] varying vec2 _tex_coord_4_0;
[ 39]
[ 40] #define _luma_coeffs_24_0 vec3(_const_25_0, _const_26_0, _const_27_0)
[ 41] #define _LUT_POS_32_0(x) mix(_const_33_0, _const_34_0, (x))
[ 42] #define _LUT_POS_35_0(x) mix(_const_36_0, _const_37_0, (x))
[ 43] #define _lut_30_0(pos) (texture2D(_weights_31_0, vec2(\
[ 44] _LUT_POS_32_0(vec2(pos).x)\
[ 45] ,_LUT_POS_35_0(vec2(pos).y)\
[ 46] )).x)
[ 47] vec4 _main_43_0() {
[ 48] vec4 color;
[ 49] // pl_render_image_mix
[ 50] {
[ 51] vec4 mix_color = vec4(0.0);
[ 52] color = texture2D(_frame_0_0, _tex_coord_1_0);
[ 53] // pl_shader_color_map
[ 54] {
[ 55] }
[ 56] mix_color += _weight_2_0 * color;
[ 57] color = texture2D(_frame_3_0, _tex_coord_4_0);
[ 58] // pl_shader_color_map
[ 59] {
[ 60] }
[ 61] mix_color += _weight_5_0 * color;
[ 62] color = mix_color;
[ 63] }
[ 64] // pl_shader_color_map
[ 65] {
[ 66] // pl_shader_tone_map
[ 67] {
[ 68] float sig_peak = _const_6_0;
[ 69] float sig_avg = _const_7_0;
[ 70] int sig_idx = 0;
[ 71] if (color[1] > color[sig_idx]) sig_idx = 1;
[ 72] if (color[2] > color[sig_idx]) sig_idx = 2;
[ 73] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
[ 74] vec3 sig_orig = color.rgb;
[ 75] float slope = min(_const_12_0, _dst_avg_13_0 / sig_avg);
[ 76] sig *= slope;
[ 77] sig_peak *= slope;
[ 78] vec4 sig_pq = vec4(sig.rgb, sig_peak);
[ 79] sig_pq *= vec4(1.0/49.26108374384236298501);
[ 80] sig_pq = pow(max(sig_pq, 0.0), vec4(0.15930175781250000000));
[ 81] sig_pq = (vec4(0.83593750000000000000) + vec4(18.85156250000000000000) * sig_pq)
[ 82] / (vec4(1.0) + vec4(18.68750000000000000000) * sig_pq);
[ 83] sig_pq = pow(sig_pq, vec4(78.84375000000000000000));
[ 84] float scale = 1.0 / (sig_pq.a - _const_14_0);
[ 85] sig = clamp(vec3(scale) * (sig_pq.rgb - vec3(_const_14_0)), 0.0, 1.0);
[ 86] float maxLum = _const_15_0 * scale;
[ 87] float ks = 1.5 * maxLum - 0.5;
[ 88] vec3 tb = (sig - vec3(ks)) / vec3(1.0 - ks);
[ 89] vec3 tb2 = tb * tb;
[ 90] vec3 tb3 = tb2 * tb;
[ 91] vec3 pb = (2.0 * tb3 - 3.0 * tb2 + vec3(1.0)) * vec3(ks) +
[ 92] (tb3 - 2.0 * tb2 + tb) * vec3(1.0 - ks) +
[ 93] (-2.0 * tb3 + 3.0 * tb2) * vec3(maxLum);
[ 94] sig = mix(sig, pb, vec3(greaterThan(sig, vec3(ks))));
[ 95] float minLum = _const_16_0 * scale;
[ 96] float p = 4.0;
[ 97] if (minLum >= 0.0)
[ 98] p = min(1.0 / minLum, 4.0);
[ 99] vec3 boost = vec3(minLum) * pow(vec3(1.0) - sig, vec3(p));
[100] vec3 sig_lift = sig + boost;
[101] if (maxLum < 1.0) {
[102] sig_lift -= vec3(minLum);
[103] sig_lift /= 1.0 + minLum / maxLum * pow(1.0 - maxLum, p);
[104] sig_lift += vec3(minLum);
[105] }
[106] sig = mix(sig, sig_lift, vec3(lessThan(sig, vec3(1.0))));
[107] sig = vec3(sig_pq.a - _const_14_0) * sig + vec3(_const_14_0);
[108] sig = pow(max(sig, 0.0), vec3(1.0/78.84375000000000000000));
[109] sig = max(sig - vec3(0.83593750000000000000), 0.0) /
[110] (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * sig);
[111] sig = pow(sig, vec3(1.0/0.15930175781250000000));
[112] sig *= vec3(49.26108374384236298501);
[113] float orig = max(sig_orig[sig_idx], 1e-10);
[114] vec3 sig_lin = sig_orig * sig[sig_idx] / orig;
[115] float coeff = max(sig[sig_idx] - _const_17_0, 1e-6) /
[116] max(sig[sig_idx], 1.0);
[117] coeff = _const_18_0 * pow(coeff / _const_19_0, _const_20_0);
[118] color.rgb = mix(sig_lin, sig, coeff);
[119] }
[120] color.rgb = _cms_matrix_21_0 * color.rgb;
[121] float cmin = min(min(color.r, color.g), color.b);
[122] if (cmin < _const_22_0) {
[123] float luma = dot(_luma_coeffs_24_0, color.rgb);
[124] float coeff = (_const_22_0 - cmin) / (luma - cmin);
[125] coeff = clamp(coeff, 0.0, 1.0);
[126] color.rgb = mix(color.rgb, vec3(luma), coeff);
[127] }
[128] float cmax = 1.0/_const_23_0 * max(max(color.r, color.g), color.b);
[129] if (cmax > 1.0)
[130] color.rgb /= cmax;
[131] // pl_shader_delinearize
[132] color.rgb = max(color.rgb, 0.0);
[133] color.rgb = pow(vec3(_const_28_0) * color.rgb, vec3(1.0/2.4)) - vec3(_const_29_0);
[134] }
[135] // pl_shader_encode_color
[136] {
[137] }
[138] // pl_shader_dither
[139] {
[140] float bias;
[141] vec2 pos = fract(gl_FragCoord.xy * 1.0/_const_38_0);
[142] bias = _lut_30_0(ivec2(pos * _const_39_0));
[143] color = vec4(255.0) * color + vec4(bias);
[144] color = floor(color) * vec4(1.0 / 255.0);
[145] }
[146] color *= vec4(1.0 / _const_40_0);
[147] vec4 _orig_color_41_0 = color;
[148] color = vec4(0.0, 0.0, 0.0, 1.0);
[149] color[0] = _orig_color_41_0[0];
[150] color[1] = _orig_color_41_0[1];
[151] color[2] = _orig_color_41_0[2];
[152] color[3] = _orig_color_41_0[3];
[153] return color;
[154] }
[155]
[156] void main() {
[157] gl_FragColor = _main_43_0();
[158] }
shader compile log (status=1):
shader link log (status=1):
Spent 7.768 ms compiling shader
(Re)creating 1920x1080x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 960x540x0 texture with format r16
gl_buf_write: OpenGL error: GL_INVALID_ENUM
(Re)creating 1728x973x0 texture with format rgba32f
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
vertex shader source:
[ 1] #version 120
[ 2] uniform sampler2D _frame_0_0;
[ 3] uniform sampler2D _weights_28_0;
[ 4] uniform float _weight_2_0;
[ 5] uniform float _const_3_0;
[ 6] uniform float _const_4_0;
[ 7] uniform float _dst_range_5_0;
[ 8] uniform float _src_floor_6_0;
[ 9] uniform float _dst_peak_7_0;
[ 10] uniform float _dst_floor_8_0;
[ 11] uniform float _const_9_0;
[ 12] uniform float _dst_avg_10_0;
[ 13] uniform float _const_11_0;
[ 14] uniform float _const_12_0;
[ 15] uniform float _const_13_0;
[ 16] uniform float _const_14_0;
[ 17] uniform float _const_15_0;
[ 18] uniform float _const_16_0;
[ 19] uniform float _const_17_0;
[ 20] uniform mat3 _cms_matrix_18_0;
[ 21] uniform float _const_19_0;
[ 22] uniform float _const_20_0;
[ 23] uniform float _const_22_0;
[ 24] uniform float _const_23_0;
[ 25] uniform float _const_24_0;
[ 26] uniform float _const_25_0;
[ 27] uniform float _const_26_0;
[ 28] uniform float _const_30_0;
[ 29] uniform float _const_31_0;
[ 30] uniform float _const_33_0;
[ 31] uniform float _const_34_0;
[ 32] uniform float _const_35_0;
[ 33] uniform float _const_36_0;
[ 34] uniform float _const_37_0;
[ 35] attribute vec2 _tex_coord_1_0_v;
[ 36] varying vec2 _tex_coord_1_0;
[ 37] attribute vec2 _position_39_0_v;
[ 38] void main() {
[ 39] _tex_coord_1_0 = _tex_coord_1_0_v;
[ 40] vec2 va_pos = _position_39_0_v;
[ 41] gl_Position = vec4(va_pos, 0.0, 1.0);
[ 42] }
shader compile log (status=1):
fragment shader source:
[ 1] #version 120
[ 2] uniform sampler2D _frame_0_0;
[ 3] uniform sampler2D _weights_28_0;
[ 4] uniform float _weight_2_0;
[ 5] uniform float _const_3_0;
[ 6] uniform float _const_4_0;
[ 7] uniform float _dst_range_5_0;
[ 8] uniform float _src_floor_6_0;
[ 9] uniform float _dst_peak_7_0;
[ 10] uniform float _dst_floor_8_0;
[ 11] uniform float _const_9_0;
[ 12] uniform float _dst_avg_10_0;
[ 13] uniform float _const_11_0;
[ 14] uniform float _const_12_0;
[ 15] uniform float _const_13_0;
[ 16] uniform float _const_14_0;
[ 17] uniform float _const_15_0;
[ 18] uniform float _const_16_0;
[ 19] uniform float _const_17_0;
[ 20] uniform mat3 _cms_matrix_18_0;
[ 21] uniform float _const_19_0;
[ 22] uniform float _const_20_0;
[ 23] uniform float _const_22_0;
[ 24] uniform float _const_23_0;
[ 25] uniform float _const_24_0;
[ 26] uniform float _const_25_0;
[ 27] uniform float _const_26_0;
[ 28] uniform float _const_30_0;
[ 29] uniform float _const_31_0;
[ 30] uniform float _const_33_0;
[ 31] uniform float _const_34_0;
[ 32] uniform float _const_35_0;
[ 33] uniform float _const_36_0;
[ 34] uniform float _const_37_0;
[ 35] varying vec2 _tex_coord_1_0;
[ 36]
[ 37] #define _luma_coeffs_21_0 vec3(_const_22_0, _const_23_0, _const_24_0)
[ 38] #define _LUT_POS_29_0(x) mix(_const_30_0, _const_31_0, (x))
[ 39] #define _LUT_POS_32_0(x) mix(_const_33_0, _const_34_0, (x))
[ 40] #define _lut_27_0(pos) (texture2D(_weights_28_0, vec2(\
[ 41] _LUT_POS_29_0(vec2(pos).x)\
[ 42] ,_LUT_POS_32_0(vec2(pos).y)\
[ 43] )).x)
[ 44] vec4 _main_40_0() {
[ 45] vec4 color;
[ 46] // pl_render_image_mix
[ 47] {
[ 48] vec4 mix_color = vec4(0.0);
[ 49] color = texture2D(_frame_0_0, _tex_coord_1_0);
[ 50] // pl_shader_color_map
[ 51] {
[ 52] }
[ 53] mix_color += _weight_2_0 * color;
[ 54] color = mix_color;
[ 55] }
[ 56] // pl_shader_color_map
[ 57] {
[ 58] // pl_shader_tone_map
[ 59] {
[ 60] float sig_peak = _const_3_0;
[ 61] float sig_avg = _const_4_0;
[ 62] int sig_idx = 0;
[ 63] if (color[1] > color[sig_idx]) sig_idx = 1;
[ 64] if (color[2] > color[sig_idx]) sig_idx = 2;
[ 65] vec3 sig = clamp(color.rgb, 0.0, sig_peak);
[ 66] vec3 sig_orig = color.rgb;
[ 67] float slope = min(_const_9_0, _dst_avg_10_0 / sig_avg);
[ 68] sig *= slope;
[ 69] sig_peak *= slope;
[ 70] vec4 sig_pq = vec4(sig.rgb, sig_peak);
[ 71] sig_pq *= vec4(1.0/49.26108374384236298501);
[ 72] sig_pq = pow(max(sig_pq, 0.0), vec4(0.15930175781250000000));
[ 73] sig_pq = (vec4(0.83593750000000000000) + vec4(18.85156250000000000000) * sig_pq)
[ 74] / (vec4(1.0) + vec4(18.68750000000000000000) * sig_pq);
[ 75] sig_pq = pow(sig_pq, vec4(78.84375000000000000000));
[ 76] float scale = 1.0 / (sig_pq.a - _const_11_0);
[ 77] sig = clamp(vec3(scale) * (sig_pq.rgb - vec3(_const_11_0)), 0.0, 1.0);
[ 78] float maxLum = _const_12_0 * scale;
[ 79] float ks = 1.5 * maxLum - 0.5;
[ 80] vec3 tb = (sig - vec3(ks)) / vec3(1.0 - ks);
[ 81] vec3 tb2 = tb * tb;
[ 82] vec3 tb3 = tb2 * tb;
[ 83] vec3 pb = (2.0 * tb3 - 3.0 * tb2 + vec3(1.0)) * vec3(ks) +
[ 84] (tb3 - 2.0 * tb2 + tb) * vec3(1.0 - ks) +
[ 85] (-2.0 * tb3 + 3.0 * tb2) * vec3(maxLum);
[ 86] sig = mix(sig, pb, vec3(greaterThan(sig, vec3(ks))));
[ 87] float minLum = _const_13_0 * scale;
[ 88] float p = 4.0;
[ 89] if (minLum >= 0.0)
[ 90] p = min(1.0 / minLum, 4.0);
[ 91] vec3 boost = vec3(minLum) * pow(vec3(1.0) - sig, vec3(p));
[ 92] vec3 sig_lift = sig + boost;
[ 93] if (maxLum < 1.0) {
[ 94] sig_lift -= vec3(minLum);
[ 95] sig_lift /= 1.0 + minLum / maxLum * pow(1.0 - maxLum, p);
[ 96] sig_lift += vec3(minLum);
[ 97] }
[ 98] sig = mix(sig, sig_lift, vec3(lessThan(sig, vec3(1.0))));
[ 99] sig = vec3(sig_pq.a - _const_11_0) * sig + vec3(_const_11_0);
[100] sig = pow(max(sig, 0.0), vec3(1.0/78.84375000000000000000));
[101] sig = max(sig - vec3(0.83593750000000000000), 0.0) /
[102] (vec3(18.85156250000000000000) - vec3(18.68750000000000000000) * sig);
[103] sig = pow(sig, vec3(1.0/0.15930175781250000000));
[104] sig *= vec3(49.26108374384236298501);
[105] float orig = max(sig_orig[sig_idx], 1e-10);
[106] vec3 sig_lin = sig_orig * sig[sig_idx] / orig;
[107] float coeff = max(sig[sig_idx] - _const_14_0, 1e-6) /
[108] max(sig[sig_idx], 1.0);
[109] coeff = _const_15_0 * pow(coeff / _const_16_0, _const_17_0);
[110] color.rgb = mix(sig_lin, sig, coeff);
[111] }
[112] color.rgb = _cms_matrix_18_0 * color.rgb;
[113] float cmin = min(min(color.r, color.g), color.b);
[114] if (cmin < _const_19_0) {
[115] float luma = dot(_luma_coeffs_21_0, color.rgb);
[116] float coeff = (_const_19_0 - cmin) / (luma - cmin);
[117] coeff = clamp(coeff, 0.0, 1.0);
[118] color.rgb = mix(color.rgb, vec3(luma), coeff);
[119] }
[120] float cmax = 1.0/_const_20_0 * max(max(color.r, color.g), color.b);
[121] if (cmax > 1.0)
[122] color.rgb /= cmax;
[123] // pl_shader_delinearize
[124] color.rgb = max(color.rgb, 0.0);
[125] color.rgb = pow(vec3(_const_25_0) * color.rgb, vec3(1.0/2.4)) - vec3(_const_26_0);
[126] }
[127] // pl_shader_encode_color
[128] {
[129] }
[130] // pl_shader_dither
[131] {
[132] float bias;
[133] vec2 pos = fract(gl_FragCoord.xy * 1.0/_const_35_0);
[134] bias = _lut_27_0(ivec2(pos * _const_36_0));
[135] color = vec4(255.0) * color + vec4(bias);
[136] color = floor(color) * vec4(1.0 / 255.0);
[137] }
[138] color *= vec4(1.0 / _const_37_0);
[139] vec4 _orig_color_38_0 = color;
[140] color = vec4(0.0, 0.0, 0.0, 1.0);
[141] color[0] = _orig_color_38_0[0];
[142] color[1] = _orig_color_38_0[1];
[143] color[2] = _orig_color_38_0[2];
[144] color[3] = _orig_color_38_0[3];
[145] return color;
[146] }
[147]
[148] void main() {
[149] gl_FragColor = _main_40_0();
[150] }
shader compile log (status=1):
shader link log (status=1):
Spent 4.727 ms compiling shader
Estimated source FPS: 60.000, display FPS: 231.266
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
gl_buf_write: OpenGL error: GL_INVALID_ENUM
Exiting...
Received frame after EOF signaled... discarding frame!
Dropped frame with PTS 1.100
Dropped frame with PTS 1.067
Dropped frame with PTS 1.083
We'd better give up
More info about the graphic issue
The corrupted image was displayed outside the video image, which depended on the radio of window width / height
The graphic was initially normal, then became corrupted after my video starting to play
https://drive.google.com/file/d/1X13Slc8zrauazlaE88fxPClC2pTF3fEX/view?usp=sharing
@CarterLi what about this diff?
diff --git a/src/opengl/gpu.c b/src/opengl/gpu.c
index 88583766..2a519ce2 100644
--- a/src/opengl/gpu.c
+++ b/src/opengl/gpu.c
@@ -432,9 +432,9 @@ void gl_buf_write(pl_gpu gpu, pl_buf buf, size_t offset,
return;
struct pl_buf_gl *buf_gl = PL_PRIV(buf);
- glBindBuffer(GL_COPY_WRITE_BUFFER, buf_gl->buffer);
- glBufferSubData(GL_COPY_WRITE_BUFFER, buf_gl->offset + offset, size, data);
- glBindBuffer(GL_COPY_WRITE_BUFFER, 0);
+ glBindBuffer(GL_ARRAY_BUFFER, buf_gl->buffer);
+ glBufferSubData(GL_ARRAY_BUFFER, buf_gl->offset + offset, size, data);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
gl_check_err(gpu, "gl_buf_write");
RELEASE_CURRENT();
}
@@ -446,9 +446,9 @@ bool gl_buf_read(pl_gpu gpu, pl_buf buf, size_t offset,
return false;
struct pl_buf_gl *buf_gl = PL_PRIV(buf);
- glBindBuffer(GL_COPY_READ_BUFFER, buf_gl->buffer);
- glGetBufferSubData(GL_COPY_READ_BUFFER, buf_gl->offset + offset, size, dest);
- glBindBuffer(GL_COPY_READ_BUFFER, 0);
+ glBindBuffer(GL_ARRAY_BUFFER, buf_gl->buffer);
+ glGetBufferSubData(GL_ARRAY_BUFFER, buf_gl->offset + offset, size, dest);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
bool ok = gl_check_err(gpu, "gl_buf_read");
RELEASE_CURRENT();
return ok;
We should move the OpenGL debugging to a different issue. I still would like to get OpenGL 2.1 working in libplacebo.
@CarterLi I think I know what's going on. This patch should fix it, right?
diff --git a/src/vulkan/gpu_pass.c b/src/vulkan/gpu_pass.c
index 53c5d017..53564473 100644
--- a/src/vulkan/gpu_pass.c
+++ b/src/vulkan/gpu_pass.c
@@ -572,13 +572,13 @@ no_descriptors: ;
};
}
- VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ VkAttachmentLoadOp loadOp;
if (pass->params.load_target) {
- if (pass->params.blend_params)
- loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
pass_vk->initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+ loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
} else {
pass_vk->initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
}
VkRenderPassCreateInfo rinfo = {
@@ -991,7 +991,7 @@ void vk_pass_run(pl_gpu gpu, const struct pl_pass_run_params *params)
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
.renderPass = pass_vk->renderPass,
.framebuffer = tex_vk->framebuffer,
- .renderArea = (VkRect2D){{0, 0}, {tex->params.w, tex->params.h}},
+ .renderArea.extent = {tex->params.w, tex->params.h},
};
vk->CmdBeginRenderPass(cmd->buf, &binfo, VK_SUBPASS_CONTENTS_INLINE);
diff --git a/src/opengl/gpu.c b/src/opengl/gpu.c index 88583766..2a519ce2 100644 --- a/src/opengl/gpu.c +++ b/src/opengl/gpu.c @@ -432,9 +432,9 @@ void gl_buf_write(pl_gpu gpu, pl_buf buf, size_t offset, return; struct pl_buf_gl *buf_gl = PL_PRIV(buf); - glBindBuffer(GL_COPY_WRITE_BUFFER, buf_gl->buffer); - glBufferSubData(GL_COPY_WRITE_BUFFER, buf_gl->offset + offset, size, data); - glBindBuffer(GL_COPY_WRITE_BUFFER, 0); + glBindBuffer(GL_ARRAY_BUFFER, buf_gl->buffer); + glBufferSubData(GL_ARRAY_BUFFER, buf_gl->offset + offset, size, data); + glBindBuffer(GL_ARRAY_BUFFER, 0); gl_check_err(gpu, "gl_buf_write"); RELEASE_CURRENT(); } @@ -446,9 +446,9 @@ bool gl_buf_read(pl_gpu gpu, pl_buf buf, size_t offset, return false; struct pl_buf_gl *buf_gl = PL_PRIV(buf); - glBindBuffer(GL_COPY_READ_BUFFER, buf_gl->buffer); - glGetBufferSubData(GL_COPY_READ_BUFFER, buf_gl->offset + offset, size, dest); - glBindBuffer(GL_COPY_READ_BUFFER, 0); + glBindBuffer(GL_ARRAY_BUFFER, buf_gl->buffer); + glGetBufferSubData(GL_ARRAY_BUFFER, buf_gl->offset + offset, size, dest); + glBindBuffer(GL_ARRAY_BUFFER, 0); bool ok = gl_check_err(gpu, "gl_buf_read"); RELEASE_CURRENT(); return ok;
It works. But HDR mode was not enabled.
I wonder what's faster, performance-wise. We have two options for dealing with partial rendering:
loadOp
to VK_ATTACHMENT_LOAD_OP_LOAD
, and render to the full framebuffer.loadOp
to VK_ATTACHMENT_LOAD_OP_DONT_CARE
and instead use the render-area to crop to the scissor area, even if that means ignoring the render area granularity requirements.The vulkan specification just gives the nebulous "may cause a performance penalty" for approach 2, but I have no idea how to quantify the costs of LOAD_OP_LOAD
vs LOAD_OP_DONT_CARE
since my hardware does not make a distinction here.
I wonder if you're in a position to do benchmarks?
@CarterLi I think I know what's going on. This patch should fix it, right?
diff --git a/src/vulkan/gpu_pass.c b/src/vulkan/gpu_pass.c index 53c5d017..53564473 100644 --- a/src/vulkan/gpu_pass.c +++ b/src/vulkan/gpu_pass.c @@ -572,13 +572,13 @@ no_descriptors: ; }; } - VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + VkAttachmentLoadOp loadOp; if (pass->params.load_target) { - if (pass->params.blend_params) - loadOp = VK_ATTACHMENT_LOAD_OP_LOAD; pass_vk->initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + loadOp = VK_ATTACHMENT_LOAD_OP_LOAD; } else { pass_vk->initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; } VkRenderPassCreateInfo rinfo = { @@ -991,7 +991,7 @@ void vk_pass_run(pl_gpu gpu, const struct pl_pass_run_params *params) .sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, .renderPass = pass_vk->renderPass, .framebuffer = tex_vk->framebuffer, - .renderArea = (VkRect2D){{0, 0}, {tex->params.w, tex->params.h}}, + .renderArea.extent = {tex->params.w, tex->params.h}, }; vk->CmdBeginRenderPass(cmd->buf, &binfo, VK_SUBPASS_CONTENTS_INLINE);
Works like a charm, great!
It works. But HDR mode was not enabled.
This is known/expected, there's no implementation for HDR switching in OpenGL mode, and no extension for it, so nothing we can do.
I wonder what's faster, performance-wise. We have two options for dealing with partial rendering:
- Always set the
loadOp
toVK_ATTACHMENT_LOAD_OP_LOAD
, and render to the full framebuffer.- Always set the
loadOp
toVK_ATTACHMENT_LOAD_OP_DONT_CARE
and instead use the render-area to crop to the scissor area, even if that means ignoring the render area granularity requirements.The vulkan specification just gives the nebulous "may cause a performance penalty" for approach 2, but I have no idea how to quantify the costs of
LOAD_OP_LOAD
vsLOAD_OP_DONT_CARE
since my hardware does not make a distinction here.I wonder if you're in a position to do benchmarks?
I'd like to help. Any guidelines?
I'd like to help. Any guidelines?
Not sure myself. I think the best way to benchmark something like this currently is via mpv
, but getting that to work via MoltenVK would be rather difficult and involve writing new code. Alternatively, we could add some sort of benchmark mode to plplay
. Or I could write up a synthetic benchmark.
For the time being I'm going to just not worry about it, I think.
It works. But HDR mode was not enabled.
This is known/expected, there's no implementation for HDR switching in OpenGL mode, and no extension for it, so nothing we can do.
Off topic. How do you choose colorspace for display to use if a video source doesn't contain mastering display metadata? I'm struggling at this issue: https://github.com/iina/iina/pull/3539#issuecomment-974039277
For reference, this would be the other way of doing it: (applies onto current master)
diff --git a/src/vulkan/gpu_pass.c b/src/vulkan/gpu_pass.c
index 53564473..a12f0b2c 100644
--- a/src/vulkan/gpu_pass.c
+++ b/src/vulkan/gpu_pass.c
@@ -572,10 +572,11 @@ no_descriptors: ;
};
}
- VkAttachmentLoadOp loadOp;
+ VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
if (pass->params.load_target) {
+ if (params->blend_params)
+ loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
pass_vk->initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
- loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
} else {
pass_vk->initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
@@ -991,7 +992,7 @@ void vk_pass_run(pl_gpu gpu, const struct pl_pass_run_params *params)
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
.renderPass = pass_vk->renderPass,
.framebuffer = tex_vk->framebuffer,
- .renderArea.extent = {tex->params.w, tex->params.h},
+ .renderArea = scissor,
};
vk->CmdBeginRenderPass(cmd->buf, &binfo, VK_SUBPASS_CONTENTS_INLINE);
We'd better removing the version check for shaderc
too, for the same reason of vulkan. @haasn
@CarterLi I'm less comfortable doing that, because the shaderc version is non-negligible, and shaderc is a normal library (not like the vulkan SDK which is a horrific abomination).
I suggest instead figuring out why version infromation isn't resolving for you. (Try asking meson devs)
Version:
The process:
meson
failed to find vulkan.Solved by removing volkan version requirement in
meson.build
-Dvulkan-registry
specified ). Ranbuild/demos/plplay -v ~/HDR.webm
, I gotNotably
Solved by enabling
VK_KHR_portability_subset
And lots of warnings were printed on the console
Solved by enabling
VkPhysicalDevicePortabilitySubsetFeaturesKHR::events
withFull log