From 4d2f35fc4a3d09cf05b0b242d79ef5f7782411d1 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Thu, 30 Nov 2023 09:46:13 +0800 Subject: [PATCH] import changes from `dev' branch of rmottola/Arctic-Fox: - Bug 1208554 - Take Velocity into account for WheelScrollAnimations. r=kats (2fe3c0e047) - Bug 1207656: APZ mouse wheel scroll: don't ignore minimum duration. r=dvander (c195a2b7e2) - Bug 1199468 - Create prefs for the smooth scroll timing function shape. r=kats (f65176f9b1) - Bug 1247677 - Add support for the general.smoothScroll.{pages,pixels} prefs in APZ. r=dvander (e56a15b294) - Bug 1244735 - Preference to override the default behaviour for partial present. r=jrmuizel (a0e19e8a8e) - Bug 1223144 - Scale texture coordinates in CompositorOGL for non POT textures. r=mwoodrow (a4b654b00a) - set reporter end (09ddff0c78) - Add full mix-blend mode support to the D3D11 compositor. (bug 1238496, r=bas) (6ef3e68cbf) - Bug 1235994 - For wheel events which may have momentum following them, handle scroll snapping in APZ. r=mstange (b9837185ea) - Bug 1230674 - part 4, Update AsyncPanZoomController to call overscroll api when building for Android r=kats (60d551820d) - Bug 1235994 - Extract a helper function to request a snap to the predicted destination. r=botond (c4436d3c5e) - Bug 1243547 - Route scroll position adjusting for surface shifting directly to APZC. r=rbarker (3b86ab8f2f) - Bug 1192919 - Follow-up to fix build error with logging enabled. r=me and DONTBUILD (f29229d6c4) - Bug 1242173 - Typing in input fields does not visually update r= (a2ef65d735) - Bug 1244901 - When recording transform duration for potential checkerboarding time, do so on the compositor thread. r=botond (cf0be4b328) - Bug 1240202 - Avoid getting stuck in overscroll when a second finger goes down while overscrolled and in the TOUCHING state. r=kats (96c7ef87af) - Bug 1236519 - Ensure JSFunction::isDerivedClassConstructor properly handles lazy self-hosted functions. r=till a=bustage (236b72dd50) - Bug 1232229 - Add some instrumentation and more fencing to ArenaLists; r=ehoogeveen (f6595958c6) - Bug 1232229 - Instrument setting ArenaHeader::next to catch misuse and fix existing instrumentation. r=terrence (68377d13b7) - Bug 1248949 - Optimize Arena::thingsPerArena. r=terrence (ee28f3a6af) - Bug 1245965 - Fix and OOM handling failure in NewMemInfoObject; r=sfink (29e684a163) - Bug 1245518 - Implement ModuleEnvironmentObject::getOwnPropertyDescriptor() which is called by the debugger r=shu (cef4dc6fce) - Bug 1232113 - "Make the format specifiers in JS_snprintf() invocations more portable". r=jwalden+bmo (cdf8a9915f) - Bug 1234387 - DumpBacktrace: Check the result of Sprinter::init function. r=bbouvier (3b7f6aac37) - Bug 1233944 - Upgrade MOZ_ASSERT to MOZ_RELEASE_ASSERT in JSObject::setGroup. r=me (75e7aa92dc) - Bug 1203696: Make js::IsInternalFunctionObject consider non-lambdas internal. r=bhackett (1531e8ecd9) - Bug 1235641 - Add line and column info to dump bytecode basic blocks. r=sstangl (0f642867a0) - Bug 1052793, part 1 - Do per-zone GC for CC_WAITING triggers. r=smaug (b733898730) - Bug 1052793, part 2 - Shrink GC buffers during compartmental GCs. r=terrence (0e4cd6218e) - Bug 1237169 - Remove some unused parameters in and around xpcom/base/. r=mccr8. (9a08690fa7) - Bug 1247122 - Propagate the NS_ERROR_OUT_OF_MEMORY from CycleCollectedJSRuntime CTOR, r=khuey (5e8bd1d14b) - Bug 1200514 - Run remaining stable state runnables after final cycle collection. r=froydnj,mccr8 (410c3bf2ad) - Bug 1247381 - Restore a CC optimization dropped in bug 1105069 part 7; r=mccr8 (c76e8613e7) - Bug 1249932 - indicate in the GC and CC log (browser console) whetherit is about default or content process, r=mccr8 (1d89d18e69) - Bug 1232113 - "Make the format specifiers in JS_snprintf() invocations more portable". r=jandem (d9a480c28c) - Bug 1223222 - Part 1: Add NSPRLogModulesParser. r=froydnj (2a79976e1f) - Bug 1223222 - Part 2: Add tests for NSPRLogModulesParser. r=froydnj (bde482099c) - Bug 1233881 - Support dynamically setting log levels at runtime via prefs. r=froydnj (c5c685f924) - Bug 1223222 - Part 3: Remove usage of PR_NewLogModule in mozilla LogModule code. r=froydnj (6eee38c6a7) - Bug 1150917 - Remove all values from nsIProgrammingLanguage except UNKNOWN and JAVASCRIPT. r=froydnj (9626abcc33) - Bug 1174972 - Add basic mozilla logging backend. r=froydnj,r=bwc,r=jduell (8e22fb5a66) - Bug 961430 - Allow pid be added to the log file name automatically. r=froydnj (4d28e09d9a) - Bug 1239212 - Append missing newlines to log messages. r=froydnj (0a94f048f0) - Bug 1242097 - Support sync module for logging (r=erahm) (ce3648c763) - Bug 885952 - Add thread name to MozLogging, r=froydnj (94bb1979e2) - Bug 1239941 - Copy va_list before using it in LogModuleManager::Print. r=froydnj (0767e1900e) - Bug 1249451 - nsCycleCollector::ScanRoots may cause some unexpected purple buffer usage, r=mccr8 (96591fa1a1) - Bug 1237169 (follow-up) - Fix static analysis bustage. r=me. (3e177f98cc) - Bug 1242151: using va_list needs at least on OpenBSD r=erahm (7c36e9191c) - Bug 1226376 - Part 1: Allow non-trivial constexpr constructors in MOZ_TRIVIAL_CTOR_DTOR classes, r=ehsan (ec1fb5cc1d) - Bug 1226376 - Part 2: Annotate StaticMutex with MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS, r=nfroyd (484904f38a) - Bug 1223927 - Add resident-unique measurement to OS X. r=njn (4b97965c38) - Bug 1224685 - Add |resident-unique| measurement to Windows. r=njn (bde0a2fbed) - Bug 1239516 - Use nsDependentCSubstring for wrapping a slice of a char buffer. r=karlt (bd62aee33a) - bug 1245745 include libpulse version in update URL r=glandium (74f389b1c7) - Bug 1245673 - Remove useless NS_INT32_TO_PTR from DumpSerialNumbers. r=froydnj (16d58e9abd) - Bug 1243949 - Fatally assert when we fail to create an XPCOM log. r=froydnj (9121c52fed) - Remove the workaround added in bug 1022420 now that clang-cl understands __declspec(novtable) (fc81af6630) - Bug 1239888 - Inline PLDHashTable::{Done,Get}(). r=froydnjx. (9faa5b7c2a) - Bug 1244606 - Remove PL_DHASH_FASTCALL. r=froydnj. (6620b7c82e) - Bug 1159306 - explicitly initialize nsBaseHashtableET::mData; r=erahm (458559bea7) - Bug 1220544 - Fix -Wunreachable-code warnings in xpcom. r=mccr8 (371d0809e4) - reapply Bug 833117 - Replace g_slice_set_config() with G_SLICE environmen variable (c47805a6cf) - bug 1171574 - XPCOMGlue doesn't need LEADING_UNDERSCORE for iOS. r=froydnj (a4472ef3d3) --- build/clang-plugin/clang-plugin.cpp | 6 +- .../tests/TestTrivialCtorDtor.cpp | 29 +- dom/base/nsJSEnvironment.cpp | 37 +- dom/base/nsJSEnvironment.h | 4 +- dom/events/EventStateManager.cpp | 9 +- dom/workers/RuntimeService.cpp | 51 +- gfx/layers/apz/src/APZCTreeManager.cpp | 45 +- gfx/layers/apz/src/APZCTreeManager.h | 9 + gfx/layers/apz/src/AsyncPanZoomController.cpp | 60 +- gfx/layers/apz/src/AsyncPanZoomController.h | 12 + .../PotentialCheckerboardDurationTracker.cpp | 30 +- .../PotentialCheckerboardDurationTracker.h | 11 +- gfx/layers/apz/src/WheelScrollAnimation.cpp | 33 +- gfx/layers/apz/src/WheelScrollAnimation.h | 6 +- .../apz/test/gtest/TestScrollHandoff.cpp | 46 + gfx/layers/d3d11/BlendShaderConstants.h | 61 + gfx/layers/d3d11/BlendingHelpers.hlslh | 184 + gfx/layers/d3d11/CompositorD3D11.cpp | 207 +- gfx/layers/d3d11/CompositorD3D11.h | 12 +- gfx/layers/d3d11/CompositorD3D11.hlsl | 216 +- gfx/layers/d3d11/CompositorD3D11Shaders.h | 9568 ++++++++++++----- gfx/layers/d3d11/genshaders.sh | 9 +- gfx/layers/opengl/CompositorOGL.cpp | 56 +- gfx/thebes/gfxPrefs.h | 15 + gfx/thebes/gfxUtils.h | 4 +- js/src/gc/Heap.h | 14 +- .../tests/debug/Debugger-findObjects-11.js | 7 + js/src/jit-test/tests/modules/bug-1245518.js | 15 + js/src/jsfun.cpp | 24 + js/src/jsfun.h | 10 +- js/src/jsgc.cpp | 87 +- js/src/jsgc.h | 5 +- js/src/jsobj.cpp | 70 +- js/src/jsobjinlines.h | 6 +- js/src/jsopcode.cpp | 12 +- js/src/jsopcode.h | 3 +- js/src/vm/MemoryMetrics.cpp | 2 +- js/src/vm/NativeObject.cpp | 63 + js/src/vm/NativeObject.h | 4 + js/src/vm/ScopeObject.cpp | 16 +- js/xpconnect/src/XPCJSRuntime.cpp | 45 +- js/xpconnect/src/nsXPConnect.cpp | 5 +- js/xpconnect/src/xpcprivate.h | 7 +- layout/generic/AsyncScrollBase.cpp | 14 +- layout/reftests/css-blending/reftest.list | 8 +- media/webrtc/signaling/test/FakeLogging.h | 18 + .../signaling/test/jsep_session_unittest.cpp | 1 + .../signaling/test/jsep_track_unittest.cpp | 1 + .../signaling/test/mediaconduit_unittests.cpp | 1 + .../signaling/test/mediapipeline_unittest.cpp | 1 + .../webrtc/signaling/test/sdp_file_parser.cpp | 1 + media/webrtc/signaling/test/sdp_unittests.cpp | 1 + .../signaling/test/signaling_unittests.cpp | 1 + mfbt/Attributes.h | 8 +- modules/libpref/init/all.js | 3 + netwerk/test/NetwerkTestLogging.h | 23 + netwerk/test/TestBlockingSocket.cpp | 2 +- netwerk/test/TestProtocols.cpp | 2 +- netwerk/test/TestServ.cpp | 2 +- netwerk/test/TestStreamLoader.cpp | 2 +- netwerk/test/TestUpload.cpp | 2 +- toolkit/xre/nsAppRunner.cpp | 8 +- widget/InputData.h | 2 +- xpcom/base/CycleCollectedJSRuntime.cpp | 142 +- xpcom/base/CycleCollectedJSRuntime.h | 27 +- xpcom/base/LogModulePrefWatcher.cpp | 90 + xpcom/base/LogModulePrefWatcher.h | 42 + xpcom/base/Logging.cpp | 219 +- xpcom/base/Logging.h | 55 +- xpcom/base/NSPRLogModulesParser.cpp | 54 + xpcom/base/NSPRLogModulesParser.h | 22 + xpcom/base/StaticMutex.h | 2 +- xpcom/base/moz.build | 2 + xpcom/base/nsCycleCollector.cpp | 60 +- xpcom/base/nsIProgrammingLanguage.idl | 26 +- xpcom/base/nsMemoryReporterManager.cpp | 198 +- xpcom/base/nsSystemInfo.cpp | 29 +- xpcom/base/nsTraceRefcnt.cpp | 5 +- xpcom/base/nscore.h | 2 +- xpcom/components/nsComponentManager.cpp | 15 + xpcom/glue/PLDHashTable.cpp | 49 +- xpcom/glue/PLDHashTable.h | 56 +- xpcom/glue/nsBaseHashtable.h | 1 + xpcom/glue/standalone/nsXPCOMGlue.cpp | 11 +- xpcom/libxpcomrt/XPCOMRTStubs.cpp | 6 + xpcom/tests/TestAutoPtr.cpp | 7 +- xpcom/tests/TestBlockingProcess.cpp | 4 +- .../tests/gtest/TestNSPRLogModulesParser.cpp | 89 + xpcom/tests/gtest/TestThreadPool.cpp | 3 + xpcom/tests/gtest/moz.build | 5 + 90 files changed, 9424 insertions(+), 3013 deletions(-) create mode 100644 gfx/layers/d3d11/BlendShaderConstants.h create mode 100644 gfx/layers/d3d11/BlendingHelpers.hlslh create mode 100644 js/src/jit-test/tests/debug/Debugger-findObjects-11.js create mode 100644 js/src/jit-test/tests/modules/bug-1245518.js create mode 100644 media/webrtc/signaling/test/FakeLogging.h create mode 100644 netwerk/test/NetwerkTestLogging.h create mode 100644 xpcom/base/LogModulePrefWatcher.cpp create mode 100644 xpcom/base/LogModulePrefWatcher.h create mode 100644 xpcom/base/NSPRLogModulesParser.cpp create mode 100644 xpcom/base/NSPRLogModulesParser.h create mode 100644 xpcom/tests/gtest/TestNSPRLogModulesParser.cpp diff --git a/build/clang-plugin/clang-plugin.cpp b/build/clang-plugin/clang-plugin.cpp index bc2ce02e0e..83616350fd 100644 --- a/build/clang-plugin/clang-plugin.cpp +++ b/build/clang-plugin/clang-plugin.cpp @@ -1188,7 +1188,11 @@ void DiagnosticsMatcher::TrivialCtorDtorChecker::run( "class %0 must have trivial constructors and destructors"); const CXXRecordDecl *node = Result.Nodes.getNodeAs("node"); - bool badCtor = !node->hasTrivialDefaultConstructor(); + // We need to accept non-constexpr trivial constructors as well. This occurs + // when a struct contains pod members, which will not be initialized. As + // constexpr values are initialized, the constructor is non-constexpr. + bool badCtor = !(node->hasConstexprDefaultConstructor() || + node->hasTrivialDefaultConstructor()); bool badDtor = !node->hasTrivialDestructor(); if (badCtor || badDtor) Diag.Report(node->getLocStart(), errorID) << node; diff --git a/build/clang-plugin/tests/TestTrivialCtorDtor.cpp b/build/clang-plugin/tests/TestTrivialCtorDtor.cpp index 81604c190e..cef06b0acc 100644 --- a/build/clang-plugin/tests/TestTrivialCtorDtor.cpp +++ b/build/clang-plugin/tests/TestTrivialCtorDtor.cpp @@ -5,6 +5,15 @@ struct MOZ_TRIVIAL_CTOR_DTOR EmptyClass{}; template struct MOZ_TRIVIAL_CTOR_DTOR TemplateEmptyClass{}; +struct MOZ_TRIVIAL_CTOR_DTOR NonEmptyClass { + void *m; +}; + +template +struct MOZ_TRIVIAL_CTOR_DTOR TemplateNonEmptyClass { + T* m; +}; + struct MOZ_TRIVIAL_CTOR_DTOR BadUserDefinedCtor { // expected-error {{class 'BadUserDefinedCtor' must have trivial constructors and destructors}} BadUserDefinedCtor() {} }; @@ -17,7 +26,7 @@ struct MOZ_TRIVIAL_CTOR_DTOR BadVirtualDtor { // expected-error {{class 'BadVirt virtual ~BadVirtualDtor() {} }; -struct MOZ_TRIVIAL_CTOR_DTOR BadVirtualMember { // expected-error {{class 'BadVirtualMember' must have trivial constructors and destructors}} +struct MOZ_TRIVIAL_CTOR_DTOR OkVirtualMember { virtual void f(); }; @@ -53,6 +62,22 @@ struct MOZ_TRIVIAL_CTOR_DTOR BadNonTrivialDtorInMember { // expected-error {{cla NonTrivialDtor m; }; -struct MOZ_TRIVIAL_CTOR_DTOR BadVirtualMemberInMember { // expected-error {{class 'BadVirtualMemberInMember' must have trivial constructors and destructors}} +struct MOZ_TRIVIAL_CTOR_DTOR OkVirtualMemberInMember { VirtualMember m; }; + +struct MOZ_TRIVIAL_CTOR_DTOR OkConstExprConstructor { + constexpr OkConstExprConstructor() {} +}; + +struct MOZ_TRIVIAL_CTOR_DTOR OkConstExprConstructorInMember { + OkConstExprConstructor m; +}; + +// XXX: This error is unfortunate, but is unlikely to come up in real code. +// In this situation, it should be possible to define a constexpr constructor +// which explicitly initializes the members. +struct MOZ_TRIVIAL_CTOR_DTOR BadUnfortunateError { // expected-error {{class 'BadUnfortunateError' must have trivial constructors and destructors}} + OkConstExprConstructor m; + void *n; +}; diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 9a917a662d..d1f4f9e610 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -178,6 +178,7 @@ static uint32_t sForgetSkippableBeforeCC = 0; static uint32_t sPreviousSuspectedCount = 0; static uint32_t sCleanupsSinceLastGC = UINT32_MAX; static bool sNeedsFullCC = false; +static bool sNeedsFullGC = false; static bool sNeedsGCAfterCC = false; static bool sIncrementalCC = false; static bool sDidPaintAfterPreviousICCSlice = false; @@ -215,6 +216,13 @@ static bool sIsCompactingOnUserInactive = false; static int32_t sExpensiveCollectorPokes = 0; static const int32_t kPokesBetweenExpensiveCollectorTriggers = 5; +static const char* +ProcessNameForCollectorLog() +{ + return XRE_GetProcessType() == GeckoProcessType_Default ? + "default" : "content"; +} + static PRTime GetCollectionTimeDelta() { @@ -1312,7 +1320,14 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason, } JSGCInvocationKind gckind = aShrinking == ShrinkingGC ? GC_SHRINK : GC_NORMAL; - JS::PrepareForFullGC(sRuntime); + + if (sNeedsFullGC || aReason != JS::gcreason::CC_WAITING) { + sNeedsFullGC = false; + JS::PrepareForFullGC(sRuntime); + } else { + CycleCollectedJSRuntime::Get()->PrepareWaitingZonesForGC(); + } + if (aIncremental == IncrementalGC) { JS::StartIncrementalGC(sRuntime, gckind, aReason, aSliceMillis); } else { @@ -1710,10 +1725,11 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults) } NS_NAMED_MULTILINE_LITERAL_STRING(kFmt, - MOZ_UTF16("CC(T+%.1f) max pause: %lums, total time: %lums, slices: %lu, suspected: %lu, visited: %lu RCed and %lu%s GCed, collected: %lu RCed and %lu GCed (%lu|%lu|%lu waiting for GC)%s\n") + MOZ_UTF16("CC(T+%.1f)[%s] max pause: %lums, total time: %lums, slices: %lu, suspected: %lu, visited: %lu RCed and %lu%s GCed, collected: %lu RCed and %lu GCed (%lu|%lu|%lu waiting for GC)%s\n") MOZ_UTF16("ForgetSkippable %lu times before CC, min: %lu ms, max: %lu ms, avg: %lu ms, total: %lu ms, max sync: %lu ms, removed: %lu")); nsString msg; msg.Adopt(nsTextFormatter::smprintf(kFmt.get(), double(delta) / PR_USEC_PER_SEC, + ProcessNameForCollectorLog(), gCCStats.mMaxSliceTime, gCCStats.mTotalSliceTime, aResults.mNumSlices, gCCStats.mSuspected, aResults.mVisitedRefCounted, aResults.mVisitedGCed, mergeMsg.get(), @@ -2009,6 +2025,8 @@ nsJSContext::RunNextCollectorTimer() void nsJSContext::PokeGC(JS::gcreason::Reason aReason, int aDelay) { + sNeedsFullGC = sNeedsFullGC || aReason != JS::gcreason::CC_WAITING; + if (sGCTimer || sInterSliceGCTimer || sShuttingDown) { // There's already a timer for GC'ing, just return return; @@ -2234,11 +2252,12 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip PRTime delta = GetCollectionTimeDelta(); if (sPostGCEventsToConsole) { - NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) "); + NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f)[%s] "); nsString prefix, gcstats; gcstats.Adopt(aDesc.formatSummaryMessage(aRt)); prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(), - double(delta) / PR_USEC_PER_SEC)); + double(delta) / PR_USEC_PER_SEC, + ProcessNameForCollectorLog())); nsString msg = prefix + gcstats; nsCOMPtr cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID); if (cs) { @@ -2278,13 +2297,10 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip } } else { nsJSContext::KillFullGCTimer(); + } - // Avoid shrinking during heavy activity, which is suggested by - // compartment GC. We don't need to shrink after a shrinking GC as this - // happens automatically in this case. - if (aDesc.invocationKind_ == GC_NORMAL) { - nsJSContext::PokeShrinkGCBuffers(); - } + if (aDesc.invocationKind_ == GC_NORMAL) { + nsJSContext::PokeShrinkGCBuffers(); } if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) { @@ -2380,6 +2396,7 @@ mozilla::dom::StartupJSEnvironment() sLikelyShortLivingObjectsNeedingGC = 0; sPostGCEventsToConsole = false; sNeedsFullCC = false; + sNeedsFullGC = false; sNeedsGCAfterCC = false; gNameSpaceManager = nullptr; sRuntime = nullptr; diff --git a/dom/base/nsJSEnvironment.h b/dom/base/nsJSEnvironment.h index f290f15174..71ab2cc7b1 100644 --- a/dom/base/nsJSEnvironment.h +++ b/dom/base/nsJSEnvironment.h @@ -26,12 +26,12 @@ namespace JS { template class AutoVectorRooter; typedef AutoVectorRooter AutoValueVector; -} +} // namespace JS namespace mozilla { template class Maybe; struct CycleCollectorResults; -} +} // namespace mozilla // The amount of time we wait between a request to GC (due to leaving // a page) and doing the actual GC. diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index be3eee2895..6acdb378ab 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -3145,10 +3145,15 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext, if (pluginFrame) { MOZ_ASSERT(pluginFrame->WantsToHandleWheelEventAsDefaultAction()); action = WheelPrefs::ACTION_SEND_TO_PLUGIN; - } else if (nsLayoutUtils::IsScrollFrameWithSnapping(frameToScroll)) { + } else if (!wheelEvent->mayHaveMomentum && + nsLayoutUtils::IsScrollFrameWithSnapping(frameToScroll)) { // If the target has scroll-snapping points then we want to handle // the wheel event on the main thread even if we have APZ enabled. Do - // so and let the APZ know that it should ignore this event. + // so and let the APZ know that it should ignore this event. However, + // if the wheel event is synthesized from a Mac trackpad or other device + // that can generate additional momentum events, then we should allow + // APZ to handle it, because it will track the velocity and predicted + // destination from the momentum. if (wheelEvent->mFlags.mHandledByAPZ) { wheelEvent->mFlags.mDefaultPrevented = true; } diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 1c483d214c..e2d8833592 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -885,23 +885,10 @@ class WorkerJSRuntime : public mozilla::CycleCollectedJSRuntime public: // The heap size passed here doesn't matter, we will change it later in the // call to JS_SetGCParameter inside CreateJSContextForWorker. - WorkerJSRuntime(JSRuntime* aParentRuntime, WorkerPrivate* aWorkerPrivate) - : CycleCollectedJSRuntime(aParentRuntime, - WORKER_DEFAULT_RUNTIME_HEAPSIZE, - WORKER_DEFAULT_NURSERY_SIZE), - mWorkerPrivate(aWorkerPrivate) + explicit WorkerJSRuntime(WorkerPrivate* aWorkerPrivate) + : mWorkerPrivate(aWorkerPrivate) { - JSRuntime* rt = Runtime(); - MOZ_ASSERT(rt); - - JS_SetRuntimePrivate(rt, new WorkerThreadRuntimePrivate(aWorkerPrivate)); - - js::SetPreserveWrapperCallback(rt, PreserveWrapper); - JS_InitDestroyPrincipalsCallback(rt, DestroyWorkerPrincipals); - JS_SetWrapObjectCallbacks(rt, &WrapObjectCallbacks); - if (aWorkerPrivate->IsDedicatedWorker()) { - JS_SetFutexCanWait(rt); - } + MOZ_ASSERT(aWorkerPrivate); } ~WorkerJSRuntime() @@ -923,6 +910,31 @@ public: mWorkerPrivate = nullptr; } + nsresult Initialize(JSRuntime* aParentRuntime) + { + nsresult rv = + CycleCollectedJSRuntime::Initialize(aParentRuntime, + WORKER_DEFAULT_RUNTIME_HEAPSIZE, + WORKER_DEFAULT_NURSERY_SIZE); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + + JSRuntime* rt = Runtime(); + MOZ_ASSERT(rt); + + JS_SetRuntimePrivate(rt, new WorkerThreadRuntimePrivate(mWorkerPrivate)); + + js::SetPreserveWrapperCallback(rt, PreserveWrapper); + JS_InitDestroyPrincipalsCallback(rt, DestroyWorkerPrincipals); + JS_SetWrapObjectCallbacks(rt, &WrapObjectCallbacks); + if (mWorkerPrivate->IsDedicatedWorker()) { + JS_SetFutexCanWait(rt); + } + + return NS_OK; + } + virtual void PrepareForForgetSkippable() override { @@ -2698,7 +2710,12 @@ WorkerThreadPrimaryRunnable::Run() { nsCycleCollector_startup(); - WorkerJSRuntime runtime(mParentRuntime, mWorkerPrivate); + WorkerJSRuntime runtime(mWorkerPrivate); + nsresult rv = runtime.Initialize(mParentRuntime); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + JSRuntime* rt = runtime.Runtime(); JSContext* cx = CreateJSContextForWorker(mWorkerPrivate, rt); diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 499402b7fa..6b58e22ac6 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -1051,9 +1051,11 @@ APZCTreeManager::ProcessWheelEvent(WidgetWheelEvent& aEvent, uint64_t* aOutInputBlockId) { ScrollWheelInput::ScrollMode scrollMode = ScrollWheelInput::SCROLLMODE_INSTANT; - if ((aEvent.deltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE || - aEvent.deltaMode == nsIDOMWheelEvent::DOM_DELTA_PAGE) && - gfxPrefs::SmoothScrollEnabled() && gfxPrefs::WheelSmoothScrollEnabled()) + if (gfxPrefs::SmoothScrollEnabled() && + ((aEvent.deltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE && + gfxPrefs::WheelSmoothScrollEnabled()) || + (aEvent.deltaMode == nsIDOMWheelEvent::DOM_DELTA_PAGE && + gfxPrefs::PageSmoothScrollEnabled()))) { scrollMode = ScrollWheelInput::SCROLLMODE_SMOOTH; } @@ -1268,6 +1270,16 @@ APZCTreeManager::CancelAnimation(const ScrollableLayerGuid &aGuid) } } +void +APZCTreeManager::AdjustScrollForSurfaceShift(const ScreenPoint& aShift) +{ + MonitorAutoLock lock(mTreeLock); + RefPtr apzc = FindRootContentOrRootApzc(); + if (apzc) { + apzc->AdjustScrollForSurfaceShift(aShift); + } +} + void APZCTreeManager::ClearTree() { @@ -1735,6 +1747,33 @@ APZCTreeManager::FindRootContentApzcForLayersId(uint64_t aLayersId) const return resultNode ? resultNode->GetApzc() : nullptr; } +AsyncPanZoomController* +APZCTreeManager::FindRootContentOrRootApzc() const +{ + mTreeLock.AssertCurrentThreadOwns(); + + // Note: this is intended to find the same "root" that would be found + // by AsyncCompositionManager::ApplyAsyncContentTransformToTree inside + // the MOZ_ANDROID_APZ block. That is, it should find the RCD node if there + // is one, or the root APZC if there is not. + // Since BreadthFirstSearch is a pre-order search, we first do a search for + // the RCD, and then if we don't find one, we do a search for the root APZC. + HitTestingTreeNode* resultNode = BreadthFirstSearch(mRootNode.get(), + [](HitTestingTreeNode* aNode) { + AsyncPanZoomController* apzc = aNode->GetApzc(); + return apzc && apzc->IsRootContent(); + }); + if (resultNode) { + return resultNode->GetApzc(); + } + resultNode = BreadthFirstSearch(mRootNode.get(), + [](HitTestingTreeNode* aNode) { + AsyncPanZoomController* apzc = aNode->GetApzc(); + return (apzc != nullptr); + }); + return resultNode ? resultNode->GetApzc() : nullptr; +} + /* The methods GetScreenToApzcTransform() and GetApzcToGeckoTransform() return some useful transformations that input events may need applied. This is best illustrated with an example. Consider a chain of layers, L, M, N, O, P, Q, R. Layer L diff --git a/gfx/layers/apz/src/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h index d0227aa28b..56e70ead86 100644 --- a/gfx/layers/apz/src/APZCTreeManager.h +++ b/gfx/layers/apz/src/APZCTreeManager.h @@ -261,6 +261,14 @@ public: */ void CancelAnimation(const ScrollableLayerGuid &aGuid); + /** + * Adjusts the root APZC to compensate for a shift in the surface. See the + * documentation on AsyncPanZoomController::AdjustScrollForSurfaceShift for + * some more details. This is only currently needed due to surface shifts + * caused by the dynamic toolbar on Android. + */ + void AdjustScrollForSurfaceShift(const ScreenPoint& aShift); + /** * Calls Destroy() on all APZC instances attached to the tree, and resets the * tree back to empty. This function may be called multiple times during the @@ -450,6 +458,7 @@ private: HitTestResult* aOutHitResult); AsyncPanZoomController* FindRootApzcForLayersId(uint64_t aLayersId) const; AsyncPanZoomController* FindRootContentApzcForLayersId(uint64_t aLayersId) const; + AsyncPanZoomController* FindRootContentOrRootApzc() const; already_AddRefed GetMultitouchTarget(AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const; already_AddRefed CommonAncestor(AsyncPanZoomController* aApzc1, AsyncPanZoomController* aApzc2) const; already_AddRefed GetTouchInputBlockAPZC(const MultiTouchInput& aEvent, diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index e41e6b1477..002fa13ae3 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -1818,8 +1818,7 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(const ScrollWheelInput& aEve nsPoint initialPosition = CSSPoint::ToAppUnits(mFrameMetrics.GetScrollOffset()); StartAnimation(new WheelScrollAnimation( - *this, - initialPosition)); + *this, initialPosition, aEvent.mDeltaType)); } nsPoint deltaInAppUnits = @@ -1998,6 +1997,7 @@ nsEventStatus AsyncPanZoomController::OnPanMomentumStart(const PanGestureInput& } SetState(PAN_MOMENTUM); + RequestSnapToDestination(); // Call into OnPan in order to process any delta included in this event. OnPan(aEvent, false); @@ -2407,15 +2407,22 @@ void AsyncPanZoomController::OverscrollBy(ParentLayerPoint& aOverscroll) { // scroll to begin with. bool xCanScroll = mX.CanScroll(); bool yCanScroll = mY.CanScroll(); - bool xConsumed = FuzzyEqualsAdditive(aOverscroll.x, 0.0f, COORDINATE_EPSILON); + bool yConsumed = FuzzyEqualsAdditive(aOverscroll.y, 0.0f, COORDINATE_EPSILON); + +#if defined(MOZ_ANDROID_APZ) + RefPtr controller = GetGeckoContentController(); + if (controller && ((xCanScroll && !xConsumed) || (yCanScroll && !yConsumed))) { + controller->UpdateOverscrollOffset(aOverscroll.x, aOverscroll.y); + aOverscroll.x = aOverscroll.y = 0.0f; + } +#else if (xCanScroll && !xConsumed) { mX.OverscrollBy(aOverscroll.x); aOverscroll.x = 0; xConsumed = true; } - bool yConsumed = FuzzyEqualsAdditive(aOverscroll.y, 0.0f, COORDINATE_EPSILON); if (yCanScroll && !yConsumed) { mY.OverscrollBy(aOverscroll.y); aOverscroll.y = 0; @@ -2425,6 +2432,7 @@ void AsyncPanZoomController::OverscrollBy(ParentLayerPoint& aOverscroll) { if ((xCanScroll && xConsumed) || (yCanScroll && yConsumed)) { ScheduleComposite(); } +#endif } RefPtr AsyncPanZoomController::BuildOverscrollHandoffChain() { @@ -2459,6 +2467,14 @@ void AsyncPanZoomController::AcceptFling(FlingHandoffState& aHandoffState) { aHandoffState.mChain, !aHandoffState.mIsHandoff, // only apply acceleration if this is an initial fling aHandoffState.mScrolledApzc); + RequestSnapToDestination(); + StartAnimation(fling); +} + +void +AsyncPanZoomController::RequestSnapToDestination() +{ + ReentrantMonitorAutoEnter lock(mMonitor); float friction = gfxPrefs::APZFlingFriction(); ParentLayerPoint velocity(mX.GetVelocity(), mY.GetVelocity()); @@ -2492,8 +2508,6 @@ void AsyncPanZoomController::AcceptFling(FlingHandoffState& aHandoffState) { predictedDestination); } } - - StartAnimation(fling); } bool AsyncPanZoomController::AttemptFling(FlingHandoffState& aHandoffState) { @@ -2517,7 +2531,14 @@ void AsyncPanZoomController::HandleFlingOverscroll(const ParentLayerPoint& aVelo aScrolledApzc}; treeManagerLocal->DispatchFling(this, handoffState); if (!IsZero(handoffState.mVelocity) && IsPannable() && gfxPrefs::APZOverscrollEnabled()) { +#if defined(MOZ_ANDROID_APZ) + RefPtr controller = GetGeckoContentController(); + if (controller) { + controller->UpdateOverscrollVelocity(handoffState.mVelocity.x, handoffState.mVelocity.y); + } +#else StartOverscrollAnimation(handoffState.mVelocity); +#endif } } } @@ -2648,6 +2669,19 @@ void AsyncPanZoomController::ShareFrameMetricsAcrossProcesses() { mSharingFrameMetricsAcrossProcesses = true; } +void AsyncPanZoomController::AdjustScrollForSurfaceShift(const ScreenPoint& aShift) +{ + ReentrantMonitorAutoEnter lock(mMonitor); + CSSPoint adjustment = + ViewAs(aShift, PixelCastJustification::ScreenIsParentLayerForRoot) + / mFrameMetrics.GetZoom(); + APZC_LOG("%p adjusting scroll position by %s for surface shift\n", + this, Stringify(adjustment).c_str()); + mFrameMetrics.ScrollBy(adjustment); + ScheduleCompositeAndMaybeRepaint(); + UpdateSharedCompositorFrameMetrics(); +} + void AsyncPanZoomController::ScrollBy(const CSSPoint& aOffset) { mFrameMetrics.ScrollBy(aOffset); } @@ -2757,7 +2791,7 @@ const ScreenMargin AsyncPanZoomController::CalculatePendingDisplayPort( APZC_LOG_FM(aFrameMetrics, "Calculated displayport as (%f %f %f %f) from velocity %s paint time %f metrics", displayPort.x, displayPort.y, displayPort.width, displayPort.height, - ToString(aVelocity).c_str(), (float)estimatedPaintDurationMillis); + ToString(aVelocity).c_str(), paintFactor); CSSMargin cssMargins; cssMargins.left = -displayPort.x; @@ -2883,6 +2917,7 @@ AsyncPanZoomController::RequestContentRepaint(const FrameMetrics& aFrameMetrics, aFrameMetrics.GetScrollOffset().x) < EPSILON && fabsf(mLastPaintRequestMetrics.GetScrollOffset().y - aFrameMetrics.GetScrollOffset().y) < EPSILON && + aFrameMetrics.GetPresShellResolution() == mLastPaintRequestMetrics.GetPresShellResolution() && aFrameMetrics.GetZoom() == mLastPaintRequestMetrics.GetZoom() && fabsf(aFrameMetrics.GetViewport().width - mLastPaintRequestMetrics.GetViewport().width) < EPSILON && @@ -3148,6 +3183,7 @@ AsyncPanZoomController::ReportCheckerboard(const TimeStamp& aSampleTime) if (!mCheckerboardEvent && (recordTrace || forTelemetry)) { mCheckerboardEvent = MakeUnique(recordTrace); } + mPotentialCheckerboardTracker.InTransform(IsTransformingState(mState)); if (magnitude) { mPotentialCheckerboardTracker.CheckerboardSeen(); } @@ -3313,6 +3349,9 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri / mFrameMetrics.GetCumulativeResolution(); float presShellResolutionChange = aLayerMetrics.GetPresShellResolution() / mFrameMetrics.GetPresShellResolution(); + if (presShellResolutionChange != 1.0f) { + needContentRepaint = true; + } mFrameMetrics.ZoomBy(totalResolutionChange / presShellResolutionChange); } else { // Take the new zoom as either device scale or composition width or @@ -3585,6 +3624,11 @@ AsyncPanZoomController::ResetTouchInputState() listener->HandleInputEvent(cancel); } CancelAnimationAndGestureState(); + // Clear overscroll along the entire handoff chain, in case an APZC + // later in the chain is overscrolled. + if (TouchBlockState* block = CurrentTouchBlock()) { + block->GetOverscrollHandoffChain()->ClearOverscroll(); + } } void @@ -3628,7 +3672,6 @@ void AsyncPanZoomController::DispatchStateChangeNotification(PanZoomState aOldSt if (RefPtr controller = GetGeckoContentController()) { if (!IsTransformingState(aOldState) && IsTransformingState(aNewState)) { - mPotentialCheckerboardTracker.TransformStarted(); controller->NotifyAPZStateChange( GetGuid(), APZStateChange::TransformBegin); #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) @@ -3639,7 +3682,6 @@ void AsyncPanZoomController::DispatchStateChangeNotification(PanZoomState aOldSt } #endif } else if (IsTransformingState(aOldState) && !IsTransformingState(aNewState)) { - mPotentialCheckerboardTracker.TransformStopped(); controller->NotifyAPZStateChange( GetGuid(), APZStateChange::TransformEnd); #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) diff --git a/gfx/layers/apz/src/AsyncPanZoomController.h b/gfx/layers/apz/src/AsyncPanZoomController.h index 2f87004411..5f2d0af6e1 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.h +++ b/gfx/layers/apz/src/AsyncPanZoomController.h @@ -315,6 +315,15 @@ public: */ void CancelAnimation(CancelAnimationFlags aFlags = Default); + /** + * Adjusts the scroll position to compensate for a shift in the surface, such + * that the content appears to remain visually in the same position. i.e. if + * the surface moves up by 10 screenpixels, the scroll position should also + * move up by 10 pixels so that what used to be at the top of the surface is + * now 10 pixels down the surface. + */ + void AdjustScrollForSurfaceShift(const ScreenPoint& aShift); + /** * Clear any overscroll on this APZC. */ @@ -636,6 +645,9 @@ protected: // to a nearby snap position if appropriate. The current scroll position is // used as the final destination. void RequestSnap(); + // Same as above, but takes into account the current velocity to find a + // predicted destination. + void RequestSnapToDestination(); uint64_t mLayersId; RefPtr mCompositorParent; diff --git a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp index 0f9a1d32d8..c83b9f45c2 100644 --- a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp +++ b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.cpp @@ -40,21 +40,29 @@ PotentialCheckerboardDurationTracker::CheckerboardDone() } void -PotentialCheckerboardDurationTracker::TransformStarted() +PotentialCheckerboardDurationTracker::InTransform(bool aInTransform) { - MOZ_ASSERT(!mInTransform); - if (!Tracking()) { - mCurrentPeriodStart = TimeStamp::Now(); + if (aInTransform == mInTransform) { + // no-op + return; } - mInTransform = true; -} -void -PotentialCheckerboardDurationTracker::TransformStopped() -{ - MOZ_ASSERT(mInTransform); - mInTransform = false; if (!Tracking()) { + // Because !Tracking(), mInTransform must be false, and so aInTransform + // must be true (or we would have early-exited this function already). + // Therefore, we are starting a potential checkerboard period. + mInTransform = aInTransform; + mCurrentPeriodStart = TimeStamp::Now(); + return; + } + + mInTransform = aInTransform; + + if (!Tracking()) { + // Tracking() must have been true at the start of this function, or we + // would have taken the other !Tracking branch above. If it's false now, + // it means we just stopped tracking, so we are ending a potential + // checkerboard period. mozilla::Telemetry::AccumulateTimeDelta( mozilla::Telemetry::CHECKERBOARD_POTENTIAL_DURATION, mCurrentPeriodStart); diff --git a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h index b6bd3ea882..6154003ad6 100644 --- a/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h +++ b/gfx/layers/apz/src/PotentialCheckerboardDurationTracker.h @@ -39,15 +39,10 @@ public: void CheckerboardDone(); /** - * This should be called when a transform is started. Calls to this must be - * interleaved with calls to TransformStopped(). + * This should be called at composition time, to indicate if the APZC is in + * a transforming state or not. */ - void TransformStarted(); - /** - * This should be called when a transform is stopped. Calls to this must be - * interleaved with calls to TransformStarted(). - */ - void TransformStopped(); + void InTransform(bool aInTransform); private: bool Tracking() const; diff --git a/gfx/layers/apz/src/WheelScrollAnimation.cpp b/gfx/layers/apz/src/WheelScrollAnimation.cpp index 7f08161407..93028878b4 100644 --- a/gfx/layers/apz/src/WheelScrollAnimation.cpp +++ b/gfx/layers/apz/src/WheelScrollAnimation.cpp @@ -13,10 +13,13 @@ namespace mozilla { namespace layers { -WheelScrollAnimation::WheelScrollAnimation(AsyncPanZoomController& aApzc, const nsPoint& aInitialPosition) +WheelScrollAnimation::WheelScrollAnimation(AsyncPanZoomController& aApzc, + const nsPoint& aInitialPosition, + ScrollWheelInput::ScrollDeltaType aDeltaType) : AsyncScrollBase(aInitialPosition) , mApzc(aApzc) , mFinalDestination(aInitialPosition) + , mDeltaType(aDeltaType) { } @@ -52,6 +55,14 @@ WheelScrollAnimation::DoSample(FrameMetrics& aFrameMetrics, const TimeDuration& ParentLayerPoint displacement = (CSSPoint::FromAppUnits(sampledDest) - aFrameMetrics.GetScrollOffset()) * zoom; + if (!IsZero(displacement)) { + // Velocity is measured in ParentLayerCoords / Milliseconds + float xVelocity = displacement.x / aDelta.ToMilliseconds(); + float yVelocity = displacement.y / aDelta.ToMilliseconds(); + mApzc.mX.SetVelocity(xVelocity); + mApzc.mY.SetVelocity(yVelocity); + } + // Note: we ignore overscroll for wheel animations. ParentLayerPoint adjustedOffset, overscroll; mApzc.mX.AdjustDisplacement(displacement.x, adjustedOffset.x, overscroll.x); @@ -78,10 +89,24 @@ WheelScrollAnimation::InitPreferences(TimeStamp aTime) return; } - mOriginMaxMS = clamped(gfxPrefs::WheelSmoothScrollMaxDurationMs(), 0, 10000); - mOriginMinMS = clamped(gfxPrefs::WheelSmoothScrollMinDurationMs(), 0, mOriginMaxMS); + switch (mDeltaType) { + case ScrollWheelInput::SCROLLDELTA_PAGE: + mOriginMaxMS = clamped(gfxPrefs::PageSmoothScrollMaxDurationMs(), 0, 10000); + mOriginMinMS = clamped(gfxPrefs::PageSmoothScrollMinDurationMs(), 0, mOriginMaxMS); + break; + case ScrollWheelInput::SCROLLDELTA_PIXEL: + mOriginMaxMS = clamped(gfxPrefs::PixelSmoothScrollMaxDurationMs(), 0, 10000); + mOriginMinMS = clamped(gfxPrefs::PixelSmoothScrollMinDurationMs(), 0, mOriginMaxMS); + break; + case ScrollWheelInput::SCROLLDELTA_LINE: + default: + mOriginMaxMS = clamped(gfxPrefs::WheelSmoothScrollMaxDurationMs(), 0, 10000); + mOriginMinMS = clamped(gfxPrefs::WheelSmoothScrollMinDurationMs(), 0, mOriginMaxMS); + break; + } - mIntervalRatio = (gfxPrefs::SmoothScrollDurationToIntervalRatio() * 100) / 100.0; + // The pref is 100-based int percentage, while mIntervalRatio is 1-based ratio + mIntervalRatio = ((double)gfxPrefs::SmoothScrollDurationToIntervalRatio()) / 100.0; mIntervalRatio = std::max(1.0, mIntervalRatio); InitializeHistory(aTime); diff --git a/gfx/layers/apz/src/WheelScrollAnimation.h b/gfx/layers/apz/src/WheelScrollAnimation.h index 1d963d1cfa..c7221c3b61 100644 --- a/gfx/layers/apz/src/WheelScrollAnimation.h +++ b/gfx/layers/apz/src/WheelScrollAnimation.h @@ -11,6 +11,7 @@ #include "AsyncPanZoomController.h" #include "AsyncScrollBase.h" #include "gfxPrefs.h" +#include "InputData.h" namespace mozilla { namespace layers { @@ -22,7 +23,9 @@ class WheelScrollAnimation public AsyncScrollBase { public: - WheelScrollAnimation(AsyncPanZoomController& aApzc, const nsPoint& aInitialPosition); + WheelScrollAnimation(AsyncPanZoomController& aApzc, + const nsPoint& aInitialPosition, + ScrollWheelInput::ScrollDeltaType aDeltaType); bool DoSample(FrameMetrics& aFrameMetrics, const TimeDuration& aDelta) override; void Update(TimeStamp aTime, nsPoint aDelta, const nsSize& aCurrentVelocity); @@ -37,6 +40,7 @@ private: private: AsyncPanZoomController& mApzc; nsPoint mFinalDestination; + ScrollWheelInput::ScrollDeltaType mDeltaType; }; } // namespace layers diff --git a/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp b/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp index 4fa9b26ccc..d1b58eb56f 100644 --- a/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp +++ b/gfx/layers/apz/test/gtest/TestScrollHandoff.cpp @@ -26,6 +26,7 @@ protected: registration = MakeUnique(manager, 0, root, mcc); manager->UpdateHitTestingTree(nullptr, root, false, 0, 0); rootApzc = ApzcOf(root); + rootApzc->GetFrameMetrics().SetIsRootContent(true); // make root APZC zoomable } void CreateScrollHandoffLayerTree2() { @@ -306,6 +307,51 @@ TEST_F(APZScrollHandoffTester, StuckInOverscroll_Bug1240202a) { EXPECT_FALSE(rootApzc->IsOverscrolled()); } +TEST_F(APZScrollHandoffTester, StuckInOverscroll_Bug1240202b) { + // Enable overscrolling. + SCOPED_GFX_PREF(APZOverscrollEnabled, bool, true); + + CreateScrollHandoffLayerTree1(); + + TestAsyncPanZoomController* child = ApzcOf(layers[1]); + + // Pan, causing the parent APZC to overscroll. + Pan(manager, mcc, 60, 90, true /* keep finger down */); + EXPECT_FALSE(child->IsOverscrolled()); + EXPECT_TRUE(rootApzc->IsOverscrolled()); + + // Lift the finger, triggering an overscroll animation + // (but don't allow it to run). + TouchUp(manager, ScreenIntPoint(10, 90), mcc->Time()); + + // Put the finger down again, interrupting the animation + // and entering the TOUCHING state. + TouchDown(manager, ScreenIntPoint(10, 90), mcc->Time()); + + // Put a second finger down. Since we're in the TOUCHING state, + // the "are we panned into overscroll" check will fail and we + // will not ignore the second finger, instead entering the + // PINCHING state. + MultiTouchInput secondFingerDown(MultiTouchInput::MULTITOUCH_START, 0, TimeStamp(), 0); + // Use the same touch identifier for the first touch (0) as TouchDown(). (A bit hacky.) + secondFingerDown.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(10, 90), ScreenSize(0, 0), 0, 0)); + secondFingerDown.mTouches.AppendElement(SingleTouchData(1, ScreenIntPoint(10, 80), ScreenSize(0, 0), 0, 0)); + manager->ReceiveInputEvent(secondFingerDown, nullptr, nullptr); + + // Release the fingers. + MultiTouchInput fingersUp = secondFingerDown; + fingersUp.mType = MultiTouchInput::MULTITOUCH_END; + manager->ReceiveInputEvent(fingersUp, nullptr, nullptr); + + // Allow any animations to run their course. + child->AdvanceAnimationsUntilEnd(); + rootApzc->AdvanceAnimationsUntilEnd(); + + // Make sure nothing is overscrolled. + EXPECT_FALSE(child->IsOverscrolled()); + EXPECT_FALSE(rootApzc->IsOverscrolled()); +} + // Test that flinging in a direction where one component of the fling goes into // overscroll but the other doesn't, results in just the one component being // handed off to the parent, while the original APZC continues flinging in the diff --git a/gfx/layers/d3d11/BlendShaderConstants.h b/gfx/layers/d3d11/BlendShaderConstants.h new file mode 100644 index 0000000000..b548e6e7ef --- /dev/null +++ b/gfx/layers/d3d11/BlendShaderConstants.h @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef MOZILLA_GFX_LAYERS_D3D11_BLENDSHADERCONSTANTS_H_ +#define MOZILLA_GFX_LAYERS_D3D11_BLENDSHADERCONSTANTS_H_ + +// These constants are shared between CompositorD3D11 and the blend pixel shader. +#define PS_LAYER_RGB 0 +#define PS_LAYER_RGBA 1 +#define PS_LAYER_YCBCR 2 +#define PS_LAYER_COLOR 3 + +// These must be in the same order as the Mask enum. +#define PS_MASK_NONE 0 +#define PS_MASK_2D 1 +#define PS_MASK_3D 2 + +// These must be in the same order as CompositionOp. +#define PS_BLEND_MULTIPLY 0 +#define PS_BLEND_SCREEN 1 +#define PS_BLEND_OVERLAY 2 +#define PS_BLEND_DARKEN 3 +#define PS_BLEND_LIGHTEN 4 +#define PS_BLEND_COLOR_DODGE 5 +#define PS_BLEND_COLOR_BURN 6 +#define PS_BLEND_HARD_LIGHT 7 +#define PS_BLEND_SOFT_LIGHT 8 +#define PS_BLEND_DIFFERENCE 9 +#define PS_BLEND_EXCLUSION 10 +#define PS_BLEND_HUE 11 +#define PS_BLEND_SATURATION 12 +#define PS_BLEND_COLOR 13 +#define PS_BLEND_LUMINOSITY 14 + +#if defined(__cplusplus) +namespace mozilla { +namespace layers { + +static inline int +BlendOpToShaderConstant(gfx::CompositionOp aOp) { + return int(aOp) - int(gfx::CompositionOp::OP_MULTIPLY); +} + +} // namespace layers +} // namespace mozilla + +// Sanity checks. +namespace { +static inline void BlendShaderConstantAsserts() { + static_assert(PS_MASK_NONE == int(mozilla::layers::MaskType::MaskNone), "shader constant is out of sync"); + static_assert(PS_MASK_2D == int(mozilla::layers::MaskType::Mask2d), "shader constant is out of sync"); + static_assert(PS_MASK_3D == int(mozilla::layers::MaskType::Mask3d), "shader constant is out of sync"); + static_assert(int(mozilla::gfx::CompositionOp::OP_LUMINOSITY) - int(mozilla::gfx::CompositionOp::OP_MULTIPLY) == 14, + "shader constants are out of sync"); +} +} // anonymous namespace +#endif + +#endif // MOZILLA_GFX_LAYERS_D3D11_BLENDSHADERCONSTANTS_H_ diff --git a/gfx/layers/d3d11/BlendingHelpers.hlslh b/gfx/layers/d3d11/BlendingHelpers.hlslh new file mode 100644 index 0000000000..57d27b23b2 --- /dev/null +++ b/gfx/layers/d3d11/BlendingHelpers.hlslh @@ -0,0 +1,184 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// Helper functions. +float hardlight(float dest, float src) { + if (src <= 0.5) { + return dest * (2.0 * src); + } else { + // Note: we substitute (2*src-1) into the screen formula below. + return 2.0 * dest + 2.0 * src - 1.0 - 2.0 * dest * src; + } +} + +float dodge(float dest, float src) { + if (dest == 0.0) { + return 0.0; + } else if (src == 1.0) { + return 1.0; + } else { + return min(1.0, dest / (1.0 - src)); + } +} + +float burn(float dest, float src) { + if (dest == 1.0) { + return 1.0; + } else if (src == 0.0) { + return 0.0; + } else { + return 1.0 - min(1.0, (1.0 - dest) / src); + } +} + +float darken(float dest) { + if (dest <= 0.25) { + return ((16.0 * dest - 12.0) * dest + 4.0) * dest; + } else { + return sqrt(dest); + } +} + +float softlight(float dest, float src) { + if (src <= 0.5) { + return dest - (1.0 - 2.0 * src) * dest * (1.0 - dest); + } else { + return dest + (2.0 * src - 1.0) * (darken(dest) - dest); + } +} + +float Lum(float3 c) { + return dot(float3(0.3, 0.59, 0.11), c); +} + +float3 ClipColor(float3 c) { + float L = Lum(c); + float n = min(min(c.r, c.g), c.b); + float x = max(max(c.r, c.g), c.b); + if (n < 0.0) { + c = L + (((c - L) * L) / (L - n)); + } + if (x > 1.0) { + c = L + (((c - L) * (1.0 - L)) / (x - L)); + } + return c; +} + +float3 SetLum(float3 c, float L) { + float d = L - Lum(c); + return ClipColor(float3( + c.r + d, + c.g + d, + c.b + d)); +} + +float Sat(float3 c) { + return max(max(c.r, c.g), c.b) - min(min(c.r, c.g), c.b); +} + +// To use this helper, re-arrange rgb such that r=min, g=mid, and b=max. +float3 SetSatInner(float3 c, float s) { + if (c.b > c.r) { + c.g = (((c.g - c.r) * s) / (c.b - c.r)); + c.b = s; + } else { + c.gb = float2(0.0, 0.0); + } + return float3(0.0, c.g, c.b); +} + +float3 SetSat(float3 c, float s) { + if (c.r <= c.g) { + if (c.g <= c.b) { + c.rgb = SetSatInner(c.rgb, s); + } else if (c.r <= c.b) { + c.rbg = SetSatInner(c.rbg, s); + } else { + c.brg = SetSatInner(c.brg, s); + } + } else if (c.r <= c.b) { + c.grb = SetSatInner(c.grb, s); + } else if (c.g <= c.b) { + c.gbr = SetSatInner(c.gbr, s); + } else { + c.bgr = SetSatInner(c.bgr, s); + } + return c; +} + +float3 BlendMultiply(float3 dest, float3 src) { + return dest * src; +} + +float3 BlendScreen(float3 dest, float3 src) { + return dest + src - (dest * src); +} + +float3 BlendOverlay(float3 dest, float3 src) { + return float3( + hardlight(src.r, dest.r), + hardlight(src.g, dest.g), + hardlight(src.b, dest.b)); +} + +float3 BlendDarken(float3 dest, float3 src) { + return min(dest, src); +} + +float3 BlendLighten(float3 dest, float3 src) { + return max(dest, src); +} + +float3 BlendColorDodge(float3 dest, float3 src) { + return float3( + dodge(dest.r, src.r), + dodge(dest.g, src.g), + dodge(dest.b, src.b)); +} + +float3 BlendColorBurn(float3 dest, float3 src) { + return float3( + burn(dest.r, src.r), + burn(dest.g, src.g), + burn(dest.b, src.b)); +} + +float3 BlendHardLight(float3 dest, float3 src) { + return float3( + hardlight(dest.r, src.r), + hardlight(dest.g, src.g), + hardlight(dest.b, src.b)); +} + +float3 BlendSoftLight(float3 dest, float3 src) { + return float3( + softlight(dest.r, src.r), + softlight(dest.g, src.g), + softlight(dest.b, src.b)); +} + +float3 BlendDifference(float3 dest, float3 src) { + return abs(dest - src); +} + +float3 BlendExclusion(float3 dest, float3 src) { + return dest + src - 2.0 * dest * src; +} + +float3 BlendHue(float3 dest, float3 src) { + return SetLum(SetSat(src, Sat(dest)), Lum(dest)); +} + +float3 BlendSaturation(float3 dest, float3 src) { + return SetLum(SetSat(dest, Sat(src)), Lum(dest)); +} + +float3 BlendColor(float3 dest, float3 src) { + return SetLum(src, Lum(dest)); +} + +float3 BlendLuminosity(float3 dest, float3 src) { + return SetLum(dest, Lum(src)); +} diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp index da6cc7c796..c0ff800baa 100644 --- a/gfx/layers/d3d11/CompositorD3D11.cpp +++ b/gfx/layers/d3d11/CompositorD3D11.cpp @@ -24,6 +24,7 @@ #include "mozilla/EnumeratedArray.h" #include "mozilla/Telemetry.h" +#include "BlendShaderConstants.h" #include @@ -47,6 +48,16 @@ static const GUID sLayerManagerCount = const FLOAT sBlendFactor[] = { 0, 0, 0, 0 }; +namespace TexSlot { + static const int RGB = 0; + static const int Y = 1; + static const int Cb = 2; + static const int Cr = 3; + static const int RGBWhite = 4; + static const int Mask = 5; + static const int Backdrop = 6; +} + struct DeviceAttachmentsD3D11 { DeviceAttachmentsD3D11(ID3D11Device* device) @@ -67,11 +78,13 @@ struct DeviceAttachmentsD3D11 RefPtr mVertexBuffer; VertexShaderArray mVSQuadShader; + VertexShaderArray mVSQuadBlendShader; PixelShaderArray mSolidColorShader; PixelShaderArray mRGBAShader; PixelShaderArray mRGBShader; PixelShaderArray mYCbCrShader; PixelShaderArray mComponentAlphaShader; + PixelShaderArray mBlendShader; RefPtr mPSConstantBuffer; RefPtr mVSConstantBuffer; RefPtr mRasterizerState; @@ -447,6 +460,11 @@ CompositorD3D11::GetTextureFactoryIdentifier() ident.mParentProcessId = XRE_GetProcessType(); ident.mParentBackend = LayersBackend::LAYERS_D3D11; ident.mSyncHandle = mAttachments->mSyncHandle; + for (uint8_t op = 0; op < uint8_t(gfx::CompositionOp::OP_COUNT); op++) { + if (BlendOpIsMixBlendMode(gfx::CompositionOp(op))) { + ident.mSupportedBlendModes += gfx::CompositionOp(op); + } + } return ident; } @@ -503,10 +521,10 @@ CompositorD3D11::CreateRenderTarget(const gfx::IntRect& aRect, return rt.forget(); } -already_AddRefed -CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, - const CompositingRenderTarget* aSource, - const gfx::IntPoint &aSourcePoint) +RefPtr +CompositorD3D11::CreateTexture(const gfx::IntRect& aRect, + const CompositingRenderTarget* aSource, + const gfx::IntPoint& aSourcePoint) { MOZ_ASSERT(aRect.width != 0 && aRect.height != 0); @@ -524,7 +542,7 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, RefPtr texture; HRESULT hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture)); - NS_ASSERTION(texture, "Could not create texture"); + if (FAILED(hr) || !texture) { gfxCriticalNote << "Failed in CreateRenderTargetFromSource " << hexa(hr); HandleError(hr); @@ -559,6 +577,19 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, } } + return texture; +} + +already_AddRefed +CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, + const CompositingRenderTarget* aSource, + const gfx::IntPoint &aSourcePoint) +{ + RefPtr texture = CreateTexture(aRect, aSource, aSourcePoint); + if (!texture) { + return nullptr; + } + RefPtr rt = new CompositingRenderTargetD3D11(texture, aRect.TopLeft()); rt->SetSize(aRect.Size()); @@ -566,6 +597,29 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, return rt.forget(); } +bool +CompositorD3D11::CopyBackdrop(const gfx::IntRect& aRect, + RefPtr* aOutTexture, + RefPtr* aOutView) +{ + RefPtr texture = CreateTexture(aRect, mCurrentRT, aRect.TopLeft()); + if (!texture) { + return false; + } + + CD3D11_SHADER_RESOURCE_VIEW_DESC desc(D3D11_SRV_DIMENSION_TEXTURE2D, DXGI_FORMAT_B8G8R8A8_UNORM); + + RefPtr srv; + HRESULT hr = mDevice->CreateShaderResourceView(texture, &desc, getter_AddRefs(srv)); + if (FAILED(hr) || !srv) { + return false; + } + + *aOutTexture = texture.forget(); + *aOutView = srv.forget(); + return true; +} + void CompositorD3D11::SetRenderTarget(CompositingRenderTarget* aRenderTarget) { @@ -588,30 +642,27 @@ CompositorD3D11::SetRenderTarget(CompositingRenderTarget* aRenderTarget) } } -void -CompositorD3D11::SetPSForEffect(Effect* aEffect, MaskType aMaskType, gfx::SurfaceFormat aFormat) +ID3D11PixelShader* +CompositorD3D11::GetPSForEffect(Effect* aEffect, MaskType aMaskType) { switch (aEffect->mType) { case EffectTypes::SOLID_COLOR: - mContext->PSSetShader(mAttachments->mSolidColorShader[aMaskType], nullptr, 0); - return; + return mAttachments->mSolidColorShader[aMaskType]; case EffectTypes::RENDER_TARGET: - mContext->PSSetShader(mAttachments->mRGBAShader[aMaskType], nullptr, 0); - return; - case EffectTypes::RGB: - mContext->PSSetShader((aFormat == SurfaceFormat::B8G8R8A8 || aFormat == SurfaceFormat::R8G8B8A8) - ? mAttachments->mRGBAShader[aMaskType] - : mAttachments->mRGBShader[aMaskType], nullptr, 0); - return; + return mAttachments->mRGBAShader[aMaskType]; + case EffectTypes::RGB: { + SurfaceFormat format = static_cast(aEffect)->mTexture->GetFormat(); + return (format == SurfaceFormat::B8G8R8A8 || format == SurfaceFormat::R8G8B8A8) + ? mAttachments->mRGBAShader[aMaskType] + : mAttachments->mRGBShader[aMaskType]; + } case EffectTypes::YCBCR: - mContext->PSSetShader(mAttachments->mYCbCrShader[aMaskType], nullptr, 0); - return; + return mAttachments->mYCbCrShader[aMaskType]; case EffectTypes::COMPONENT_ALPHA: - mContext->PSSetShader(mAttachments->mComponentAlphaShader[aMaskType], nullptr, 0); - return; + return mAttachments->mComponentAlphaShader[aMaskType]; default: NS_WARNING("No shader to load"); - return; + return nullptr; } } @@ -798,6 +849,37 @@ CompositorD3D11::DrawVRDistortion(const gfx::Rect& aRect, mContext->IASetInputLayout(mAttachments->mInputLayout); } +static inline bool +EffectHasPremultipliedAlpha(Effect* aEffect) +{ + if (aEffect->mType == EffectTypes::RGB) { + return static_cast(aEffect)->mPremultiplied; + } + return true; +} + +static inline int +EffectToBlendLayerType(Effect* aEffect) +{ + switch (aEffect->mType) { + case EffectTypes::SOLID_COLOR: + return PS_LAYER_COLOR; + case EffectTypes::RGB: { + gfx::SurfaceFormat format = static_cast(aEffect)->mTexture->GetFormat(); + return (format == gfx::SurfaceFormat::B8G8R8A8 || format == gfx::SurfaceFormat::R8G8B8A8) + ? PS_LAYER_RGBA + : PS_LAYER_RGB; + } + case EffectTypes::RENDER_TARGET: + return PS_LAYER_RGBA; + case EffectTypes::YCBCR: + return PS_LAYER_YCBCR; + default: + MOZ_ASSERT_UNREACHABLE("blending not supported for this layer type"); + return 0; + } +} + void CompositorD3D11::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, @@ -846,7 +928,7 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, } ID3D11ShaderResourceView* srView = source->GetShaderResourceView(); - mContext->PSSetShaderResources(3, 1, &srView); + mContext->PSSetShaderResources(TexSlot::Mask, 1, &srView); const gfx::Matrix4x4& maskTransform = maskEffect->mMaskTransform; NS_ASSERTION(maskTransform.Is2D(), "How did we end up with a 3D transform here?!"); @@ -871,16 +953,49 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, scissor.top = clipRect.y; scissor.bottom = clipRect.YMost(); + RefPtr vertexShader = mAttachments->mVSQuadShader[maskType]; + RefPtr pixelShader = GetPSForEffect(aEffectChain.mPrimaryEffect, maskType); + + RefPtr mixBlendBackdrop; + gfx::CompositionOp blendMode = gfx::CompositionOp::OP_OVER; + if (aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE]) { + EffectBlendMode *blendEffect = + static_cast(aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE].get()); + blendMode = blendEffect->mBlendMode; + + // If the blend operation needs to read from the backdrop, copy the + // current render target into a new texture and bind it now. + if (BlendOpIsMixBlendMode(blendMode)) { + gfx::Matrix4x4 backdropTransform; + gfx::IntRect rect = ComputeBackdropCopyRect(aRect, aClipRect, aTransform, &backdropTransform); + + RefPtr srv; + if (CopyBackdrop(rect, &mixBlendBackdrop, &srv)) { + vertexShader = mAttachments->mVSQuadBlendShader[maskType]; + pixelShader = mAttachments->mBlendShader[MaskType::MaskNone]; + + ID3D11ShaderResourceView* srView = srv.get(); + mContext->PSSetShaderResources(TexSlot::Backdrop, 1, &srView); + + memcpy(&mVSConstants.backdropTransform, &backdropTransform._11, 64); + + mPSConstants.blendConfig[0] = EffectToBlendLayerType(aEffectChain.mPrimaryEffect); + mPSConstants.blendConfig[1] = int(maskType); + mPSConstants.blendConfig[2] = BlendOpToShaderConstant(blendMode); + mPSConstants.blendConfig[3] = EffectHasPremultipliedAlpha(aEffectChain.mPrimaryEffect); + } + } + } + mContext->RSSetScissorRects(1, &scissor); mContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - mContext->VSSetShader(mAttachments->mVSQuadShader[maskType], nullptr, 0); + mContext->VSSetShader(vertexShader, nullptr, 0); + mContext->PSSetShader(pixelShader, nullptr, 0); const Rect* pTexCoordRect = nullptr; switch (aEffectChain.mPrimaryEffect->mType) { case EffectTypes::SOLID_COLOR: { - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, SurfaceFormat::UNKNOWN); - Color color = static_cast(aEffectChain.mPrimaryEffect.get())->mColor; mPSConstants.layerColor[0] = color.r * color.a * aOpacity; @@ -904,10 +1019,8 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, return; } - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, texturedEffect->mTexture->GetFormat()); - ID3D11ShaderResourceView* srView = source->GetShaderResourceView(); - mContext->PSSetShaderResources(0, 1, &srView); + mContext->PSSetShaderResources(TexSlot::RGB, 1, &srView); if (!texturedEffect->mPremultiplied) { mContext->OMSetBlendState(mAttachments->mNonPremulBlendState, sBlendFactor, 0xFFFFFFFF); @@ -933,8 +1046,6 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, return; } - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, ycbcrEffect->mTexture->GetFormat()); - if (!source->GetSubSource(Y) || !source->GetSubSource(Cb) || !source->GetSubSource(Cr)) { // This can happen if we failed to upload the textures, most likely // because of unsupported dimensions (we don't tile YCbCr textures). @@ -948,7 +1059,7 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, ID3D11ShaderResourceView* srViews[3] = { sourceY->GetShaderResourceView(), sourceCb->GetShaderResourceView(), sourceCr->GetShaderResourceView() }; - mContext->PSSetShaderResources(0, 3, srViews); + mContext->PSSetShaderResources(TexSlot::Y, 3, srViews); } break; case EffectTypes::COMPONENT_ALPHA: @@ -966,15 +1077,14 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, return; } - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, effectComponentAlpha->mOnWhite->GetFormat()); - SetSamplerForFilter(effectComponentAlpha->mFilter); pTexCoordRect = &effectComponentAlpha->mTextureCoords; ID3D11ShaderResourceView* srViews[2] = { sourceOnBlack->GetShaderResourceView(), sourceOnWhite->GetShaderResourceView() }; - mContext->PSSetShaderResources(0, 2, srViews); + mContext->PSSetShaderResources(TexSlot::RGB, 1, &srViews[0]); + mContext->PSSetShaderResources(TexSlot::RGBWhite, 1, &srViews[1]); mContext->OMSetBlendState(mAttachments->mComponentBlendState, sBlendFactor, 0xFFFFFFFF); restoreBlendMode = true; @@ -1126,13 +1236,24 @@ CompositorD3D11::EndFrame() if (oldSize == mSize) { RefPtr chain; HRESULT hr = mSwapChain->QueryInterface((IDXGISwapChain1**)getter_AddRefs(chain)); - nsString vendorID; - nsCOMPtr gfxInfo = services::GetGfxInfo(); - gfxInfo->GetAdapterVendorID(vendorID); - bool isNvidia = vendorID.EqualsLiteral("0x10de") && !gfxWindowsPlatform::GetPlatform()->IsWARP(); - if (SUCCEEDED(hr) && chain && !isNvidia) { - // Avoid partial present on Nvidia hardware to try to work around - // bug 1189940 + // We can force partial present or block partial present, based on the value of + // this preference; the default is to disable it on Nvidia (bug 1189940) + bool allowPartialPresent = false; + + int32_t partialPresentPref = gfxPrefs::PartialPresent(); + if (partialPresentPref > 0) { + allowPartialPresent = true; + } else if (partialPresentPref < 0) { + allowPartialPresent = false; + } else if (partialPresentPref == 0) { + nsString vendorID; + nsCOMPtr gfxInfo = services::GetGfxInfo(); + gfxInfo->GetAdapterVendorID(vendorID); + allowPartialPresent = !vendorID.EqualsLiteral("0x10de") || + gfxWindowsPlatform::GetPlatform()->IsWARP(); + } + + if (SUCCEEDED(hr) && chain && allowPartialPresent) { DXGI_PRESENT_PARAMETERS params; PodZero(¶ms); params.DirtyRectsCount = mInvalidRegion.GetNumRects(); @@ -1366,6 +1487,9 @@ DeviceAttachmentsD3D11::CreateShaders() InitVertexShader(sLayerQuadVS, mVSQuadShader, MaskType::MaskNone); InitVertexShader(sLayerQuadMaskVS, mVSQuadShader, MaskType::Mask2d); InitVertexShader(sLayerQuadMask3DVS, mVSQuadShader, MaskType::Mask3d); + InitVertexShader(sLayerQuadBlendVS, mVSQuadBlendShader, MaskType::MaskNone); + InitVertexShader(sLayerQuadBlendMaskVS, mVSQuadBlendShader, MaskType::Mask2d); + InitVertexShader(sLayerQuadBlendMask3DVS, mVSQuadBlendShader, MaskType::Mask3d); InitPixelShader(sSolidColorShader, mSolidColorShader, MaskType::MaskNone); InitPixelShader(sSolidColorShaderMask, mSolidColorShader, MaskType::Mask2d); @@ -1376,6 +1500,7 @@ DeviceAttachmentsD3D11::CreateShaders() InitPixelShader(sRGBAShaderMask3D, mRGBAShader, MaskType::Mask3d); InitPixelShader(sYCbCrShader, mYCbCrShader, MaskType::MaskNone); InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask2d); + InitPixelShader(sBlendShader, mBlendShader, MaskType::MaskNone); if (gfxPrefs::ComponentAlphaEnabled()) { InitPixelShader(sComponentAlphaShader, mComponentAlphaShader, MaskType::MaskNone); InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader, MaskType::Mask2d); diff --git a/gfx/layers/d3d11/CompositorD3D11.h b/gfx/layers/d3d11/CompositorD3D11.h index a328f47464..1621e03918 100644 --- a/gfx/layers/d3d11/CompositorD3D11.h +++ b/gfx/layers/d3d11/CompositorD3D11.h @@ -27,14 +27,14 @@ struct VertexShaderConstants gfx::Rect textureCoords; gfx::Rect layerQuad; gfx::Rect maskQuad; - float vrEyeToSourceUVScale[2]; - float vrEyeToSourceUVOffset[2]; + float backdropTransform[4][4]; }; struct PixelShaderConstants { float layerColor[4]; float layerOpacity[4]; + int blendConfig[4]; }; struct DeviceAttachmentsD3D11; @@ -168,8 +168,14 @@ private: bool UpdateRenderTarget(); bool UpdateConstantBuffers(); void SetSamplerForFilter(gfx::Filter aFilter); - void SetPSForEffect(Effect *aEffect, MaskType aMaskType, gfx::SurfaceFormat aFormat); + ID3D11PixelShader* GetPSForEffect(Effect *aEffect, MaskType aMaskType); void PaintToTarget(); + RefPtr CreateTexture(const gfx::IntRect& aRect, + const CompositingRenderTarget* aSource, + const gfx::IntPoint& aSourcePoint); + bool CopyBackdrop(const gfx::IntRect& aRect, + RefPtr* aOutTexture, + RefPtr* aOutView); RefPtr mContext; RefPtr mDevice; diff --git a/gfx/layers/d3d11/CompositorD3D11.hlsl b/gfx/layers/d3d11/CompositorD3D11.hlsl index 50fc120b0b..953c090c15 100644 --- a/gfx/layers/d3d11/CompositorD3D11.hlsl +++ b/gfx/layers/d3d11/CompositorD3D11.hlsl @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "BlendingHelpers.hlslh" +#include "BlendShaderConstants.h" + typedef float4 rect; float4x4 mLayerTransform : register(vs, c0); @@ -11,19 +14,28 @@ float4 vRenderTargetOffset : register(vs, c8); rect vTextureCoords : register(vs, c9); rect vLayerQuad : register(vs, c10); rect vMaskQuad : register(vs, c11); +float4x4 mBackdropTransform : register(vs, c12); float4 fLayerColor : register(ps, c0); float fLayerOpacity : register(ps, c1); +// x = layer type +// y = mask type +// z = blend op +// w = is premultiplied +uint4 iBlendConfig : register(ps, c2); + sampler sSampler : register(ps, s0); -Texture2D tRGB; -Texture2D tY; -Texture2D tCb; -Texture2D tCr; -Texture2D tRGBWhite; -// Always bind this to slot 3 since this is always available! -Texture2D tMask : register(ps, t3); +// The mix-blend mega shader uses all variables, so we have to make sure they +// are assigned fixed slots. +Texture2D tRGB : register(ps, t0); +Texture2D tY : register(ps, t1); +Texture2D tCb : register(ps, t2); +Texture2D tCr : register(ps, t3); +Texture2D tRGBWhite : register(ps, t4); +Texture2D tMask : register(ps, t5); +Texture2D tBackdrop : register(ps, t6); struct VS_INPUT { float2 vPosition : POSITION; @@ -46,6 +58,14 @@ struct VS_MASK_3D_OUTPUT { float3 vMaskCoords : TEXCOORD1; }; +// Combined struct for the mix-blend compatible vertex shaders. +struct VS_BLEND_OUTPUT { + float4 vPosition : SV_Position; + float2 vTexCoords : TEXCOORD0; + float3 vMaskCoords : TEXCOORD1; + float2 vBackdropCoords : TEXCOORD2; +}; + struct PS_OUTPUT { float4 vSrc; float4 vAlpha; @@ -102,6 +122,16 @@ float4 VertexPosition(float4 aTransformedPosition) return result; } +float2 BackdropPosition(float4 aPosition) +{ + // Move the position from clip space (-1,1) into 0..1 space. + float2 pos; + pos.x = (aPosition.x + 1.0) / 2.0; + pos.y = 1.0 - (aPosition.y + 1.0) / 2.0; + + return mul(mBackdropTransform, float4(pos.xy, 0, 1.0)).xy; +} + VS_OUTPUT LayerQuadVS(const VS_INPUT aVertex) { VS_OUTPUT outp; @@ -163,13 +193,6 @@ float4 RGBAShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity * mask; } -float4 RGBAShaderMaskPremul(const VS_MASK_OUTPUT aVertex) : SV_Target -{ - float4 result = RGBAShaderMask(aVertex); - result.rgb *= result.a; - return result; -} - float4 RGBAShaderMask3D(const VS_MASK_3D_OUTPUT aVertex) : SV_Target { float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; @@ -177,13 +200,6 @@ float4 RGBAShaderMask3D(const VS_MASK_3D_OUTPUT aVertex) : SV_Target return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity * mask; } -float4 RGBAShaderMask3DPremul(const VS_MASK_3D_OUTPUT aVertex) : SV_Target -{ - float4 result = RGBAShaderMask3D(aVertex); - result.rgb *= result.a; - return result; -} - float4 RGBShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target { float4 result; @@ -262,13 +278,6 @@ float4 RGBAShader(const VS_OUTPUT aVertex) : SV_Target return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity; } -float4 RGBAShaderPremul(const VS_OUTPUT aVertex) : SV_Target -{ - float4 result = RGBAShader(aVertex); - result.rgb *= result.a; - return result; -} - float4 RGBShader(const VS_OUTPUT aVertex) : SV_Target { float4 result; @@ -298,3 +307,154 @@ float4 SolidColorShader(const VS_OUTPUT aVertex) : SV_Target { return fLayerColor; } + +// Mix-blend compatible vertex shaders. +VS_BLEND_OUTPUT LayerQuadBlendVS(const VS_INPUT aVertex) +{ + VS_OUTPUT v = LayerQuadVS(aVertex); + + VS_BLEND_OUTPUT o; + o.vPosition = v.vPosition; + o.vTexCoords = v.vTexCoords; + o.vMaskCoords = float3(0, 0, 0); + o.vBackdropCoords = BackdropPosition(v.vPosition); + return o; +} + +VS_BLEND_OUTPUT LayerQuadBlendMaskVS(const VS_INPUT aVertex) +{ + VS_MASK_OUTPUT v = LayerQuadMaskVS(aVertex); + + VS_BLEND_OUTPUT o; + o.vPosition = v.vPosition; + o.vTexCoords = v.vTexCoords; + o.vMaskCoords = float3(v.vMaskCoords, 0); + o.vBackdropCoords = BackdropPosition(v.vPosition); + return o; +} + +VS_BLEND_OUTPUT LayerQuadBlendMask3DVS(const VS_INPUT aVertex) +{ + VS_MASK_3D_OUTPUT v = LayerQuadMask3DVS(aVertex); + + VS_BLEND_OUTPUT o; + o.vPosition = v.vPosition; + o.vTexCoords = v.vTexCoords; + o.vMaskCoords = v.vMaskCoords; + o.vBackdropCoords = BackdropPosition(v.vPosition); + return o; +} + +// The layer type and mask type are specified as constants. We use these to +// call the correct pixel shader to determine the source color for blending. +// Unfortunately this also requires some boilerplate to convert VS_BLEND_OUTPUT +// to a compatible pixel shader input. +float4 ComputeBlendSourceColor(const VS_BLEND_OUTPUT aVertex) +{ + if (iBlendConfig.y == PS_MASK_NONE) { + VS_OUTPUT tmp; + tmp.vPosition = aVertex.vPosition; + tmp.vTexCoords = aVertex.vTexCoords; + if (iBlendConfig.x == PS_LAYER_RGB) { + return RGBShader(tmp); + } else if (iBlendConfig.x == PS_LAYER_RGBA) { + return RGBAShader(tmp); + } else if (iBlendConfig.x == PS_LAYER_YCBCR) { + return YCbCrShader(tmp); + } + return SolidColorShader(tmp); + } else if (iBlendConfig.y == PS_MASK_2D) { + VS_MASK_OUTPUT tmp; + tmp.vPosition = aVertex.vPosition; + tmp.vTexCoords = aVertex.vTexCoords; + tmp.vMaskCoords = aVertex.vMaskCoords.xy; + + if (iBlendConfig.x == PS_LAYER_RGB) { + return RGBShaderMask(tmp); + } else if (iBlendConfig.x == PS_LAYER_RGBA) { + return RGBAShaderMask(tmp); + } else if (iBlendConfig.x == PS_LAYER_YCBCR) { + return YCbCrShaderMask(tmp); + } + return SolidColorShaderMask(tmp); + } else if (iBlendConfig.y == PS_MASK_3D) { + // The only Mask 3D shader is RGBA. + VS_MASK_3D_OUTPUT tmp; + tmp.vPosition = aVertex.vPosition; + tmp.vTexCoords = aVertex.vTexCoords; + tmp.vMaskCoords = aVertex.vMaskCoords; + return RGBAShaderMask3D(tmp); + } + + return float4(0.0, 0.0, 0.0, 1.0); +} + +float3 ChooseBlendFunc(float3 dest, float3 src) +{ + [flatten] switch (iBlendConfig.z) { + case PS_BLEND_MULTIPLY: + return BlendMultiply(dest, src); + case PS_BLEND_SCREEN: + return BlendScreen(dest, src); + case PS_BLEND_OVERLAY: + return BlendOverlay(dest, src); + case PS_BLEND_DARKEN: + return BlendDarken(dest, src); + case PS_BLEND_LIGHTEN: + return BlendLighten(dest, src); + case PS_BLEND_COLOR_DODGE: + return BlendColorDodge(dest, src); + case PS_BLEND_COLOR_BURN: + return BlendColorBurn(dest, src); + case PS_BLEND_HARD_LIGHT: + return BlendHardLight(dest, src); + case PS_BLEND_SOFT_LIGHT: + return BlendSoftLight(dest, src); + case PS_BLEND_DIFFERENCE: + return BlendDifference(dest, src); + case PS_BLEND_EXCLUSION: + return BlendExclusion(dest, src); + case PS_BLEND_HUE: + return BlendHue(dest, src); + case PS_BLEND_SATURATION: + return BlendSaturation(dest, src); + case PS_BLEND_COLOR: + return BlendColor(dest, src); + case PS_BLEND_LUMINOSITY: + return BlendLuminosity(dest, src); + default: + return float3(0, 0, 0); + } +} + +float4 BlendShader(const VS_BLEND_OUTPUT aVertex) : SV_Target +{ + float4 backdrop = tBackdrop.Sample(sSampler, aVertex.vBackdropCoords.xy); + float4 source = ComputeBlendSourceColor(aVertex); + + // Shortcut when the backdrop or source alpha is 0, otherwise we may leak + // infinity into the blend function and return incorrect results. + if (backdrop.a == 0.0) { + return source; + } + if (source.a == 0.0) { + return backdrop; + } + + // The spec assumes there is no premultiplied alpha. The backdrop is always + // premultiplied, so undo the premultiply. If the source is premultiplied we + // must fix that as well. + backdrop.rgb /= backdrop.a; + if (iBlendConfig.w) { + source.rgb /= source.a; + } + + float4 result; + result.rgb = ChooseBlendFunc(backdrop.rgb, source.rgb); + result.a = source.a; + + // Factor backdrop alpha, then premultiply for the final OP_OVER. + result.rgb = (1.0 - backdrop.a) * source.rgb + backdrop.a * result.rgb; + result.rgb *= result.a; + return result; +} diff --git a/gfx/layers/d3d11/CompositorD3D11Shaders.h b/gfx/layers/d3d11/CompositorD3D11Shaders.h index 3a34898858..8788130325 100644 --- a/gfx/layers/d3d11/CompositorD3D11Shaders.h +++ b/gfx/layers/d3d11/CompositorD3D11Shaders.h @@ -15,8 +15,10 @@ struct ShaderBytes { const void* mData; size_t mLength; }; // float4 vTextureCoords; // Offset: 144 Size: 16 // float4 vLayerQuad; // Offset: 160 Size: 16 // float4 vMaskQuad; // Offset: 176 Size: 16 [unused] -// float4 fLayerColor; // Offset: 192 Size: 16 [unused] -// float fLayerOpacity; // Offset: 208 Size: 4 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 [unused] +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] // // } // @@ -104,15 +106,15 @@ ret const BYTE LayerQuadVS[] = { - 68, 88, 66, 67, 200, 251, - 64, 251, 166, 240, 101, 137, - 191, 140, 75, 217, 9, 168, - 61, 163, 1, 0, 0, 0, - 180, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 141, 229, + 88, 115, 31, 138, 49, 78, + 16, 5, 63, 222, 239, 137, + 213, 18, 1, 0, 0, 0, + 24, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 152, 1, 0, 0, 160, 3, 0, 0, 28, 4, 0, 0, - 40, 6, 0, 0, 92, 6, + 140, 6, 0, 0, 192, 6, 0, 0, 65, 111, 110, 57, 88, 1, 0, 0, 88, 1, 0, 0, 0, 2, 254, 255, @@ -280,11 +282,11 @@ const BYTE LayerQuadVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 4, 2, 0, 0, 1, 0, + 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, - 0, 1, 0, 0, 208, 1, + 0, 1, 0, 0, 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -293,41 +295,49 @@ const BYTE LayerQuadVS[] = 0, 0, 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 8, 0, 0, 0, - 96, 0, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 96, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 1, + 0, 0, 0, 0, 80, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 2, 0, - 0, 0, 48, 1, 0, 0, - 0, 0, 0, 0, 64, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 48, 1, 0, 0, - 0, 0, 0, 0, 76, 1, - 0, 0, 128, 0, 0, 0, - 16, 0, 0, 0, 2, 0, 0, 0, 96, 1, 0, 0, 0, 0, 0, 0, 112, 1, + 0, 0, 64, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 124, 1, + 0, 0, 128, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 160, 1, 0, 0, 144, 0, 0, 0, 16, 0, 0, 0, 2, 0, - 0, 0, 128, 1, 0, 0, - 0, 0, 0, 0, 144, 1, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 192, 1, 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 2, 0, - 0, 0, 128, 1, 0, 0, - 0, 0, 0, 0, 155, 1, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 203, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 128, 1, 0, 0, - 0, 0, 0, 0, 165, 1, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 213, 1, 0, 0, 192, 0, 0, 0, - 16, 0, 0, 0, 0, 0, + 64, 0, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, - 0, 0, 0, 0, 177, 1, - 0, 0, 208, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 244, 1, + 0, 0, 16, 1, 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 192, 1, 0, 0, + 0, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 20, 2, + 0, 0, 32, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, @@ -350,46 +360,55 @@ const BYTE LayerQuadVS[] = 0, 0, 118, 76, 97, 121, 101, 114, 81, 117, 97, 100, 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 67, - 111, 108, 111, 114, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 102, 76, 97, 121, 101, 114, + 79, 112, 97, 99, 105, 116, + 121, 0, 171, 171, 0, 0, + 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 77, 105, 99, 114, 111, 115, - 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, - 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 3, - 0, 0, 80, 79, 83, 73, - 84, 73, 79, 78, 0, 171, - 171, 171, 79, 83, 71, 78, - 80, 0, 0, 0, 2, 0, + 0, 0, 105, 66, 108, 101, + 110, 100, 67, 111, 110, 102, + 105, 103, 0, 171, 171, 171, + 1, 0, 19, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 68, 0, 0, 0, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171 + 3, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 0, + 80, 79, 83, 73, 84, 73, + 79, 78, 0, 171, 171, 171, + 79, 83, 71, 78, 80, 0, + 0, 0, 2, 0, 0, 0, + 8, 0, 0, 0, 56, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 68, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 3, 12, 0, 0, 83, 86, + 95, 80, 111, 115, 105, 116, + 105, 111, 110, 0, 84, 69, + 88, 67, 79, 79, 82, 68, + 0, 171, 171, 171 }; ShaderBytes sLayerQuadVS = { LayerQuadVS, sizeof(LayerQuadVS) }; #if 0 @@ -404,12 +423,14 @@ ShaderBytes sLayerQuadVS = { LayerQuadVS, sizeof(LayerQuadVS) }; // // float4 fLayerColor; // Offset: 0 Size: 16 // float fLayerOpacity; // Offset: 16 Size: 4 [unused] -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -460,15 +481,15 @@ ret const BYTE SolidColorShader[] = { - 68, 88, 66, 67, 30, 148, - 104, 202, 165, 39, 58, 182, - 100, 205, 95, 195, 52, 137, - 197, 241, 1, 0, 0, 0, - 224, 3, 0, 0, 6, 0, + 68, 88, 66, 67, 46, 104, + 157, 133, 222, 110, 60, 127, + 132, 226, 126, 208, 247, 164, + 42, 238, 1, 0, 0, 0, + 68, 4, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 132, 0, 0, 0, 204, 0, 0, 0, 72, 1, 0, 0, - 84, 3, 0, 0, 172, 3, + 184, 3, 0, 0, 16, 4, 0, 0, 65, 111, 110, 57, 68, 0, 0, 0, 68, 0, 0, 0, 0, 2, 255, 255, @@ -515,12 +536,12 @@ const BYTE SolidColorShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 4, 2, 0, 0, + 69, 70, 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 209, 1, 0, 0, 60, 0, + 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -528,41 +549,49 @@ const BYTE SolidColorShader[] = 0, 0, 0, 0, 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, - 60, 0, 0, 0, 8, 0, + 60, 0, 0, 0, 10, 0, 0, 0, 96, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 1, 0, 0, 0, 0, + 80, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 44, 1, + 2, 0, 0, 0, 92, 1, 0, 0, 0, 0, 0, 0, - 60, 1, 0, 0, 16, 0, + 108, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 76, 1, + 0, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 0, - 92, 1, 0, 0, 32, 0, + 140, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 156, 1, + 0, 0, 0, 0, 0, 0, + 172, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 108, 1, + 0, 0, 0, 0, 188, 1, 0, 0, 0, 0, 0, 0, - 124, 1, 0, 0, 96, 0, + 204, 1, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 108, 1, + 0, 0, 0, 0, 188, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 160, 0, + 216, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 44, 1, + 0, 0, 0, 0, 92, 1, 0, 0, 0, 0, 0, 0, - 156, 1, 0, 0, 176, 0, + 236, 1, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 172, 1, + 0, 0, 0, 0, 252, 1, 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 192, 0, + 12, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 172, 1, + 0, 0, 0, 0, 252, 1, 0, 0, 0, 0, 0, 0, - 199, 1, 0, 0, 208, 0, + 23, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 172, 1, + 0, 0, 0, 0, 252, 1, + 0, 0, 0, 0, 0, 0, + 33, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 188, 1, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -574,58 +603,66 @@ const BYTE SolidColorShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; #if 0 @@ -640,12 +677,14 @@ ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -716,15 +755,15 @@ ret const BYTE RGBShader[] = { - 68, 88, 66, 67, 239, 198, - 87, 206, 69, 92, 245, 30, - 125, 195, 239, 77, 37, 241, - 175, 187, 1, 0, 0, 0, - 232, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 65, 119, + 74, 180, 122, 23, 76, 16, + 140, 81, 225, 186, 127, 137, + 70, 249, 1, 0, 0, 0, + 76, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 204, 0, 0, 0, 136, 1, 0, 0, 4, 2, 0, 0, - 92, 4, 0, 0, 180, 4, + 192, 4, 0, 0, 24, 5, 0, 0, 65, 111, 110, 57, 140, 0, 0, 0, 140, 0, 0, 0, 0, 2, 255, 255, @@ -802,12 +841,12 @@ const BYTE RGBShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 80, 2, + 82, 68, 69, 70, 180, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 29, 2, 0, 0, + 0, 0, 128, 2, 0, 0, 124, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -818,7 +857,7 @@ const BYTE RGBShader[] = 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 138, 0, + 13, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -828,41 +867,49 @@ const BYTE RGBShader[] = 101, 114, 0, 116, 82, 71, 66, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, - 138, 0, 0, 0, 8, 0, + 138, 0, 0, 0, 10, 0, 0, 0, 172, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, + 156, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, + 184, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 152, 1, + 2, 0, 0, 0, 200, 1, 0, 0, 0, 0, 0, 0, - 168, 1, 0, 0, 32, 0, + 216, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 0, 0, 0, + 248, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 200, 1, 0, 0, 96, 0, + 24, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 160, 0, + 36, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 232, 1, 0, 0, 176, 0, + 56, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 8, 2, 0, 0, 192, 0, + 88, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 19, 2, 0, 0, 208, 0, + 99, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, + 0, 0, 0, 0, 0, 0, + 109, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -874,58 +921,66 @@ const BYTE RGBShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; #if 0 @@ -940,12 +995,14 @@ ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -1014,15 +1071,15 @@ ret const BYTE RGBAShader[] = { - 68, 88, 66, 67, 230, 59, - 90, 23, 60, 77, 18, 113, - 14, 129, 183, 152, 233, 55, - 111, 42, 1, 0, 0, 0, - 196, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 134, 186, + 102, 217, 28, 249, 237, 84, + 31, 38, 2, 143, 235, 216, + 237, 103, 1, 0, 0, 0, + 40, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 192, 0, 0, 0, 100, 1, 0, 0, 224, 1, 0, 0, - 56, 4, 0, 0, 144, 4, + 156, 4, 0, 0, 244, 4, 0, 0, 65, 111, 110, 57, 128, 0, 0, 0, 128, 0, 0, 0, 0, 2, 255, 255, @@ -1094,12 +1151,12 @@ const BYTE RGBAShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 80, 2, + 82, 68, 69, 70, 180, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 29, 2, 0, 0, + 0, 0, 128, 2, 0, 0, 124, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1110,7 +1167,7 @@ const BYTE RGBAShader[] = 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 138, 0, + 13, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1120,41 +1177,49 @@ const BYTE RGBAShader[] = 101, 114, 0, 116, 82, 71, 66, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, - 138, 0, 0, 0, 8, 0, + 138, 0, 0, 0, 10, 0, 0, 0, 172, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, + 156, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, + 184, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 152, 1, + 2, 0, 0, 0, 200, 1, 0, 0, 0, 0, 0, 0, - 168, 1, 0, 0, 32, 0, + 216, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 0, 0, 0, + 248, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 200, 1, 0, 0, 96, 0, + 24, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 160, 0, + 36, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 232, 1, 0, 0, 176, 0, + 56, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 8, 2, 0, 0, 192, 0, + 88, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 19, 2, 0, 0, 208, 0, + 99, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, + 0, 0, 0, 0, 0, 0, + 109, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -1166,340 +1231,43 @@ const BYTE RGBAShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 -}; -ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// tRGB texture float4 2d 0 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t0 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mul r0.xyz, r0.w, r0 - mov oC0, r0 - -// approximately 4 instruction slots used (1 texture, 3 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_input_ps linear v1.xy -dcl_output o0.xyzw -dcl_temps 1 -sample r0.xyzw, v1.xyxx, t0.xyzw, s0 -mul r0.xyzw, r0.xyzw, cb0[1].xxxx -mul o0.xyz, r0.wwww, r0.xyzx -mov o0.w, r0.w -ret -// Approximately 5 instruction slots used -#endif - -const BYTE RGBAShaderPremul[] = -{ - 68, 88, 66, 67, 9, 19, - 234, 250, 161, 24, 191, 52, - 148, 34, 157, 98, 40, 39, - 76, 48, 1, 0, 0, 0, - 4, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 208, 0, 0, 0, 164, 1, - 0, 0, 32, 2, 0, 0, - 120, 4, 0, 0, 208, 4, - 0, 0, 65, 111, 110, 57, - 144, 0, 0, 0, 144, 0, - 0, 0, 0, 2, 255, 255, - 92, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 40, 0, - 0, 0, 52, 0, 0, 0, - 52, 0, 1, 0, 36, 0, - 0, 0, 52, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 3, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 176, - 0, 8, 228, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 204, 0, 0, 0, - 64, 0, 0, 0, 51, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 7, - 114, 32, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 130, 32, - 16, 0, 0, 0, 0, 0, - 58, 0, 16, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 5, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 80, 2, 0, 0, - 1, 0, 0, 0, 148, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 29, 2, 0, 0, 124, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 138, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 114, - 0, 116, 82, 71, 66, 0, - 36, 71, 108, 111, 98, 97, - 108, 115, 0, 171, 138, 0, - 0, 0, 8, 0, 0, 0, - 172, 0, 0, 0, 224, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 136, 1, - 0, 0, 16, 0, 0, 0, - 4, 0, 0, 0, 2, 0, - 0, 0, 152, 1, 0, 0, - 0, 0, 0, 0, 168, 1, - 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 184, 1, 0, 0, - 0, 0, 0, 0, 200, 1, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 184, 1, 0, 0, - 0, 0, 0, 0, 212, 1, - 0, 0, 160, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 232, 1, - 0, 0, 176, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 8, 2, - 0, 0, 192, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 19, 2, - 0, 0, 208, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 1, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, @@ -1524,7 +1292,7 @@ const BYTE RGBAShaderPremul[] = 83, 86, 95, 84, 97, 114, 103, 101, 116, 0, 171, 171 }; -ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; +ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; #if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 @@ -1537,12 +1305,14 @@ ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -1553,7 +1323,7 @@ ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 // tRGB texture float4 2d 0 1 -// tRGBWhite texture float4 2d 1 1 +// tRGBWhite texture float4 2d 4 1 // $Globals cbuffer NA NA 0 1 // // @@ -1586,7 +1356,7 @@ ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- // s0 s0 t0 -// s1 s0 t1 +// s1 s0 t4 // // // Level9 shader bytecode: @@ -1611,12 +1381,12 @@ ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t1 +dcl_resource_texture2d (float,float,float,float) t4 dcl_input_ps linear v1.xy dcl_output o0.xyzw dcl_output o1.xyzw dcl_temps 2 -sample r0.xyzw, v1.xyxx, t1.xyzw, s0 +sample r0.xyzw, v1.xyxx, t4.xyzw, s0 sample r1.xyzw, v1.xyxx, t0.xyzw, s0 add r0.xyzw, -r0.xyzw, r1.xyzw add r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000) @@ -1629,15 +1399,15 @@ ret const BYTE ComponentAlphaShader[] = { - 68, 88, 66, 67, 186, 162, - 72, 42, 69, 36, 160, 68, - 108, 121, 216, 238, 108, 37, - 6, 145, 1, 0, 0, 0, - 68, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 70, 65, + 219, 11, 235, 82, 64, 151, + 37, 101, 86, 144, 19, 4, + 125, 155, 1, 0, 0, 0, + 168, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 64, 1, 0, 0, 160, 2, 0, 0, 28, 3, 0, 0, - 160, 5, 0, 0, 248, 5, + 4, 6, 0, 0, 92, 6, 0, 0, 65, 111, 110, 57, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 255, 255, @@ -1646,7 +1416,7 @@ const BYTE ComponentAlphaShader[] = 0, 0, 56, 0, 0, 0, 56, 0, 2, 0, 36, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 1, 0, 1, 0, + 0, 0, 4, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, @@ -1693,7 +1463,7 @@ const BYTE ComponentAlphaShader[] = 0, 4, 0, 112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 4, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, @@ -1706,7 +1476,7 @@ const BYTE ComponentAlphaShader[] = 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 1, 0, 0, 0, + 16, 0, 4, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 1, 0, @@ -1762,12 +1532,12 @@ const BYTE ComponentAlphaShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 124, 2, 0, 0, + 69, 70, 224, 2, 0, 0, 1, 0, 0, 0, 192, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 73, 2, 0, 0, 156, 0, + 172, 2, 0, 0, 156, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1777,13 +1547,13 @@ const BYTE ComponentAlphaShader[] = 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 170, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 1, 0, + 255, 255, 255, 255, 4, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 180, 0, + 13, 0, 0, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1795,41 +1565,49 @@ const BYTE ComponentAlphaShader[] = 87, 104, 105, 116, 101, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, - 180, 0, 0, 0, 8, 0, + 180, 0, 0, 0, 10, 0, 0, 0, 216, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 152, 1, 0, 0, 0, 0, + 200, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 164, 1, + 0, 0, 0, 0, 212, 1, 0, 0, 0, 0, 0, 0, - 180, 1, 0, 0, 16, 0, + 228, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 196, 1, + 2, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 32, 0, + 4, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 20, 2, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, - 244, 1, 0, 0, 96, 0, + 68, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 160, 0, + 80, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 164, 1, + 0, 0, 0, 0, 212, 1, 0, 0, 0, 0, 0, 0, - 20, 2, 0, 0, 176, 0, + 100, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 52, 2, 0, 0, 192, 0, + 132, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 63, 2, 0, 0, 208, 0, + 143, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, + 0, 0, 0, 0, 0, 0, + 153, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -1841,62 +1619,70 @@ const BYTE ComponentAlphaShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 68, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 56, 0, 0, 0, - 1, 0, 0, 0, 0, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 68, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 56, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlphaShader) }; #if 0 @@ -1911,12 +1697,14 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -1926,9 +1714,9 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 -// tY texture float4 2d 0 1 -// tCb texture float4 2d 1 1 -// tCr texture float4 2d 2 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 1 +// tCr texture float4 2d 3 1 // $Globals cbuffer NA NA 0 1 // // @@ -1959,9 +1747,9 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t0 -// s1 s0 t1 -// s2 s0 t2 +// s0 s0 t1 +// s1 s0 t2 +// s2 s0 t3 // // // Level9 shader bytecode: @@ -1993,20 +1781,20 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 +dcl_resource_texture2d (float,float,float,float) t3 dcl_input_ps linear v1.xy dcl_output o0.xyzw dcl_temps 3 -sample r0.xyzw, v1.xyxx, t2.xyzw, s0 +sample r0.xyzw, v1.xyxx, t3.xyzw, s0 add r0.x, r0.x, l(-0.501960) mul r0.xy, r0.xxxx, l(1.596030, 0.812970, 0.000000, 0.000000) -sample r1.xyzw, v1.xyxx, t0.xyzw, s0 +sample r1.xyzw, v1.xyxx, t1.xyzw, s0 add r0.z, r1.x, l(-0.062750) mad r0.y, r0.z, l(1.164380), -r0.y mad r1.x, r0.z, l(1.164380), r0.x -sample r2.xyzw, v1.xyxx, t1.xyzw, s0 +sample r2.xyzw, v1.xyxx, t2.xyzw, s0 add r0.x, r2.x, l(-0.501960) mad r1.y, -r0.x, l(0.391760), r0.y mul r0.x, r0.x, l(2.017230) @@ -2019,15 +1807,15 @@ ret const BYTE YCbCrShader[] = { - 68, 88, 66, 67, 127, 202, - 65, 67, 171, 51, 222, 111, - 252, 139, 60, 115, 30, 112, - 240, 10, 1, 0, 0, 0, - 212, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 17, 182, + 131, 145, 148, 37, 135, 136, + 214, 75, 157, 57, 87, 83, + 119, 226, 1, 0, 0, 0, + 56, 8, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 220, 1, 0, 0, 44, 4, 0, 0, 168, 4, 0, 0, - 72, 7, 0, 0, 160, 7, + 172, 7, 0, 0, 4, 8, 0, 0, 65, 111, 110, 57, 156, 1, 0, 0, 156, 1, 0, 0, 0, 2, 255, 255, @@ -2035,9 +1823,9 @@ const BYTE YCbCrShader[] = 0, 0, 1, 0, 48, 0, 0, 0, 60, 0, 0, 0, 60, 0, 3, 0, 36, 0, - 0, 0, 60, 0, 0, 0, - 0, 0, 1, 0, 1, 0, - 2, 0, 2, 0, 0, 0, + 0, 0, 60, 0, 1, 0, + 0, 0, 2, 0, 1, 0, + 3, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, @@ -2107,12 +1895,12 @@ const BYTE YCbCrShader[] = 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, + 1, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 2, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 2, 0, 0, 0, + 16, 0, 3, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0, @@ -2123,7 +1911,7 @@ const BYTE YCbCrShader[] = 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 2, 0, 0, 0, 0, 96, + 3, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, 0, 0, 0, 0, @@ -2140,7 +1928,7 @@ const BYTE YCbCrShader[] = 242, 0, 16, 0, 1, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, + 16, 0, 1, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 66, 0, 16, 0, 0, 0, @@ -2163,7 +1951,7 @@ const BYTE YCbCrShader[] = 0, 9, 242, 0, 16, 0, 2, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 1, 0, + 70, 126, 16, 0, 2, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, @@ -2218,12 +2006,12 @@ const BYTE YCbCrShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 152, 2, 0, 0, + 69, 70, 252, 2, 0, 0, 1, 0, 0, 0, 220, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 101, 2, 0, 0, 188, 0, + 200, 2, 0, 0, 188, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2232,19 +2020,19 @@ const BYTE YCbCrShader[] = 197, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 255, 255, 1, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 200, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 1, 0, + 255, 255, 255, 255, 2, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 204, 0, + 13, 0, 0, 0, 204, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, - 2, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2256,41 +2044,49 @@ const BYTE YCbCrShader[] = 116, 67, 114, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 208, 0, - 0, 0, 8, 0, 0, 0, - 244, 0, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 244, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 180, 1, + 0, 0, 0, 0, 228, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 192, 1, 0, 0, - 0, 0, 0, 0, 208, 1, + 0, 0, 240, 1, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 224, 1, 0, 0, - 0, 0, 0, 0, 240, 1, + 0, 0, 16, 2, 0, 0, + 0, 0, 0, 0, 32, 2, 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 16, 2, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 28, 2, - 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 192, 1, 0, 0, - 0, 0, 0, 0, 48, 2, + 0, 0, 48, 2, 0, 0, + 0, 0, 0, 0, 64, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 80, 2, 0, 0, + 0, 0, 0, 0, 96, 2, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 80, 2, 0, 0, + 0, 0, 0, 0, 108, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 64, 2, 0, 0, - 0, 0, 0, 0, 80, 2, + 0, 0, 240, 1, 0, 0, + 0, 0, 0, 0, 128, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 64, 2, 0, 0, - 0, 0, 0, 0, 91, 2, + 0, 0, 144, 2, 0, 0, + 0, 0, 0, 0, 160, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 64, 2, 0, 0, + 0, 0, 144, 2, 0, 0, + 0, 0, 0, 0, 171, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 144, 2, 0, 0, + 0, 0, 0, 0, 181, 2, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 80, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, 1, 0, @@ -2301,58 +2097,67 @@ const BYTE YCbCrShader[] = 105, 116, 121, 0, 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, - 71, 78, 80, 0, 0, 0, - 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 68, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 44, 0, 0, 0, 1, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171 + 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 3, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 79, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 83, 86, + 95, 84, 97, 114, 103, 101, + 116, 0, 171, 171 }; ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; #if 0 @@ -2371,8 +2176,10 @@ ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; // float4 vTextureCoords; // Offset: 144 Size: 16 // float4 vLayerQuad; // Offset: 160 Size: 16 // float4 vMaskQuad; // Offset: 176 Size: 16 -// float4 fLayerColor; // Offset: 192 Size: 16 [unused] -// float fLayerOpacity; // Offset: 208 Size: 4 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 [unused] +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] // // } // @@ -2470,15 +2277,15 @@ ret const BYTE LayerQuadMaskVS[] = { - 68, 88, 66, 67, 223, 251, - 10, 17, 13, 90, 47, 25, - 119, 198, 20, 157, 124, 193, - 251, 234, 1, 0, 0, 0, - 120, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 117, 253, + 188, 162, 139, 208, 50, 178, + 49, 2, 251, 153, 144, 237, + 178, 212, 1, 0, 0, 0, + 220, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 224, 1, 0, 0, 76, 4, 0, 0, 200, 4, 0, 0, - 212, 6, 0, 0, 8, 7, + 56, 7, 0, 0, 108, 7, 0, 0, 65, 111, 110, 57, 160, 1, 0, 0, 160, 1, 0, 0, 0, 2, 254, 255, @@ -2674,12 +2481,12 @@ const BYTE LayerQuadMaskVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 4, 2, + 82, 68, 69, 70, 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, 0, 1, - 0, 0, 208, 1, 0, 0, + 0, 0, 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2688,41 +2495,49 @@ const BYTE LayerQuadMaskVS[] = 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 60, 0, 0, 0, - 8, 0, 0, 0, 96, 0, - 0, 0, 224, 0, 0, 0, + 10, 0, 0, 0, 96, 0, + 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 1, 0, 0, + 0, 0, 80, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 64, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 76, 1, 0, 0, - 128, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, 96, 1, 0, 0, 0, 0, 0, 0, 112, 1, 0, 0, + 64, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 124, 1, 0, 0, + 128, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 160, 1, 0, 0, 144, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 144, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 192, 1, 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 155, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 203, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 165, 1, 0, 0, - 192, 0, 0, 0, 16, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 213, 1, 0, 0, + 192, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0, - 0, 0, 177, 1, 0, 0, - 208, 0, 0, 0, 4, 0, + 0, 0, 232, 1, 0, 0, + 0, 1, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, - 192, 1, 0, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 244, 1, 0, 0, + 16, 1, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 4, 2, 0, 0, 0, 0, + 0, 0, 20, 2, 0, 0, + 32, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, 109, 0, @@ -2745,50 +2560,59 @@ const BYTE LayerQuadMaskVS[] = 118, 76, 97, 121, 101, 114, 81, 117, 97, 100, 0, 118, 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 67, 111, 108, - 111, 114, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 77, 105, 99, 114, + 111, 115, 111, 102, 116, 32, + 40, 82, 41, 32, 72, 76, + 83, 76, 32, 83, 104, 97, + 100, 101, 114, 32, 67, 111, + 109, 112, 105, 108, 101, 114, + 32, 54, 46, 51, 46, 57, + 54, 48, 48, 46, 49, 54, + 51, 56, 52, 0, 171, 171, + 73, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 3, 0, 0, 80, 79, + 83, 73, 84, 73, 79, 78, + 0, 171, 171, 171, 79, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171 + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 12, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 3, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171 }; ShaderBytes sLayerQuadMaskVS = { LayerQuadMaskVS, sizeof(LayerQuadMaskVS) }; #if 0 @@ -2807,8 +2631,10 @@ ShaderBytes sLayerQuadMaskVS = { LayerQuadMaskVS, sizeof(LayerQuadMaskVS) }; // float4 vTextureCoords; // Offset: 144 Size: 16 // float4 vLayerQuad; // Offset: 160 Size: 16 // float4 vMaskQuad; // Offset: 176 Size: 16 -// float4 fLayerColor; // Offset: 192 Size: 16 [unused] -// float fLayerOpacity; // Offset: 208 Size: 4 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 [unused] +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] // // } // @@ -2910,15 +2736,15 @@ ret const BYTE LayerQuadMask3DVS[] = { - 68, 88, 66, 67, 151, 141, - 11, 11, 111, 244, 17, 242, - 119, 116, 248, 53, 235, 192, - 38, 193, 1, 0, 0, 0, - 204, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 124, 99, + 104, 27, 0, 223, 159, 8, + 231, 86, 180, 224, 50, 178, + 27, 163, 1, 0, 0, 0, + 48, 8, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 2, 0, 0, 160, 4, 0, 0, 28, 5, 0, 0, - 40, 7, 0, 0, 92, 7, + 140, 7, 0, 0, 192, 7, 0, 0, 65, 111, 110, 57, 216, 1, 0, 0, 216, 1, 0, 0, 0, 2, 254, 255, @@ -3128,12 +2954,12 @@ const BYTE LayerQuadMask3DVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 4, 2, + 82, 68, 69, 70, 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, 0, 1, - 0, 0, 208, 1, 0, 0, + 0, 0, 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3142,41 +2968,49 @@ const BYTE LayerQuadMask3DVS[] = 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 60, 0, 0, 0, - 8, 0, 0, 0, 96, 0, - 0, 0, 224, 0, 0, 0, + 10, 0, 0, 0, 96, 0, + 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 1, 0, 0, + 0, 0, 80, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 64, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 76, 1, 0, 0, - 128, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, 96, 1, 0, 0, 0, 0, 0, 0, 112, 1, 0, 0, + 64, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 124, 1, 0, 0, + 128, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 160, 1, 0, 0, 144, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 144, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 192, 1, 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 155, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 203, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 165, 1, 0, 0, - 192, 0, 0, 0, 16, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 213, 1, 0, 0, + 192, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0, - 0, 0, 177, 1, 0, 0, - 208, 0, 0, 0, 4, 0, + 0, 0, 232, 1, 0, 0, + 0, 1, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, - 192, 1, 0, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 244, 1, 0, 0, + 16, 1, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 4, 2, 0, 0, 0, 0, + 0, 0, 20, 2, 0, 0, + 32, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, 109, 0, @@ -3199,50 +3033,59 @@ const BYTE LayerQuadMask3DVS[] = 118, 76, 97, 121, 101, 114, 81, 117, 97, 100, 0, 118, 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 67, 111, 108, - 111, 114, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 77, 105, 99, 114, + 111, 115, 111, 102, 116, 32, + 40, 82, 41, 32, 72, 76, + 83, 76, 32, 83, 104, 97, + 100, 101, 114, 32, 67, 111, + 109, 112, 105, 108, 101, 114, + 32, 54, 46, 51, 46, 57, + 54, 48, 48, 46, 49, 54, + 51, 56, 52, 0, 171, 171, + 73, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 3, 0, 0, 80, 79, + 83, 73, 84, 73, 79, 78, + 0, 171, 171, 171, 79, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, - 7, 8, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171 + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 12, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 2, 0, 0, 0, 7, 8, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171 }; ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) }; #if 0 @@ -3257,12 +3100,14 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) // // float4 fLayerColor; // Offset: 0 Size: 16 // float fLayerOpacity; // Offset: 16 Size: 4 [unused] -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -3272,7 +3117,7 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 -// tMask texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -3304,7 +3149,7 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 +// s0 s0 t5 // // // Level9 shader bytecode: @@ -3321,11 +3166,11 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) ps_4_0 dcl_constantbuffer cb0[1], immediateIndexed dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_temps 1 -sample r0.xyzw, v1.zwzz, t3.xyzw, s0 +sample r0.xyzw, v1.zwzz, t5.xyzw, s0 mul o0.xyzw, r0.xxxx, cb0[0].xyzw ret // Approximately 3 instruction slots used @@ -3333,15 +3178,15 @@ ret const BYTE SolidColorShaderMask[] = { - 68, 88, 66, 67, 189, 88, - 190, 169, 235, 115, 239, 219, - 181, 194, 113, 122, 250, 177, - 212, 243, 1, 0, 0, 0, - 232, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 179, 163, + 177, 178, 96, 7, 246, 20, + 94, 198, 166, 18, 116, 245, + 163, 94, 1, 0, 0, 0, + 76, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 204, 0, 0, 0, 112, 1, 0, 0, 236, 1, 0, 0, - 68, 4, 0, 0, 180, 4, + 168, 4, 0, 0, 24, 5, 0, 0, 65, 111, 110, 57, 140, 0, 0, 0, 140, 0, 0, 0, 0, 2, 255, 255, @@ -3349,7 +3194,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 1, 0, 40, 0, 0, 0, 52, 0, 0, 0, 52, 0, 1, 0, 36, 0, - 0, 0, 52, 0, 3, 0, + 0, 0, 52, 0, 5, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, @@ -3375,7 +3220,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 90, 0, 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 3, 0, + 0, 112, 16, 0, 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 194, 16, 16, 0, 1, 0, 0, 0, @@ -3386,7 +3231,7 @@ const BYTE SolidColorShaderMask[] = 242, 0, 16, 0, 0, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0, 8, 242, 32, 16, 0, 0, 0, @@ -3415,12 +3260,12 @@ const BYTE SolidColorShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 80, 2, + 82, 68, 69, 70, 180, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 29, 2, 0, 0, + 0, 0, 128, 2, 0, 0, 124, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3429,7 +3274,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 133, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, + 255, 255, 255, 255, 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 139, 0, 0, 0, 0, 0, 0, 0, @@ -3441,41 +3286,49 @@ const BYTE SolidColorShaderMask[] = 101, 114, 0, 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, - 139, 0, 0, 0, 8, 0, + 139, 0, 0, 0, 10, 0, 0, 0, 172, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, + 156, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, + 2, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, + 184, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 152, 1, + 0, 0, 0, 0, 200, 1, 0, 0, 0, 0, 0, 0, - 168, 1, 0, 0, 32, 0, + 216, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 0, 0, 0, + 248, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 200, 1, 0, 0, 96, 0, + 24, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 160, 0, + 36, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 232, 1, 0, 0, 176, 0, + 56, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 8, 2, 0, 0, 192, 0, + 88, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 19, 2, 0, 0, 208, 0, + 99, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, + 0, 0, 0, 0, 0, 0, + 109, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -3487,62 +3340,70 @@ const BYTE SolidColorShaderMask[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 12, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorShaderMask) }; #if 0 @@ -3557,12 +3418,14 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -3573,7 +3436,7 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 // tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -3605,8 +3468,8 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 +// s0 s0 t0 +// s1 s0 t5 // // // Level9 shader bytecode: @@ -3616,8 +3479,8 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha dcl_2d s0 dcl_2d s1 mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 + texld r1, t0, s0 + texld r0, r0, s1 mul r1.xyz, r1, c0.x mov r1.w, c0.x mul r0, r0.x, r1 @@ -3628,14 +3491,14 @@ ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_temps 2 sample r0.xyzw, v1.xyxx, t0.xyzw, s0 mul r0.xyz, r0.xyzx, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 +sample r1.xyzw, v1.zwzz, t5.xyzw, s0 mov r0.w, cb0[1].x mul o0.xyzw, r0.xyzw, r1.xxxx ret @@ -3644,15 +3507,15 @@ ret const BYTE RGBShaderMask[] = { - 68, 88, 66, 67, 151, 113, - 6, 167, 51, 154, 234, 112, - 72, 240, 46, 160, 193, 164, - 13, 255, 1, 0, 0, 0, - 192, 5, 0, 0, 6, 0, + 68, 88, 66, 67, 194, 201, + 10, 158, 40, 223, 107, 77, + 239, 65, 209, 32, 8, 192, + 127, 244, 1, 0, 0, 0, + 36, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 8, 1, 0, 0, 32, 2, 0, 0, 156, 2, 0, 0, - 28, 5, 0, 0, 140, 5, + 128, 5, 0, 0, 240, 5, 0, 0, 65, 111, 110, 57, 200, 0, 0, 0, 200, 0, 0, 0, 0, 2, 255, 255, @@ -3660,8 +3523,8 @@ const BYTE RGBShaderMask[] = 0, 0, 1, 0, 44, 0, 0, 0, 56, 0, 0, 0, 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 3, 0, - 0, 0, 0, 0, 1, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 5, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 31, 0, @@ -3674,10 +3537,10 @@ const BYTE RGBShaderMask[] = 0, 2, 0, 0, 3, 128, 0, 0, 235, 176, 66, 0, 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, + 0, 0, 228, 176, 0, 8, 228, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, + 228, 128, 1, 8, 228, 160, 5, 0, 0, 3, 1, 0, 7, 128, 1, 0, 228, 128, 0, 0, 0, 160, 1, 0, @@ -3699,7 +3562,7 @@ const BYTE RGBShaderMask[] = 0, 112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, @@ -3723,7 +3586,7 @@ const BYTE RGBShaderMask[] = 242, 0, 16, 0, 1, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 54, 0, 0, 6, 130, 0, 16, 0, 0, 0, @@ -3756,11 +3619,11 @@ const BYTE RGBShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 120, 2, 0, 0, 1, 0, + 220, 2, 0, 0, 1, 0, 0, 0, 188, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 69, 2, + 0, 1, 0, 0, 168, 2, 0, 0, 156, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3771,789 +3634,114 @@ const BYTE RGBShaderMask[] = 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 170, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 3, 0, 0, 0, - 1, 0, 0, 0, 13, 0, - 0, 0, 176, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 114, - 0, 116, 82, 71, 66, 0, - 116, 77, 97, 115, 107, 0, - 36, 71, 108, 111, 98, 97, - 108, 115, 0, 171, 171, 171, - 176, 0, 0, 0, 8, 0, - 0, 0, 212, 0, 0, 0, - 224, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 148, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 176, 1, 0, 0, 16, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 192, 1, - 0, 0, 0, 0, 0, 0, - 208, 1, 0, 0, 32, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 240, 1, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 252, 1, 0, 0, 160, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 16, 2, 0, 0, 176, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 192, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 59, 2, 0, 0, 208, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 -}; -ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// TEXCOORD 1 zw 1 NONE float zw -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1, r1, c0.x - mul r0, r0.x, r1 - mov oC0, r0 - -// approximately 6 instruction slots used (2 texture, 4 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 -dcl_input_ps linear v1.xy -dcl_input_ps linear v1.zw -dcl_output o0.xyzw -dcl_temps 2 -sample r0.xyzw, v1.xyxx, t0.xyzw, s0 -mul r0.xyzw, r0.xyzw, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 -mul o0.xyzw, r0.xyzw, r1.xxxx -ret -// Approximately 5 instruction slots used -#endif - -const BYTE RGBAShaderMask[] = -{ - 68, 88, 66, 67, 182, 158, - 23, 70, 121, 188, 140, 117, - 148, 125, 14, 205, 185, 113, - 155, 74, 1, 0, 0, 0, - 156, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 252, 0, 0, 0, 252, 1, - 0, 0, 120, 2, 0, 0, - 248, 4, 0, 0, 104, 5, - 0, 0, 65, 111, 110, 57, - 188, 0, 0, 0, 188, 0, - 0, 0, 0, 2, 255, 255, - 132, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 15, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 1, 0, - 0, 2, 0, 0, 3, 128, - 0, 0, 235, 176, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 0, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 248, 0, - 0, 0, 64, 0, 0, 0, - 62, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 90, 0, 0, 3, - 0, 96, 16, 0, 0, 0, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 0, 0, - 0, 0, 85, 85, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 3, 0, 0, 0, - 85, 85, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 98, 16, - 0, 3, 194, 16, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 1, 0, - 0, 0, 230, 26, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 6, 0, - 16, 0, 1, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 5, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, - 120, 2, 0, 0, 1, 0, - 0, 0, 188, 0, 0, 0, - 4, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 69, 2, - 0, 0, 156, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 165, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 170, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 3, 0, 0, 0, - 1, 0, 0, 0, 13, 0, - 0, 0, 176, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 114, - 0, 116, 82, 71, 66, 0, - 116, 77, 97, 115, 107, 0, - 36, 71, 108, 111, 98, 97, - 108, 115, 0, 171, 171, 171, - 176, 0, 0, 0, 8, 0, - 0, 0, 212, 0, 0, 0, - 224, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 148, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 176, 1, 0, 0, 16, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 192, 1, - 0, 0, 0, 0, 0, 0, - 208, 1, 0, 0, 32, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 240, 1, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 252, 1, 0, 0, 160, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 16, 2, 0, 0, 176, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 192, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 59, 2, 0, 0, 208, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 -}; -ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// TEXCOORD 1 zw 1 NONE float zw -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1, r1, c0.x - mul r0, r0.x, r1 - mul r0.xyz, r0.w, r0 - mov oC0, r0 - -// approximately 7 instruction slots used (2 texture, 5 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 -dcl_input_ps linear v1.xy -dcl_input_ps linear v1.zw -dcl_output o0.xyzw -dcl_temps 2 -sample r0.xyzw, v1.xyxx, t0.xyzw, s0 -mul r0.xyzw, r0.xyzw, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 -mul r0.xyzw, r0.xyzw, r1.xxxx -mul o0.xyz, r0.wwww, r0.xyzx -mov o0.w, r0.w -ret -// Approximately 7 instruction slots used -#endif - -const BYTE RGBAShaderMaskPremul[] = -{ - 68, 88, 66, 67, 170, 142, - 83, 183, 24, 153, 194, 125, - 42, 169, 16, 185, 222, 43, - 161, 111, 1, 0, 0, 0, - 220, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 12, 1, 0, 0, 60, 2, - 0, 0, 184, 2, 0, 0, - 56, 5, 0, 0, 168, 5, - 0, 0, 65, 111, 110, 57, - 204, 0, 0, 0, 204, 0, - 0, 0, 0, 2, 255, 255, - 148, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 15, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 1, 0, - 0, 2, 0, 0, 3, 128, - 0, 0, 235, 176, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 0, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 40, 1, 0, 0, - 64, 0, 0, 0, 74, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 3, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 98, 16, 0, 3, - 194, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 6, 128, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 1, 0, 0, 0, - 230, 26, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 3, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 1, 0, 0, 0, 56, 0, - 0, 7, 114, 32, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, - 130, 32, 16, 0, 0, 0, - 0, 0, 58, 0, 16, 0, - 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 7, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 120, 2, - 0, 0, 1, 0, 0, 0, - 188, 0, 0, 0, 4, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 1, - 0, 0, 69, 2, 0, 0, - 156, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 165, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 170, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 3, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, - 176, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 83, 97, 109, - 112, 108, 101, 114, 0, 116, - 82, 71, 66, 0, 116, 77, - 97, 115, 107, 0, 36, 71, - 108, 111, 98, 97, 108, 115, - 0, 171, 171, 171, 176, 0, - 0, 0, 8, 0, 0, 0, - 212, 0, 0, 0, 224, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 148, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 160, 1, 0, 0, - 0, 0, 0, 0, 176, 1, - 0, 0, 16, 0, 0, 0, - 4, 0, 0, 0, 2, 0, - 0, 0, 192, 1, 0, 0, - 0, 0, 0, 0, 208, 1, - 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 224, 1, 0, 0, - 0, 0, 0, 0, 240, 1, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 224, 1, 0, 0, - 0, 0, 0, 0, 252, 1, - 0, 0, 160, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 160, 1, 0, 0, - 0, 0, 0, 0, 16, 2, + 170, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 5, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 176, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 115, 83, + 97, 109, 112, 108, 101, 114, + 0, 116, 82, 71, 66, 0, + 116, 77, 97, 115, 107, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 176, 0, 0, 0, 10, 0, + 0, 0, 212, 0, 0, 0, + 48, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 196, 1, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 224, 1, 0, 0, 16, 0, + 0, 0, 4, 0, 0, 0, + 2, 0, 0, 0, 240, 1, + 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 16, 2, + 0, 0, 0, 0, 0, 0, + 32, 2, 0, 0, 48, 0, + 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 48, 2, - 0, 0, 192, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 0, 0, - 0, 0, 0, 0, 59, 2, - 0, 0, 208, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 0, 0, + 0, 0, 0, 0, 0, 0, + 64, 2, 0, 0, 112, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 76, 2, 0, 0, 176, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 96, 2, 0, 0, 192, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 128, 2, 0, 0, 208, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 139, 2, 0, 0, 224, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 149, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 1, 0, 3, 0, 1, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 1, 0, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, 71, 78, 104, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 80, 0, 0, 0, @@ -4582,7 +3770,7 @@ const BYTE RGBAShaderMaskPremul[] = 83, 86, 95, 84, 97, 114, 103, 101, 116, 0, 171, 171 }; -ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMaskPremul) }; +ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; #if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 @@ -4595,12 +3783,371 @@ ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMas // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tRGB texture float4 2d 0 1 +// tMask texture float4 2d 5 1 +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 1 zw 1 NONE float zw +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Target 0 xyzw 0 TARGET float xyzw +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) +// +// +// Sampler/Resource to DX9 shader sampler mappings: +// +// Target Sampler Source Sampler Source Resource +// -------------- --------------- ---------------- +// s0 s0 t0 +// s1 s0 t5 +// +// +// Level9 shader bytecode: +// + ps_2_x + dcl t0 + dcl_2d s0 + dcl_2d s1 + mov r0.xy, t0.wzzw + texld r1, t0, s0 + texld r0, r0, s1 + mul r1, r1, c0.x + mul r0, r0.x, r1 + mov oC0, r0 + +// approximately 6 instruction slots used (2 texture, 4 arithmetic) +ps_4_0 +dcl_constantbuffer cb0[2], immediateIndexed +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_resource_texture2d (float,float,float,float) t5 +dcl_input_ps linear v1.xy +dcl_input_ps linear v1.zw +dcl_output o0.xyzw +dcl_temps 2 +sample r0.xyzw, v1.xyxx, t0.xyzw, s0 +mul r0.xyzw, r0.xyzw, cb0[1].xxxx +sample r1.xyzw, v1.zwzz, t5.xyzw, s0 +mul o0.xyzw, r0.xyzw, r1.xxxx +ret +// Approximately 5 instruction slots used +#endif + +const BYTE RGBAShaderMask[] = +{ + 68, 88, 66, 67, 4, 189, + 159, 243, 83, 63, 56, 82, + 222, 120, 117, 50, 17, 240, + 195, 36, 1, 0, 0, 0, + 0, 6, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 252, 0, 0, 0, 252, 1, + 0, 0, 120, 2, 0, 0, + 92, 5, 0, 0, 204, 5, + 0, 0, 65, 111, 110, 57, + 188, 0, 0, 0, 188, 0, + 0, 0, 0, 2, 255, 255, + 132, 0, 0, 0, 56, 0, + 0, 0, 1, 0, 44, 0, + 0, 0, 56, 0, 0, 0, + 56, 0, 2, 0, 36, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 5, 0, 1, 0, + 0, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 1, 2, 255, 255, 31, 0, + 0, 2, 0, 0, 0, 128, + 0, 0, 15, 176, 31, 0, + 0, 2, 0, 0, 0, 144, + 0, 8, 15, 160, 31, 0, + 0, 2, 0, 0, 0, 144, + 1, 8, 15, 160, 1, 0, + 0, 2, 0, 0, 3, 128, + 0, 0, 235, 176, 66, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 228, 176, 0, 8, + 228, 160, 66, 0, 0, 3, + 0, 0, 15, 128, 0, 0, + 228, 128, 1, 8, 228, 160, + 5, 0, 0, 3, 1, 0, + 15, 128, 1, 0, 228, 128, + 0, 0, 0, 160, 5, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 0, 128, 1, 0, + 228, 128, 1, 0, 0, 2, + 0, 8, 15, 128, 0, 0, + 228, 128, 255, 255, 0, 0, + 83, 72, 68, 82, 248, 0, + 0, 0, 64, 0, 0, 0, + 62, 0, 0, 0, 89, 0, + 0, 4, 70, 142, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 90, 0, 0, 3, + 0, 96, 16, 0, 0, 0, + 0, 0, 88, 24, 0, 4, + 0, 112, 16, 0, 0, 0, + 0, 0, 85, 85, 0, 0, + 88, 24, 0, 4, 0, 112, + 16, 0, 5, 0, 0, 0, + 85, 85, 0, 0, 98, 16, + 0, 3, 50, 16, 16, 0, + 1, 0, 0, 0, 98, 16, + 0, 3, 194, 16, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 0, 0, 0, 0, 104, 0, + 0, 2, 2, 0, 0, 0, + 69, 0, 0, 9, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 0, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 56, 0, 0, 8, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 6, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 1, 0, + 0, 0, 230, 26, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 5, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 7, + 242, 32, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 1, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 5, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 82, 68, 69, 70, + 220, 2, 0, 0, 1, 0, + 0, 0, 188, 0, 0, 0, + 4, 0, 0, 0, 28, 0, + 0, 0, 0, 4, 255, 255, + 0, 1, 0, 0, 168, 2, + 0, 0, 156, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 165, 0, + 0, 0, 2, 0, 0, 0, + 5, 0, 0, 0, 4, 0, + 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, + 170, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 5, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 176, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 115, 83, + 97, 109, 112, 108, 101, 114, + 0, 116, 82, 71, 66, 0, + 116, 77, 97, 115, 107, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 176, 0, 0, 0, 10, 0, + 0, 0, 212, 0, 0, 0, + 48, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 196, 1, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 224, 1, 0, 0, 16, 0, + 0, 0, 4, 0, 0, 0, + 2, 0, 0, 0, 240, 1, + 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 16, 2, + 0, 0, 0, 0, 0, 0, + 32, 2, 0, 0, 48, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 64, 2, 0, 0, 112, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 76, 2, 0, 0, 176, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 96, 2, 0, 0, 192, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 128, 2, 0, 0, 208, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 139, 2, 0, 0, 224, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 149, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 1, 0, 3, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 12, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 +}; +ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4 fLayerColor; // Offset: 0 Size: 16 [unused] +// float fLayerOpacity; // Offset: 16 Size: 4 +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -4612,7 +4159,7 @@ ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMas // sSampler sampler NA NA 0 1 // LayerTextureSamplerLinear sampler NA NA 1 1 // tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -4645,7 +4192,7 @@ ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMas // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- // s0 s0 t0 -// s1 s1 t3 +// s1 s1 t5 // // // Level9 shader bytecode: @@ -4669,13 +4216,13 @@ dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v2.xyz dcl_output o0.xyzw dcl_temps 2 div r0.xy, v2.xyxx, v2.zzzz -sample r0.xyzw, r0.xyxx, t3.xyzw, s1 +sample r0.xyzw, r0.xyxx, t5.xyzw, s1 sample r1.xyzw, v1.xyxx, t0.xyzw, s0 mul r1.xyzw, r1.xyzw, cb0[1].xxxx mul o0.xyzw, r0.xxxx, r1.xyzw @@ -4685,15 +4232,15 @@ ret const BYTE RGBAShaderMask3D[] = { - 68, 88, 66, 67, 216, 42, - 250, 215, 154, 11, 43, 24, - 15, 254, 10, 66, 72, 210, - 238, 215, 1, 0, 0, 0, - 24, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 3, 204, + 183, 228, 12, 40, 73, 204, + 169, 156, 99, 236, 238, 160, + 185, 204, 1, 0, 0, 0, + 124, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 1, 0, 0, 64, 2, 0, 0, 188, 2, 0, 0, - 116, 5, 0, 0, 228, 5, + 216, 5, 0, 0, 72, 6, 0, 0, 65, 111, 110, 57, 216, 0, 0, 0, 216, 0, 0, 0, 0, 2, 255, 255, @@ -4702,7 +4249,7 @@ const BYTE RGBAShaderMask3D[] = 0, 0, 56, 0, 0, 0, 56, 0, 2, 0, 36, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 3, 1, 1, 0, + 0, 0, 5, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 31, 0, @@ -4745,7 +4292,7 @@ const BYTE RGBAShaderMask3D[] = 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 3, 0, 0, 0, 85, 85, + 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, 0, 3, @@ -4762,7 +4309,7 @@ const BYTE RGBAShaderMask3D[] = 242, 0, 16, 0, 0, 0, 0, 0, 70, 0, 16, 0, 0, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 1, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 1, 0, @@ -4802,12 +4349,12 @@ const BYTE RGBAShaderMask3D[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 176, 2, 0, 0, + 69, 70, 20, 3, 0, 0, 1, 0, 0, 0, 244, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 125, 2, 0, 0, 188, 0, + 224, 2, 0, 0, 188, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4823,11 +4370,11 @@ const BYTE RGBAShaderMask3D[] = 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 228, 0, + 13, 0, 0, 0, 228, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, - 3, 0, 0, 0, 1, 0, + 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4844,41 +4391,49 @@ const BYTE RGBAShaderMask3D[] = 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 234, 0, - 0, 0, 8, 0, 0, 0, - 12, 1, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 12, 1, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 204, 1, + 0, 0, 0, 0, 252, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 216, 1, 0, 0, - 0, 0, 0, 0, 232, 1, + 0, 0, 8, 2, 0, 0, + 0, 0, 0, 0, 24, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 8, 2, + 0, 0, 40, 2, 0, 0, + 0, 0, 0, 0, 56, 2, 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 24, 2, 0, 0, - 0, 0, 0, 0, 40, 2, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 24, 2, 0, 0, - 0, 0, 0, 0, 52, 2, - 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 216, 1, 0, 0, - 0, 0, 0, 0, 72, 2, + 0, 0, 72, 2, 0, 0, + 0, 0, 0, 0, 88, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 104, 2, 0, 0, + 0, 0, 0, 0, 120, 2, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 104, 2, 0, 0, + 0, 0, 0, 0, 132, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 88, 2, 0, 0, - 0, 0, 0, 0, 104, 2, + 0, 0, 8, 2, 0, 0, + 0, 0, 0, 0, 152, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 88, 2, 0, 0, - 0, 0, 0, 0, 115, 2, + 0, 0, 168, 2, 0, 0, + 0, 0, 0, 0, 184, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 88, 2, 0, 0, + 0, 0, 168, 2, 0, 0, + 0, 0, 0, 0, 195, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 168, 2, 0, 0, + 0, 0, 0, 0, 205, 2, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 104, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, 1, 0, @@ -4889,413 +4444,44 @@ const BYTE RGBAShaderMask3D[] = 105, 116, 121, 0, 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 92, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 7, 7, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171 -}; -ShaderBytes sRGBAShaderMask3D = { RGBAShaderMask3D, sizeof(RGBAShaderMask3D) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// LayerTextureSamplerLinear sampler NA NA 1 1 -// tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// TEXCOORD 1 xyz 2 NONE float xyz -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t0 -// s1 s1 t3 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r1, t0, s0 - texld r0, r0, s1 - mul r1, r1, c0.x - mul r0, r0.x, r1 - mul r0.xyz, r0.w, r0 - mov oC0, r0 - -// approximately 8 instruction slots used (2 texture, 6 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_sampler s1, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 -dcl_input_ps linear v1.xy -dcl_input_ps linear v2.xyz -dcl_output o0.xyzw -dcl_temps 2 -div r0.xy, v2.xyxx, v2.zzzz -sample r0.xyzw, r0.xyxx, t3.xyzw, s1 -sample r1.xyzw, v1.xyxx, t0.xyzw, s0 -mul r1.xyzw, r1.xyzw, cb0[1].xxxx -mul r0.xyzw, r0.xxxx, r1.xyzw -mul o0.xyz, r0.wwww, r0.xyzx -mov o0.w, r0.w -ret -// Approximately 8 instruction slots used -#endif - -const BYTE RGBAShaderMask3DPremul[] = -{ - 68, 88, 66, 67, 55, 2, - 221, 89, 65, 95, 19, 52, - 117, 31, 78, 231, 8, 20, - 150, 44, 1, 0, 0, 0, - 88, 6, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 40, 1, 0, 0, 128, 2, - 0, 0, 252, 2, 0, 0, - 180, 5, 0, 0, 36, 6, - 0, 0, 65, 111, 110, 57, - 232, 0, 0, 0, 232, 0, - 0, 0, 0, 2, 255, 255, - 176, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 3, 1, 1, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 128, - 1, 0, 7, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 6, 0, - 0, 2, 0, 0, 8, 128, - 1, 0, 170, 176, 5, 0, - 0, 3, 0, 0, 3, 128, - 0, 0, 255, 128, 1, 0, - 228, 176, 66, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 228, 176, 0, 8, 228, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 1, 8, 228, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 0, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 0, 128, 1, 0, 228, 128, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 80, 1, 0, 0, 64, 0, - 0, 0, 84, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 1, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 3, 0, - 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, - 98, 16, 0, 3, 114, 16, - 16, 0, 2, 0, 0, 0, - 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 14, 0, 0, 7, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 2, 0, 0, 0, 166, 26, - 16, 0, 2, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 0, 16, 0, 0, 0, - 0, 0, 70, 126, 16, 0, - 3, 0, 0, 0, 0, 96, - 16, 0, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 7, - 242, 0, 16, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 56, 0, 0, 7, 114, 32, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, - 0, 0, 0, 0, 58, 0, - 16, 0, 0, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 8, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, - 176, 2, 0, 0, 1, 0, - 0, 0, 244, 0, 0, 0, - 5, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 125, 2, - 0, 0, 188, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 197, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 223, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 228, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, - 0, 0, 1, 0, 0, 0, - 13, 0, 0, 0, 234, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 83, 97, 109, 112, 108, - 101, 114, 0, 76, 97, 121, - 101, 114, 84, 101, 120, 116, - 117, 114, 101, 83, 97, 109, - 112, 108, 101, 114, 76, 105, - 110, 101, 97, 114, 0, 116, - 82, 71, 66, 0, 116, 77, - 97, 115, 107, 0, 36, 71, - 108, 111, 98, 97, 108, 115, - 0, 171, 234, 0, 0, 0, - 8, 0, 0, 0, 12, 1, - 0, 0, 224, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 216, 1, 0, 0, 0, 0, - 0, 0, 232, 1, 0, 0, - 16, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 248, 1, 0, 0, 0, 0, - 0, 0, 8, 2, 0, 0, - 32, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 24, 2, 0, 0, 0, 0, - 0, 0, 40, 2, 0, 0, - 96, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 24, 2, 0, 0, 0, 0, - 0, 0, 52, 2, 0, 0, - 160, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 216, 1, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, - 176, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 88, 2, 0, 0, 0, 0, - 0, 0, 104, 2, 0, 0, - 192, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 88, 2, 0, 0, 0, 0, - 0, 0, 115, 2, 0, 0, - 208, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 88, 2, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 1, 0, 3, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 79, 112, 97, 99, 105, 116, - 121, 0, 171, 171, 0, 0, - 3, 0, 1, 0, 1, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 76, 97, 121, - 101, 114, 84, 114, 97, 110, - 115, 102, 111, 114, 109, 0, - 3, 0, 3, 0, 4, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 118, 82, - 101, 110, 100, 101, 114, 84, - 97, 114, 103, 101, 116, 79, - 102, 102, 115, 101, 116, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 77, - 105, 99, 114, 111, 115, 111, - 102, 116, 32, 40, 82, 41, - 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, - 108, 101, 114, 32, 54, 46, - 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, - 0, 171, 73, 83, 71, 78, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, 104, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 80, 0, 0, 0, 0, 0, @@ -5324,7 +4510,7 @@ const BYTE RGBAShaderMask3DPremul[] = 95, 84, 97, 114, 103, 101, 116, 0, 171, 171 }; -ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShaderMask3DPremul) }; +ShaderBytes sRGBAShaderMask3D = { RGBAShaderMask3D, sizeof(RGBAShaderMask3D) }; #if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 @@ -5337,12 +4523,14 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -5352,10 +4540,10 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 -// tY texture float4 2d 0 1 -// tCb texture float4 2d 1 1 -// tCr texture float4 2d 2 1 -// tMask texture float4 2d 3 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 1 +// tCr texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -5387,10 +4575,10 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// s2 s0 t1 -// s3 s0 t2 +// s0 s0 t1 +// s1 s0 t2 +// s2 s0 t3 +// s3 s0 t5 // // // Level9 shader bytecode: @@ -5403,16 +4591,16 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade dcl_2d s1 dcl_2d s2 dcl_2d s3 - texld r0, t0, s1 - texld r1, t0, s3 + texld r0, t0, s0 + texld r1, t0, s2 add r0.y, r1.x, c1.x mul r0.yz, r0.y, c1.xzww add r0.x, r0.x, c1.y mad r0.z, r0.x, c2.x, -r0.z mad r1.x, r0.x, c2.x, r0.y mov r2.xy, t0.wzzw - texld r3, t0, s2 - texld r2, r2, s0 + texld r3, t0, s1 + texld r2, r2, s3 add r0.y, r3.x, c1.x mad r1.y, r0.y, -c2.z, r0.z mul r0.y, r0.y, c2.y @@ -5426,29 +4614,29 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_temps 3 -sample r0.xyzw, v1.xyxx, t2.xyzw, s0 +sample r0.xyzw, v1.xyxx, t3.xyzw, s0 add r0.x, r0.x, l(-0.501960) mul r0.xy, r0.xxxx, l(1.596030, 0.812970, 0.000000, 0.000000) -sample r1.xyzw, v1.xyxx, t0.xyzw, s0 +sample r1.xyzw, v1.xyxx, t1.xyzw, s0 add r0.z, r1.x, l(-0.062750) mad r0.y, r0.z, l(1.164380), -r0.y mad r1.x, r0.z, l(1.164380), r0.x -sample r2.xyzw, v1.xyxx, t1.xyzw, s0 +sample r2.xyzw, v1.xyxx, t2.xyzw, s0 add r0.x, r2.x, l(-0.501960) mad r1.y, -r0.x, l(0.391760), r0.y mul r0.x, r0.x, l(2.017230) mad r1.z, r0.z, l(1.164380), r0.x mov r1.w, l(1.000000) mul r0.xyzw, r1.xyzw, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 +sample r1.xyzw, v1.zwzz, t5.xyzw, s0 mul o0.xyzw, r0.xyzw, r1.xxxx ret // Approximately 17 instruction slots used @@ -5456,15 +4644,15 @@ ret const BYTE YCbCrShaderMask[] = { - 68, 88, 66, 67, 154, 30, - 246, 171, 67, 224, 184, 33, - 20, 150, 106, 233, 226, 126, - 80, 130, 1, 0, 0, 0, - 168, 8, 0, 0, 6, 0, + 68, 88, 66, 67, 221, 32, + 127, 20, 214, 189, 35, 93, + 175, 146, 75, 225, 8, 148, + 130, 206, 1, 0, 0, 0, + 12, 9, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 2, 0, 0, 196, 4, 0, 0, 64, 5, 0, 0, - 4, 8, 0, 0, 116, 8, + 104, 8, 0, 0, 216, 8, 0, 0, 65, 111, 110, 57, 216, 1, 0, 0, 216, 1, 0, 0, 0, 2, 255, 255, @@ -5472,9 +4660,9 @@ const BYTE YCbCrShaderMask[] = 0, 0, 1, 0, 52, 0, 0, 0, 64, 0, 0, 0, 64, 0, 4, 0, 36, 0, - 0, 0, 64, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 2, 0, 2, 0, + 0, 0, 64, 0, 1, 0, + 0, 0, 2, 0, 1, 0, + 3, 0, 2, 0, 5, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, @@ -5498,9 +4686,9 @@ const BYTE YCbCrShaderMask[] = 0, 144, 3, 8, 15, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, 228, 176, - 1, 8, 228, 160, 66, 0, + 0, 8, 228, 160, 66, 0, 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 3, 8, + 0, 0, 228, 176, 2, 8, 228, 160, 2, 0, 0, 3, 0, 0, 2, 128, 1, 0, 0, 128, 1, 0, 0, 160, @@ -5520,9 +4708,9 @@ const BYTE YCbCrShaderMask[] = 3, 128, 0, 0, 235, 176, 66, 0, 0, 3, 3, 0, 15, 128, 0, 0, 228, 176, - 2, 8, 228, 160, 66, 0, + 1, 8, 228, 160, 66, 0, 0, 3, 2, 0, 15, 128, - 2, 0, 228, 128, 0, 8, + 2, 0, 228, 128, 3, 8, 228, 160, 2, 0, 0, 3, 0, 0, 2, 128, 3, 0, 0, 128, 1, 0, 0, 160, @@ -5554,15 +4742,15 @@ const BYTE YCbCrShaderMask[] = 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, + 1, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 2, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 2, 0, 0, 0, + 16, 0, 3, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 3, 0, 0, 0, 85, 85, + 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, 0, 3, @@ -5574,7 +4762,7 @@ const BYTE YCbCrShaderMask[] = 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 2, 0, + 70, 126, 16, 0, 3, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, @@ -5592,7 +4780,7 @@ const BYTE YCbCrShaderMask[] = 16, 0, 1, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, + 1, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 66, 0, 16, 0, 0, 0, 0, 0, @@ -5615,7 +4803,7 @@ const BYTE YCbCrShaderMask[] = 242, 0, 16, 0, 2, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 1, 0, 0, 0, + 16, 0, 2, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, 0, 0, @@ -5652,7 +4840,7 @@ const BYTE YCbCrShaderMask[] = 16, 0, 1, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 3, 0, 0, 0, 0, 96, + 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0, 7, 242, 32, 16, 0, 0, 0, 0, 0, @@ -5680,12 +4868,12 @@ const BYTE YCbCrShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 188, 2, + 82, 68, 69, 70, 32, 3, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 6, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 137, 2, 0, 0, + 0, 0, 236, 2, 0, 0, 220, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5694,23 +4882,23 @@ const BYTE YCbCrShaderMask[] = 0, 0, 229, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, + 255, 255, 255, 255, 1, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 232, 0, + 13, 0, 0, 0, 232, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, + 2, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, 236, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 2, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 255, 255, 3, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 240, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, + 255, 255, 255, 255, 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, @@ -5724,41 +4912,49 @@ const BYTE YCbCrShaderMask[] = 114, 0, 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, - 246, 0, 0, 0, 8, 0, + 246, 0, 0, 0, 10, 0, 0, 0, 24, 1, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 216, 1, 0, 0, 0, 0, + 8, 2, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 20, 2, 0, 0, 0, 0, 0, 0, - 244, 1, 0, 0, 16, 0, + 36, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 4, 2, + 2, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, - 20, 2, 0, 0, 32, 0, + 68, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 84, 2, + 0, 0, 0, 0, 0, 0, + 100, 2, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 52, 2, 0, 0, 96, 0, + 132, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 64, 2, 0, 0, 160, 0, + 144, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 20, 2, 0, 0, 0, 0, 0, 0, - 84, 2, 0, 0, 176, 0, + 164, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 180, 2, 0, 0, 0, 0, 0, 0, - 116, 2, 0, 0, 192, 0, + 196, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 180, 2, 0, 0, 0, 0, 0, 0, - 127, 2, 0, 0, 208, 0, + 207, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 180, 2, + 0, 0, 0, 0, 0, 0, + 217, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -5770,62 +4966,70 @@ const BYTE YCbCrShaderMask[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 12, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; #if 0 @@ -5840,12 +5044,14 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -5856,8 +5062,8 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 // tRGB texture float4 2d 0 1 -// tRGBWhite texture float4 2d 1 1 -// tMask texture float4 2d 3 1 +// tRGBWhite texture float4 2d 4 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -5890,9 +5096,9 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// s2 s0 t1 +// s0 s0 t0 +// s1 s0 t4 +// s2 s0 t5 // // // Level9 shader bytecode: @@ -5904,10 +5110,10 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; dcl_2d s1 dcl_2d s2 mov r0.xy, t0.wzzw - texld r0, r0, s0 + texld r0, r0, s2 mul r0.x, r0.x, c0.x - texld r1, t0, s1 - texld r2, t0, s2 + texld r1, t0, s0 + texld r2, t0, s1 add r2, r1, -r2 add r2, r2, c1.x mov r1.w, r2.y @@ -5921,19 +5127,19 @@ ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t1 -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t4 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_output o1.xyzw dcl_temps 3 -sample r0.xyzw, v1.xyxx, t1.xyzw, s0 +sample r0.xyzw, v1.xyxx, t4.xyzw, s0 sample r1.xyzw, v1.xyxx, t0.xyzw, s0 add r0.xyzw, -r0.xyzw, r1.xyzw add r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000) mov r1.w, r0.y -sample r2.xyzw, v1.zwzz, t3.xyzw, s0 +sample r2.xyzw, v1.zwzz, t5.xyzw, s0 mul r2.x, r2.x, cb0[1].x mul o0.xyzw, r1.xyzw, r2.xxxx mul o1.xyzw, r0.xyzw, r2.xxxx @@ -5943,15 +5149,15 @@ ret const BYTE ComponentAlphaShaderMask[] = { - 68, 88, 66, 67, 102, 2, - 84, 222, 33, 141, 105, 188, - 152, 82, 64, 100, 57, 101, - 192, 110, 1, 0, 0, 0, - 20, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 231, 247, + 98, 196, 91, 244, 200, 52, + 117, 97, 164, 190, 237, 87, + 108, 62, 1, 0, 0, 0, + 120, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 124, 1, 0, 0, 52, 3, 0, 0, 176, 3, 0, 0, - 88, 6, 0, 0, 200, 6, + 188, 6, 0, 0, 44, 7, 0, 0, 65, 111, 110, 57, 60, 1, 0, 0, 60, 1, 0, 0, 0, 2, 255, 255, @@ -5959,9 +5165,9 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 1, 0, 48, 0, 0, 0, 60, 0, 0, 0, 60, 0, 3, 0, 36, 0, - 0, 0, 60, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 2, 0, 0, 0, + 0, 0, 60, 0, 0, 0, + 0, 0, 4, 0, 1, 0, + 5, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, @@ -5980,15 +5186,15 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 3, 128, 0, 0, 235, 176, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, + 228, 128, 2, 8, 228, 160, 5, 0, 0, 3, 0, 0, 1, 128, 0, 0, 0, 128, 0, 0, 0, 160, 66, 0, 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, + 0, 0, 228, 176, 0, 8, 228, 160, 66, 0, 0, 3, 2, 0, 15, 128, 0, 0, - 228, 176, 2, 8, 228, 160, + 228, 176, 1, 8, 228, 160, 2, 0, 0, 3, 2, 0, 15, 128, 1, 0, 228, 128, 2, 0, 228, 129, 2, 0, @@ -6017,10 +5223,10 @@ const BYTE ComponentAlphaShaderMask[] = 0, 4, 0, 112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 4, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, @@ -6035,7 +5241,7 @@ const BYTE ComponentAlphaShaderMask[] = 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 1, 0, 0, 0, 0, 96, + 4, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 1, 0, 0, 0, @@ -6062,7 +5268,7 @@ const BYTE ComponentAlphaShaderMask[] = 242, 0, 16, 0, 2, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0, 8, 18, 0, 16, 0, 2, 0, @@ -6101,11 +5307,11 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 160, 2, 0, 0, 1, 0, + 4, 3, 0, 0, 1, 0, 0, 0, 228, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 109, 2, + 0, 1, 0, 0, 208, 2, 0, 0, 188, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6116,16 +5322,16 @@ const BYTE ComponentAlphaShaderMask[] = 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 202, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 1, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 255, 255, 4, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 212, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, + 255, 255, 255, 255, 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, @@ -6140,41 +5346,49 @@ const BYTE ComponentAlphaShaderMask[] = 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 218, 0, - 0, 0, 8, 0, 0, 0, - 252, 0, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 252, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 188, 1, + 0, 0, 0, 0, 236, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 200, 1, 0, 0, - 0, 0, 0, 0, 216, 1, + 0, 0, 248, 1, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 232, 1, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 24, 2, 0, 0, + 0, 0, 0, 0, 40, 2, 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 8, 2, 0, 0, - 0, 0, 0, 0, 24, 2, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 8, 2, 0, 0, - 0, 0, 0, 0, 36, 2, - 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 200, 1, 0, 0, - 0, 0, 0, 0, 56, 2, + 0, 0, 56, 2, 0, 0, + 0, 0, 0, 0, 72, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 88, 2, 0, 0, + 0, 0, 0, 0, 104, 2, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 88, 2, 0, 0, + 0, 0, 0, 0, 116, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, - 0, 0, 0, 0, 88, 2, + 0, 0, 248, 1, 0, 0, + 0, 0, 0, 0, 136, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, - 0, 0, 0, 0, 99, 2, + 0, 0, 152, 2, 0, 0, + 0, 0, 0, 0, 168, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, + 0, 0, 152, 2, 0, 0, + 0, 0, 0, 0, 179, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 152, 2, 0, 0, + 0, 0, 0, 0, 189, 2, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 88, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, 1, 0, @@ -6185,6 +5399,1060 @@ const BYTE ComponentAlphaShaderMask[] = 105, 116, 121, 0, 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 104, 0, 0, 0, 3, 0, + 0, 0, 8, 0, 0, 0, + 80, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 3, 0, 0, + 92, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 12, 12, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 79, 83, 71, 78, 68, 0, + 0, 0, 2, 0, 0, 0, + 8, 0, 0, 0, 56, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 56, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 15, 0, 0, 0, 83, 86, + 95, 84, 97, 114, 103, 101, + 116, 0, 171, 171 +}; +ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(ComponentAlphaShaderMask) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4x4 mLayerTransform; // Offset: 0 Size: 64 +// float4x4 mProjection; // Offset: 64 Size: 64 +// float4 vRenderTargetOffset; // Offset: 128 Size: 16 +// float4 vTextureCoords; // Offset: 144 Size: 16 +// float4 vLayerQuad; // Offset: 160 Size: 16 +// float4 vMaskQuad; // Offset: 176 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c1 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c3 cb0 3 8 ( FLT, FLT, FLT, FLT) +// c11 cb0 12 2 ( FLT, FLT, FLT, FLT) +// c13 cb0 15 1 ( FLT, FLT, FLT, FLT) +// +// +// Runtime generated constant mappings: +// +// Target Reg Constant Description +// ---------- -------------------------------------------------- +// c0 Vertex Shader position offset +// +// +// Level9 shader bytecode: +// + vs_2_x + def c14, 1, 0.5, 0, 0 + dcl_texcoord v0 + mad oT0.xy, v0, c9.zwzw, c9 + mad r0.xy, v0, c10.zwzw, c10 + mul r1, r0.y, c2 + mad r0, c1, r0.x, r1 + add r0, r0, c3 + rcp r1.x, r0.w + mul r0.xyz, r0, r1.x + add r0, r0, -c8 + mul r0.xyz, r0.w, r0 + mul r1, r0.y, c5 + mad r1, c4, r0.x, r1 + mad r1, c6, r0.z, r1 + mad r0, c7, r0.w, r1 + add r1.xy, r0, c14.x + mad r1.y, r1.y, -c14.y, c14.x + mul r1.x, r1.x, c14.y + mul r1.yz, r1.y, c12.xyxw + mad r1.xy, c11.yxzw, r1.x, r1.yzzw + add oT0.zw, r1.xyxy, c13.xyyx + mad oPos.xy, r0.w, c0, r0 + mov oPos.zw, r0 + mov oT1.xyz, c14.z + +// approximately 22 instruction slots used +vs_4_0 +dcl_constantbuffer cb0[16], immediateIndexed +dcl_input v0.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +dcl_output o1.zw +dcl_output o2.xyz +dcl_temps 2 +mad r0.xy, v0.xyxx, cb0[10].zwzz, cb0[10].xyxx +mul r1.xyzw, r0.yyyy, cb0[1].xyzw +mad r0.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw +add r0.xyzw, r0.xyzw, cb0[3].xyzw +div r0.xyz, r0.xyzx, r0.wwww +add r0.xyzw, r0.xyzw, -cb0[8].xyzw +mul r0.xyz, r0.wwww, r0.xyzx +mul r1.xyzw, r0.yyyy, cb0[5].xyzw +mad r1.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw +mad r1.xyzw, cb0[6].xyzw, r0.zzzz, r1.xyzw +mad r0.xyzw, cb0[7].xyzw, r0.wwww, r1.xyzw +mov o0.xyzw, r0.xyzw +add r0.xy, r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) +mad r0.y, -r0.y, l(0.500000), l(1.000000) +mul r0.x, r0.x, l(0.500000) +mul r0.yz, r0.yyyy, cb0[13].xxyx +mad r0.xy, cb0[12].xyxx, r0.xxxx, r0.yzyy +add o1.zw, r0.xxxy, cb0[15].xxxy +mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx +mov o2.xyz, l(0,0,0,0) +ret +// Approximately 21 instruction slots used +#endif + +const BYTE LayerQuadBlendVS[] = +{ + 68, 88, 66, 67, 238, 0, + 14, 218, 242, 150, 72, 155, + 68, 134, 76, 43, 160, 82, + 75, 24, 1, 0, 0, 0, + 12, 9, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 60, 2, 0, 0, 100, 5, + 0, 0, 224, 5, 0, 0, + 80, 8, 0, 0, 132, 8, + 0, 0, 65, 111, 110, 57, + 252, 1, 0, 0, 252, 1, + 0, 0, 0, 2, 254, 255, + 164, 1, 0, 0, 88, 0, + 0, 0, 4, 0, 36, 0, + 0, 0, 84, 0, 0, 0, + 84, 0, 0, 0, 36, 0, + 1, 0, 84, 0, 0, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 8, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 12, 0, 2, 0, 11, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 1, 0, 13, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 254, 255, + 81, 0, 0, 5, 14, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 31, 0, 0, 2, 5, 0, + 0, 128, 0, 0, 15, 144, + 4, 0, 0, 4, 0, 0, + 3, 224, 0, 0, 228, 144, + 9, 0, 238, 160, 9, 0, + 228, 160, 4, 0, 0, 4, + 0, 0, 3, 128, 0, 0, + 228, 144, 10, 0, 238, 160, + 10, 0, 228, 160, 5, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 85, 128, 2, 0, + 228, 160, 4, 0, 0, 4, + 0, 0, 15, 128, 1, 0, + 228, 160, 0, 0, 0, 128, + 1, 0, 228, 128, 2, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 228, 128, 3, 0, + 228, 160, 6, 0, 0, 2, + 1, 0, 1, 128, 0, 0, + 255, 128, 5, 0, 0, 3, + 0, 0, 7, 128, 0, 0, + 228, 128, 1, 0, 0, 128, + 2, 0, 0, 3, 0, 0, + 15, 128, 0, 0, 228, 128, + 8, 0, 228, 161, 5, 0, + 0, 3, 0, 0, 7, 128, + 0, 0, 255, 128, 0, 0, + 228, 128, 5, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 85, 128, 5, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 4, 0, 228, 160, + 0, 0, 0, 128, 1, 0, + 228, 128, 4, 0, 0, 4, + 1, 0, 15, 128, 6, 0, + 228, 160, 0, 0, 170, 128, + 1, 0, 228, 128, 4, 0, + 0, 4, 0, 0, 15, 128, + 7, 0, 228, 160, 0, 0, + 255, 128, 1, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 3, 128, 0, 0, 228, 128, + 14, 0, 0, 160, 4, 0, + 0, 4, 1, 0, 2, 128, + 1, 0, 85, 128, 14, 0, + 85, 161, 14, 0, 0, 160, + 5, 0, 0, 3, 1, 0, + 1, 128, 1, 0, 0, 128, + 14, 0, 85, 160, 5, 0, + 0, 3, 1, 0, 6, 128, + 1, 0, 85, 128, 12, 0, + 196, 160, 4, 0, 0, 4, + 1, 0, 3, 128, 11, 0, + 225, 160, 1, 0, 0, 128, + 1, 0, 233, 128, 2, 0, + 0, 3, 0, 0, 12, 224, + 1, 0, 68, 128, 13, 0, + 20, 160, 4, 0, 0, 4, + 0, 0, 3, 192, 0, 0, + 255, 128, 0, 0, 228, 160, + 0, 0, 228, 128, 1, 0, + 0, 2, 0, 0, 12, 192, + 0, 0, 228, 128, 1, 0, + 0, 2, 1, 0, 7, 224, + 14, 0, 170, 160, 255, 255, + 0, 0, 83, 72, 68, 82, + 32, 3, 0, 0, 64, 0, + 1, 0, 200, 0, 0, 0, + 89, 0, 0, 4, 70, 142, + 32, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 95, 0, + 0, 3, 50, 16, 16, 0, + 0, 0, 0, 0, 103, 0, + 0, 4, 242, 32, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 50, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 194, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 114, 32, 16, 0, 2, 0, + 0, 0, 104, 0, 0, 2, + 2, 0, 0, 0, 50, 0, + 0, 11, 50, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 0, 0, 0, 0, + 230, 138, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 70, 128, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 56, 0, 0, 8, 242, 0, + 16, 0, 1, 0, 0, 0, + 86, 5, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 128, + 65, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 7, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 242, 0, 16, 0, + 1, 0, 0, 0, 86, 5, + 16, 0, 0, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 5, 0, 0, 0, + 50, 0, 0, 10, 242, 0, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 6, 0, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 1, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 166, 10, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 7, 0, + 0, 0, 246, 15, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 242, 32, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 10, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 50, 0, 0, 10, 34, 0, + 16, 0, 0, 0, 0, 0, + 26, 0, 16, 128, 65, 0, + 0, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 63, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 7, 18, 0, 16, 0, + 0, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 63, 56, 0, 0, 8, + 98, 0, 16, 0, 0, 0, + 0, 0, 86, 5, 16, 0, + 0, 0, 0, 0, 6, 129, + 32, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 50, 0, + 0, 10, 50, 0, 16, 0, + 0, 0, 0, 0, 70, 128, + 32, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 150, 5, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 194, 32, 16, 0, 1, 0, + 0, 0, 6, 4, 16, 0, + 0, 0, 0, 0, 6, 132, + 32, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 50, 0, + 0, 11, 50, 32, 16, 0, + 1, 0, 0, 0, 70, 16, + 16, 0, 0, 0, 0, 0, + 230, 138, 32, 0, 0, 0, + 0, 0, 9, 0, 0, 0, + 70, 128, 32, 0, 0, 0, + 0, 0, 9, 0, 0, 0, + 54, 0, 0, 8, 114, 32, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 21, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 5, 0, 0, 0, + 18, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 68, + 69, 70, 104, 2, 0, 0, + 1, 0, 0, 0, 72, 0, + 0, 0, 1, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 254, 255, 0, 1, 0, 0, + 52, 2, 0, 0, 60, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 60, 0, 0, 0, 10, 0, + 0, 0, 96, 0, 0, 0, + 48, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 80, 1, 0, 0, 0, 0, + 0, 0, 64, 0, 0, 0, + 2, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 112, 1, 0, 0, 64, 0, + 0, 0, 64, 0, 0, 0, + 2, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 124, 1, 0, 0, 128, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 144, 1, + 0, 0, 0, 0, 0, 0, + 160, 1, 0, 0, 144, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 176, 1, + 0, 0, 0, 0, 0, 0, + 192, 1, 0, 0, 160, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 176, 1, + 0, 0, 0, 0, 0, 0, + 203, 1, 0, 0, 176, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 176, 1, + 0, 0, 0, 0, 0, 0, + 213, 1, 0, 0, 192, 0, + 0, 0, 64, 0, 0, 0, + 2, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 232, 1, 0, 0, 0, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 144, 1, + 0, 0, 0, 0, 0, 0, + 244, 1, 0, 0, 16, 1, + 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 4, 2, + 0, 0, 0, 0, 0, 0, + 20, 2, 0, 0, 32, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 118, 84, 101, 120, + 116, 117, 114, 101, 67, 111, + 111, 114, 100, 115, 0, 171, + 1, 0, 3, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 118, 76, + 97, 121, 101, 114, 81, 117, + 97, 100, 0, 118, 77, 97, + 115, 107, 81, 117, 97, 100, + 0, 109, 66, 97, 99, 107, + 100, 114, 111, 112, 84, 114, + 97, 110, 115, 102, 111, 114, + 109, 0, 102, 76, 97, 121, + 101, 114, 67, 111, 108, 111, + 114, 0, 102, 76, 97, 121, + 101, 114, 79, 112, 97, 99, + 105, 116, 121, 0, 171, 171, + 0, 0, 3, 0, 1, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 44, 0, 0, 0, + 1, 0, 0, 0, 8, 0, + 0, 0, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 3, 3, + 0, 0, 80, 79, 83, 73, + 84, 73, 79, 78, 0, 171, + 171, 171, 79, 83, 71, 78, + 128, 0, 0, 0, 4, 0, + 0, 0, 8, 0, 0, 0, + 104, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 116, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 12, 0, 0, + 116, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 12, 3, 0, 0, + 116, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 7, 8, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171 +}; +ShaderBytes sLayerQuadBlendVS = { LayerQuadBlendVS, sizeof(LayerQuadBlendVS) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4x4 mLayerTransform; // Offset: 0 Size: 64 +// float4x4 mProjection; // Offset: 64 Size: 64 +// float4 vRenderTargetOffset; // Offset: 128 Size: 16 +// float4 vTextureCoords; // Offset: 144 Size: 16 +// float4 vLayerQuad; // Offset: 160 Size: 16 +// float4 vMaskQuad; // Offset: 176 Size: 16 +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c1 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c3 cb0 3 11 ( FLT, FLT, FLT, FLT) +// c14 cb0 15 1 ( FLT, FLT, FLT, FLT) +// +// +// Runtime generated constant mappings: +// +// Target Reg Constant Description +// ---------- -------------------------------------------------- +// c0 Vertex Shader position offset +// +// +// Level9 shader bytecode: +// + vs_2_x + def c15, 1, 0.5, 0, 0 + dcl_texcoord v0 + rcp r0.x, c11.z + mad r0.yz, v0.xxyw, c10.xzww, c10.xxyw + mul r1, r0.z, c2 + mad r1, c1, r0.y, r1 + add r1, r1, c3 + add r0.yz, r1.xxyw, -c11.xxyw + mul oT1.x, r0.x, r0.y + rcp r0.x, c11.w + mul oT1.y, r0.x, r0.z + mad oT0.xy, v0, c9.zwzw, c9 + rcp r0.x, r1.w + mul r1.xyz, r0.x, r1 + add r0, r1, -c8 + mul r0.xyz, r0.w, r0 + mul r1, r0.y, c5 + mad r1, c4, r0.x, r1 + mad r1, c6, r0.z, r1 + mad r0, c7, r0.w, r1 + add r1.xy, r0, c15.x + mad r1.y, r1.y, -c15.y, c15.x + mul r1.x, r1.x, c15.y + mul r1.yz, r1.y, c13.xyxw + mad r1.xy, c12.yxzw, r1.x, r1.yzzw + add oT0.zw, r1.xyxy, c14.xyyx + mad oPos.xy, r0.w, c0, r0 + mov oPos.zw, r0 + mov oT1.z, c15.z + +// approximately 27 instruction slots used +vs_4_0 +dcl_constantbuffer cb0[16], immediateIndexed +dcl_input v0.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +dcl_output o1.zw +dcl_output o2.xyz +dcl_temps 2 +mad r0.xy, v0.xyxx, cb0[10].zwzz, cb0[10].xyxx +mul r1.xyzw, r0.yyyy, cb0[1].xyzw +mad r0.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw +add r0.xyzw, r0.xyzw, cb0[3].xyzw +div r1.xyz, r0.xyzx, r0.wwww +mov r1.w, r0.w +add r0.xy, r0.xyxx, -cb0[11].xyxx +div o2.xy, r0.xyxx, cb0[11].zwzz +add r0.xyzw, r1.xyzw, -cb0[8].xyzw +mul r0.xyz, r0.wwww, r0.xyzx +mul r1.xyzw, r0.yyyy, cb0[5].xyzw +mad r1.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw +mad r1.xyzw, cb0[6].xyzw, r0.zzzz, r1.xyzw +mad r0.xyzw, cb0[7].xyzw, r0.wwww, r1.xyzw +mov o0.xyzw, r0.xyzw +add r0.xy, r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) +mad r0.y, -r0.y, l(0.500000), l(1.000000) +mul r0.x, r0.x, l(0.500000) +mul r0.yz, r0.yyyy, cb0[13].xxyx +mad r0.xy, cb0[12].xyxx, r0.xxxx, r0.yzyy +add o1.zw, r0.xxxy, cb0[15].xxxy +mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx +mov o2.z, l(0) +ret +// Approximately 24 instruction slots used +#endif + +const BYTE LayerQuadBlendMaskVS[] = +{ + 68, 88, 66, 67, 120, 167, + 168, 154, 138, 114, 232, 254, + 144, 109, 183, 6, 132, 16, + 244, 173, 1, 0, 0, 0, + 148, 9, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 120, 2, 0, 0, 236, 5, + 0, 0, 104, 6, 0, 0, + 216, 8, 0, 0, 12, 9, + 0, 0, 65, 111, 110, 57, + 56, 2, 0, 0, 56, 2, + 0, 0, 0, 2, 254, 255, + 236, 1, 0, 0, 76, 0, + 0, 0, 3, 0, 36, 0, + 0, 0, 72, 0, 0, 0, + 72, 0, 0, 0, 36, 0, + 1, 0, 72, 0, 0, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 11, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 1, 0, 14, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 254, 255, + 81, 0, 0, 5, 15, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 31, 0, 0, 2, 5, 0, + 0, 128, 0, 0, 15, 144, + 6, 0, 0, 2, 0, 0, + 1, 128, 11, 0, 170, 160, + 4, 0, 0, 4, 0, 0, + 6, 128, 0, 0, 208, 144, + 10, 0, 248, 160, 10, 0, + 208, 160, 5, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 170, 128, 2, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 1, 0, 228, 160, + 0, 0, 85, 128, 1, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 15, 128, 1, 0, + 228, 128, 3, 0, 228, 160, + 2, 0, 0, 3, 0, 0, + 6, 128, 1, 0, 208, 128, + 11, 0, 208, 161, 5, 0, + 0, 3, 1, 0, 1, 224, + 0, 0, 0, 128, 0, 0, + 85, 128, 6, 0, 0, 2, + 0, 0, 1, 128, 11, 0, + 255, 160, 5, 0, 0, 3, + 1, 0, 2, 224, 0, 0, + 0, 128, 0, 0, 170, 128, + 4, 0, 0, 4, 0, 0, + 3, 224, 0, 0, 228, 144, + 9, 0, 238, 160, 9, 0, + 228, 160, 6, 0, 0, 2, + 0, 0, 1, 128, 1, 0, + 255, 128, 5, 0, 0, 3, + 1, 0, 7, 128, 0, 0, + 0, 128, 1, 0, 228, 128, + 2, 0, 0, 3, 0, 0, + 15, 128, 1, 0, 228, 128, + 8, 0, 228, 161, 5, 0, + 0, 3, 0, 0, 7, 128, + 0, 0, 255, 128, 0, 0, + 228, 128, 5, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 85, 128, 5, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 4, 0, 228, 160, + 0, 0, 0, 128, 1, 0, + 228, 128, 4, 0, 0, 4, + 1, 0, 15, 128, 6, 0, + 228, 160, 0, 0, 170, 128, + 1, 0, 228, 128, 4, 0, + 0, 4, 0, 0, 15, 128, + 7, 0, 228, 160, 0, 0, + 255, 128, 1, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 3, 128, 0, 0, 228, 128, + 15, 0, 0, 160, 4, 0, + 0, 4, 1, 0, 2, 128, + 1, 0, 85, 128, 15, 0, + 85, 161, 15, 0, 0, 160, + 5, 0, 0, 3, 1, 0, + 1, 128, 1, 0, 0, 128, + 15, 0, 85, 160, 5, 0, + 0, 3, 1, 0, 6, 128, + 1, 0, 85, 128, 13, 0, + 196, 160, 4, 0, 0, 4, + 1, 0, 3, 128, 12, 0, + 225, 160, 1, 0, 0, 128, + 1, 0, 233, 128, 2, 0, + 0, 3, 0, 0, 12, 224, + 1, 0, 68, 128, 14, 0, + 20, 160, 4, 0, 0, 4, + 0, 0, 3, 192, 0, 0, + 255, 128, 0, 0, 228, 160, + 0, 0, 228, 128, 1, 0, + 0, 2, 0, 0, 12, 192, + 0, 0, 228, 128, 1, 0, + 0, 2, 1, 0, 4, 224, + 15, 0, 170, 160, 255, 255, + 0, 0, 83, 72, 68, 82, + 108, 3, 0, 0, 64, 0, + 1, 0, 219, 0, 0, 0, + 89, 0, 0, 4, 70, 142, + 32, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 95, 0, + 0, 3, 50, 16, 16, 0, + 0, 0, 0, 0, 103, 0, + 0, 4, 242, 32, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 50, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 194, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 114, 32, 16, 0, 2, 0, + 0, 0, 104, 0, 0, 2, + 2, 0, 0, 0, 50, 0, + 0, 11, 50, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 0, 0, 0, 0, + 230, 138, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 70, 128, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 56, 0, 0, 8, 242, 0, + 16, 0, 1, 0, 0, 0, + 86, 5, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 1, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 130, 0, + 16, 0, 1, 0, 0, 0, + 58, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 9, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 70, 128, + 32, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 11, 0, + 0, 0, 14, 0, 0, 8, + 50, 32, 16, 0, 2, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 11, 0, 0, 0, 0, 0, + 0, 9, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 128, 65, 0, + 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 1, 0, + 0, 0, 86, 5, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 1, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 6, 0, + 0, 0, 166, 10, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 50, 0, 0, 10, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 7, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 1, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 50, 0, + 16, 0, 0, 0, 0, 0, + 70, 0, 16, 0, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, + 0, 10, 34, 0, 16, 0, + 0, 0, 0, 0, 26, 0, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 18, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 56, 0, 0, 8, 98, 0, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 0, 0, + 0, 0, 6, 129, 32, 0, + 0, 0, 0, 0, 13, 0, + 0, 0, 50, 0, 0, 10, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 128, 32, 0, + 0, 0, 0, 0, 12, 0, + 0, 0, 6, 0, 16, 0, + 0, 0, 0, 0, 150, 5, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 194, 32, + 16, 0, 1, 0, 0, 0, + 6, 4, 16, 0, 0, 0, + 0, 0, 6, 132, 32, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 50, 0, 0, 11, + 50, 32, 16, 0, 1, 0, + 0, 0, 70, 16, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 70, 128, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 54, 0, + 0, 5, 66, 32, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 24, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 20, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 82, 68, 69, 70, + 104, 2, 0, 0, 1, 0, + 0, 0, 72, 0, 0, 0, + 1, 0, 0, 0, 28, 0, + 0, 0, 0, 4, 254, 255, + 0, 1, 0, 0, 52, 2, + 0, 0, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 36, 71, + 108, 111, 98, 97, 108, 115, + 0, 171, 171, 171, 60, 0, + 0, 0, 10, 0, 0, 0, + 96, 0, 0, 0, 48, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 80, 1, + 0, 0, 0, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 112, 1, + 0, 0, 64, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 124, 1, + 0, 0, 128, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 160, 1, + 0, 0, 144, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 192, 1, + 0, 0, 160, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 203, 1, + 0, 0, 176, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 213, 1, + 0, 0, 192, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 244, 1, + 0, 0, 16, 1, 0, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 20, 2, + 0, 0, 32, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, @@ -6196,54 +6464,4354 @@ const BYTE ComponentAlphaShaderMask[] = 118, 82, 101, 110, 100, 101, 114, 84, 97, 114, 103, 101, 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, + 116, 0, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 102, 76, 97, 121, 101, 114, + 79, 112, 97, 99, 105, 116, + 121, 0, 171, 171, 0, 0, + 3, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 105, 66, 108, 101, + 110, 100, 67, 111, 110, 102, + 105, 103, 0, 171, 171, 171, + 1, 0, 19, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 0, + 80, 79, 83, 73, 84, 73, + 79, 78, 0, 171, 171, 171, + 79, 83, 71, 78, 128, 0, + 0, 0, 4, 0, 0, 0, + 8, 0, 0, 0, 104, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 116, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 3, 12, 0, 0, 116, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 12, 3, 0, 0, 116, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 2, 0, 0, 0, + 7, 8, 0, 0, 83, 86, + 95, 80, 111, 115, 105, 116, + 105, 111, 110, 0, 84, 69, + 88, 67, 79, 79, 82, 68, + 0, 171, 171, 171 +}; +ShaderBytes sLayerQuadBlendMaskVS = { LayerQuadBlendMaskVS, sizeof(LayerQuadBlendMaskVS) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4x4 mLayerTransform; // Offset: 0 Size: 64 +// float4x4 mProjection; // Offset: 64 Size: 64 +// float4 vRenderTargetOffset; // Offset: 128 Size: 16 +// float4 vTextureCoords; // Offset: 144 Size: 16 +// float4 vLayerQuad; // Offset: 160 Size: 16 +// float4 vMaskQuad; // Offset: 176 Size: 16 +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c1 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c3 cb0 3 11 ( FLT, FLT, FLT, FLT) +// c14 cb0 15 1 ( FLT, FLT, FLT, FLT) +// +// +// Runtime generated constant mappings: +// +// Target Reg Constant Description +// ---------- -------------------------------------------------- +// c0 Vertex Shader position offset +// +// +// Level9 shader bytecode: +// + vs_2_x + def c15, 1, 0.5, 0, 0 + dcl_texcoord v0 + mov r0.z, c15.x + rcp r0.w, c11.z + mad r1.xy, v0, c10.zwzw, c10 + mul r2, r1.y, c2 + mad r1, c1, r1.x, r2 + add r1, r1, c3 + rcp r2.x, r1.w + mad r2.yz, r1.xxyw, r2.x, -c11.xxyw + mul r1.xyz, r1, r2.x + mul r0.x, r0.w, r2.y + rcp r0.w, c11.w + mul r0.y, r0.w, r2.z + mul oT1.xyz, r0, r1.w + add r0, r1, -c8 + mad oT0.xy, v0, c9.zwzw, c9 + mul r0.xyz, r0.w, r0 + mul r1, r0.y, c5 + mad r1, c4, r0.x, r1 + mad r1, c6, r0.z, r1 + mad r0, c7, r0.w, r1 + add r1.xy, r0, c15.x + mad r1.y, r1.y, -c15.y, c15.x + mul r1.x, r1.x, c15.y + mul r1.yz, r1.y, c13.xyxw + mad r1.xy, c12.yxzw, r1.x, r1.yzzw + add oT0.zw, r1.xyxy, c14.xyyx + mad oPos.xy, r0.w, c0, r0 + mov oPos.zw, r0 + +// approximately 28 instruction slots used +vs_4_0 +dcl_constantbuffer cb0[16], immediateIndexed +dcl_input v0.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +dcl_output o1.zw +dcl_output o2.xyz +dcl_temps 3 +mad r0.xy, v0.xyxx, cb0[10].zwzz, cb0[10].xyxx +mul r1.xyzw, r0.yyyy, cb0[1].xyzw +mad r0.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw +add r0.xyzw, r0.xyzw, cb0[3].xyzw +div r0.xyz, r0.xyzx, r0.wwww +add r1.xyzw, r0.xyzw, -cb0[8].xyzw +add r0.xy, r0.xyxx, -cb0[11].xyxx +div r0.xy, r0.xyxx, cb0[11].zwzz +mul r1.xyz, r1.wwww, r1.xyzx +mul r2.xyzw, r1.yyyy, cb0[5].xyzw +mad r2.xyzw, cb0[4].xyzw, r1.xxxx, r2.xyzw +mad r2.xyzw, cb0[6].xyzw, r1.zzzz, r2.xyzw +mad r1.xyzw, cb0[7].xyzw, r1.wwww, r2.xyzw +mov o0.xyzw, r1.xyzw +add r1.xy, r1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) +mad r1.y, -r1.y, l(0.500000), l(1.000000) +mul r1.x, r1.x, l(0.500000) +mul r1.yz, r1.yyyy, cb0[13].xxyx +mad r1.xy, cb0[12].xyxx, r1.xxxx, r1.yzyy +add o1.zw, r1.xxxy, cb0[15].xxxy +mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx +mov r0.z, l(1.000000) +mul o2.xyz, r0.wwww, r0.xyzx +ret +// Approximately 24 instruction slots used +#endif + +const BYTE LayerQuadBlendMask3DVS[] = +{ + 68, 88, 66, 67, 114, 33, + 168, 234, 171, 245, 21, 91, + 164, 147, 216, 15, 58, 222, + 28, 166, 1, 0, 0, 0, + 176, 9, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 140, 2, 0, 0, 8, 6, + 0, 0, 132, 6, 0, 0, + 244, 8, 0, 0, 40, 9, + 0, 0, 65, 111, 110, 57, + 76, 2, 0, 0, 76, 2, + 0, 0, 0, 2, 254, 255, + 0, 2, 0, 0, 76, 0, + 0, 0, 3, 0, 36, 0, + 0, 0, 72, 0, 0, 0, + 72, 0, 0, 0, 36, 0, + 1, 0, 72, 0, 0, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 11, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 1, 0, 14, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 254, 255, + 81, 0, 0, 5, 15, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 31, 0, 0, 2, 5, 0, + 0, 128, 0, 0, 15, 144, + 1, 0, 0, 2, 0, 0, + 4, 128, 15, 0, 0, 160, + 6, 0, 0, 2, 0, 0, + 8, 128, 11, 0, 170, 160, + 4, 0, 0, 4, 1, 0, + 3, 128, 0, 0, 228, 144, + 10, 0, 238, 160, 10, 0, + 228, 160, 5, 0, 0, 3, + 2, 0, 15, 128, 1, 0, + 85, 128, 2, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 1, 0, 228, 160, + 1, 0, 0, 128, 2, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 15, 128, 1, 0, + 228, 128, 3, 0, 228, 160, + 6, 0, 0, 2, 2, 0, + 1, 128, 1, 0, 255, 128, + 4, 0, 0, 4, 2, 0, + 6, 128, 1, 0, 208, 128, + 2, 0, 0, 128, 11, 0, + 208, 161, 5, 0, 0, 3, + 1, 0, 7, 128, 1, 0, + 228, 128, 2, 0, 0, 128, + 5, 0, 0, 3, 0, 0, + 1, 128, 0, 0, 255, 128, + 2, 0, 85, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 11, 0, 255, 160, 5, 0, + 0, 3, 0, 0, 2, 128, + 0, 0, 255, 128, 2, 0, + 170, 128, 5, 0, 0, 3, + 1, 0, 7, 224, 0, 0, + 228, 128, 1, 0, 255, 128, + 2, 0, 0, 3, 0, 0, + 15, 128, 1, 0, 228, 128, + 8, 0, 228, 161, 4, 0, + 0, 4, 0, 0, 3, 224, + 0, 0, 228, 144, 9, 0, + 238, 160, 9, 0, 228, 160, + 5, 0, 0, 3, 0, 0, + 7, 128, 0, 0, 255, 128, + 0, 0, 228, 128, 5, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 85, 128, 5, 0, + 228, 160, 4, 0, 0, 4, + 1, 0, 15, 128, 4, 0, + 228, 160, 0, 0, 0, 128, + 1, 0, 228, 128, 4, 0, + 0, 4, 1, 0, 15, 128, + 6, 0, 228, 160, 0, 0, + 170, 128, 1, 0, 228, 128, + 4, 0, 0, 4, 0, 0, + 15, 128, 7, 0, 228, 160, + 0, 0, 255, 128, 1, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 3, 128, 0, 0, + 228, 128, 15, 0, 0, 160, + 4, 0, 0, 4, 1, 0, + 2, 128, 1, 0, 85, 128, + 15, 0, 85, 161, 15, 0, + 0, 160, 5, 0, 0, 3, + 1, 0, 1, 128, 1, 0, + 0, 128, 15, 0, 85, 160, + 5, 0, 0, 3, 1, 0, + 6, 128, 1, 0, 85, 128, + 13, 0, 196, 160, 4, 0, + 0, 4, 1, 0, 3, 128, + 12, 0, 225, 160, 1, 0, + 0, 128, 1, 0, 233, 128, + 2, 0, 0, 3, 0, 0, + 12, 224, 1, 0, 68, 128, + 14, 0, 20, 160, 4, 0, + 0, 4, 0, 0, 3, 192, + 0, 0, 255, 128, 0, 0, + 228, 160, 0, 0, 228, 128, + 1, 0, 0, 2, 0, 0, + 12, 192, 0, 0, 228, 128, + 255, 255, 0, 0, 83, 72, + 68, 82, 116, 3, 0, 0, + 64, 0, 1, 0, 221, 0, + 0, 0, 89, 0, 0, 4, + 70, 142, 32, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 95, 0, 0, 3, 50, 16, + 16, 0, 0, 0, 0, 0, + 103, 0, 0, 4, 242, 32, + 16, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 50, 32, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 194, 32, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 114, 32, 16, 0, + 2, 0, 0, 0, 104, 0, + 0, 2, 3, 0, 0, 0, + 50, 0, 0, 11, 50, 0, + 16, 0, 0, 0, 0, 0, + 70, 16, 16, 0, 0, 0, + 0, 0, 230, 138, 32, 0, + 0, 0, 0, 0, 10, 0, + 0, 0, 70, 128, 32, 0, + 0, 0, 0, 0, 10, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 1, 0, + 0, 0, 86, 5, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 0, 0, 0, 8, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 9, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 9, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 70, 128, + 32, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 11, 0, + 0, 0, 14, 0, 0, 8, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 11, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 1, 0, 0, 0, 246, 15, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 2, 0, + 0, 0, 86, 5, 16, 0, + 1, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 2, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 6, 0, + 16, 0, 1, 0, 0, 0, + 70, 14, 16, 0, 2, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 2, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 6, 0, + 0, 0, 166, 10, 16, 0, + 1, 0, 0, 0, 70, 14, + 16, 0, 2, 0, 0, 0, + 50, 0, 0, 10, 242, 0, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 7, 0, 0, 0, + 246, 15, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 2, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 10, 50, 0, + 16, 0, 1, 0, 0, 0, + 70, 0, 16, 0, 1, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, + 0, 10, 34, 0, 16, 0, + 1, 0, 0, 0, 26, 0, + 16, 128, 65, 0, 0, 0, + 1, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 18, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 56, 0, 0, 8, 98, 0, + 16, 0, 1, 0, 0, 0, + 86, 5, 16, 0, 1, 0, + 0, 0, 6, 129, 32, 0, + 0, 0, 0, 0, 13, 0, + 0, 0, 50, 0, 0, 10, + 50, 0, 16, 0, 1, 0, + 0, 0, 70, 128, 32, 0, + 0, 0, 0, 0, 12, 0, + 0, 0, 6, 0, 16, 0, + 1, 0, 0, 0, 150, 5, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 194, 32, + 16, 0, 1, 0, 0, 0, + 6, 4, 16, 0, 1, 0, + 0, 0, 6, 132, 32, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 50, 0, 0, 11, + 50, 32, 16, 0, 1, 0, + 0, 0, 70, 16, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 70, 128, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 54, 0, + 0, 5, 66, 0, 16, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 56, 0, 0, 7, 114, 32, + 16, 0, 2, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 62, 0, + 0, 1, 83, 84, 65, 84, + 116, 0, 0, 0, 24, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 5, 0, + 0, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 82, 68, 69, 70, 104, 2, + 0, 0, 1, 0, 0, 0, + 72, 0, 0, 0, 1, 0, + 0, 0, 28, 0, 0, 0, + 0, 4, 254, 255, 0, 1, + 0, 0, 52, 2, 0, 0, + 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 36, 71, 108, 111, + 98, 97, 108, 115, 0, 171, + 171, 171, 60, 0, 0, 0, + 10, 0, 0, 0, 96, 0, + 0, 0, 48, 1, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 80, 1, 0, 0, + 0, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 112, 1, 0, 0, + 64, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 124, 1, 0, 0, + 128, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 160, 1, 0, 0, + 144, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 192, 1, 0, 0, + 160, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 203, 1, 0, 0, + 176, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 213, 1, 0, 0, + 192, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 232, 1, 0, 0, + 0, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 244, 1, 0, 0, + 16, 1, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 4, 2, 0, 0, 0, 0, + 0, 0, 20, 2, 0, 0, + 32, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 77, 105, 99, 114, + 111, 115, 111, 102, 116, 32, + 40, 82, 41, 32, 72, 76, + 83, 76, 32, 83, 104, 97, + 100, 101, 114, 32, 67, 111, + 109, 112, 105, 108, 101, 114, + 32, 54, 46, 51, 46, 57, + 54, 48, 48, 46, 49, 54, + 51, 56, 52, 0, 171, 171, + 73, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 3, 0, 0, 80, 79, + 83, 73, 84, 73, 79, 78, + 0, 171, 171, 171, 79, 83, + 71, 78, 128, 0, 0, 0, + 4, 0, 0, 0, 8, 0, + 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, + 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 3, 12, + 0, 0, 116, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 3, + 0, 0, 116, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 12, 12, + 2, 0, 0, 0, 7, 8, 0, 0, 83, 86, 95, 80, 111, 115, 105, 116, 105, 111, 110, 0, 84, 69, 88, 67, 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 68, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, + 171, 171 +}; +ShaderBytes sLayerQuadBlendMask3DVS = { LayerQuadBlendMask3DVS, sizeof(LayerQuadBlendMask3DVS) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4 fLayerColor; // Offset: 0 Size: 16 +// float fLayerOpacity; // Offset: 16 Size: 4 +// uint4 iBlendConfig; // Offset: 32 Size: 16 +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// LayerTextureSamplerLinear sampler NA NA 1 1 +// tRGB texture float4 2d 0 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 1 +// tCr texture float4 2d 3 1 +// tMask texture float4 2d 5 1 +// tBackdrop texture float4 2d 6 1 +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Target 0 xyzw 0 TARGET float xyzw +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c0 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c2 cb0 2 1 (UINT,UINT,UINT,UINT) +// +// +// Sampler/Resource to DX9 shader sampler mappings: +// +// Target Sampler Source Sampler Source Resource +// -------------- --------------- ---------------- +// s0 s0 t0 +// s1 s0 t1 +// s2 s0 t2 +// s3 s0 t3 +// s4 s0 t5 +// s5 s0 t6 +// s6 s1 t5 +// +// +// Level9 shader bytecode: +// + ps_2_x + def c3, -1, -2, -0.50195998, -0.0627499968 + def c4, 1.59603, 0.812969983, 1.16437995, 2.01723003 + def c5, -1, -2, -3, -4 + def c6, -5, -6, -7, -8 + def c7, 1, 0.25, 2, -1 + def c8, 16, -12, -13, -14 + def c9, -9, -10, -11, -12 + def c10, 0.300000012, 0.589999974, 0.109999999, 0 + def c11, 0.391759992, -1, -0, -0.5 + dcl t0 + dcl t1.xyz + dcl_2d s0 + dcl_2d s1 + dcl_2d s2 + dcl_2d s3 + dcl_2d s4 + dcl_2d s5 + dcl_2d s6 + mov r0.x, -c11.z + mov r1.x, -c11.z + mov r2.z, -c11.z + texld r3, t0, s1 + texld r4, t0, s3 + add r0.w, r4.x, c3.z + mul r3.yz, r0.w, c4.xxyw + add r0.w, r3.x, c3.w + mad r1.w, r0.w, c4.z, -r3.z + mad r3.x, r0.w, c4.z, r3.y + texld r4, t1, s4 + texld r5, t0, s2 + add r2.w, r5.x, c3.z + mad r3.y, r2.w, -c11.x, r1.w + mul r1.w, r2.w, c4.w + mad r3.z, r0.w, c4.z, r1.w + mov r3.w, -c3.x + mul r3, r3, c1.x + mul r5, r4.x, r3 + rcp r0.w, t1.z + mul r6.xy, r0.w, t1 + texld r7, t0, s0 + texld r6, r6, s6 + mul r7, r7, c1.x + mul r8, r4.x, r7 + mov r9.xy, c3 + add r10, r9.xyxy, c2.xxyy + mul r10, r10, r10 + cmp r5, -r10.x, r8, r5 + mov r8.xyz, r7 + mov r8.w, c1.x + mul r11, r4.x, r8 + mul r4, r4.x, c0 + cmp r5, -c2.x, r11, r5 + cmp r6.yz, -r10.xyww, c11.y, c11.z + cmp r6.yz, -r10.xxzw, c3.x, r6 + cmp r6.yz, -c2.xxyw, r9.x, r6 + cmp r4, r6.y, r4, r5 + mul r5, r6.x, r7 + cmp r3, -r10.x, r7, r3 + cmp r4, -r10.z, r4, r5 + cmp r3, -c2.x, r8, r3 + cmp r3, r6.y, c0, r3 + cmp r3, -c2.y, r3, r4 + cmp r3, r6.z, -c11.zzzy, r3 + rcp r0.w, r3.w + mul r4.xyz, r0.w, r3 + cmp r4.xyz, -c2.w, r3, r4 + add r5.xy, -r4.yzzw, r4 + cmp r5.zw, r5.x, r4.xyxy, r4.xyyx + max r0.w, r5.z, r4.z + min r1.w, r4.z, r5.w + add r6.w, r0.w, -r1.w + mov r7.xy, t0.wzzw + texld r7, r7, s5 + rcp r0.w, r7.w + mul r8.xyz, r0.w, r7 + mad r5.zw, r7.xyzy, r0.w, -r8.xyxz + mul r9.xy, r6.w, r5.zwzw + mad r10, r7.yxxz, r0.w, -r8.xzyy + rcp r1.w, r10.x + mul r6.y, r1.w, r9.x + cmp r1.yz, r10.z, -c11.z, r6.xwyw + mul r11, r6.w, r10 + rcp r1.w, r5.w + mul r6.x, r1.w, r11.y + cmp r2.xy, r10.w, -c11.z, r6.xwzw + cmp r1.xyz, r5.z, r1, r2 + rcp r1.w, r5.z + mul r6.z, r1.w, r11.x + cmp r0.yz, r10.y, -c11.z, r6.xzww + cmp r0.xyz, r10.w, r0, r1 + mov r1.y, -c11.z + mov r2.y, -c11.z + mov r12.z, -c11.z + rcp r1.w, r10.z + mul r6.y, r1.w, r11.w + cmp r2.xz, r10.x, -c11.z, r6.wyyw + rcp r1.w, r10.y + mul r6.x, r1.w, r9.y + cmp r12.xy, r5.z, -c11.z, r6.wxzw + cmp r2.xyz, r10.w, r2, r12 + rcp r1.w, r10.w + mul r6.z, r1.w, r11.z + cmp r1.xz, r5.w, -c11.z, r6.zyww + cmp r1.xyz, r5.z, r1, r2 + cmp r0.xyz, r10.x, r0, r1 + cmp r1.xy, r10.z, r8, r8.yxzw + dp3 r4.w, c10, r0 + dp3 r8.w, c10, r8 + add r4.w, -r4.w, r8.w + add r0.xyz, r0, r4.w + add r4.w, -r0.y, r0.x + cmp r1.zw, r4.w, r0.xyyx, r0.xyxy + min r4.w, r0.z, r1.z + max r2.x, r1.w, r0.z + dp3 r1.z, c10, r0 + add r1.w, -r4.w, r1.z + rcp r1.w, r1.w + add r2.yzw, r0.xxyz, -r1.z + mul r2.yzw, r1.z, r2 + mad r2.yzw, r2, r1.w, r1.z + cmp r0.xyz, r4.w, r0, r2.yzww + add r2.yzw, -r1.z, r0.xxyz + add r1.w, -r1.z, -c3.x + mul r2.yzw, r1.w, r2 + add r1.w, -r1.z, r2.x + add r4.w, -r2.x, -c3.x + rcp r1.w, r1.w + mad r2.xyz, r2.yzww, r1.w, r1.z + cmp r0.xyz, r4.w, r0, r2 + mov r4.w, c2.z + add r1.zw, r4.w, c8 + mul r1.zw, r1, r1 + dp3 r2.x, c10, r4 + add r2.y, -r8.w, r2.x + add r2.x, -r2.x, r8.w + add r2.xzw, r2.x, r4.xyyz + mad r6.xyz, r7, r0.w, r2.y + add r6.w, -r6.y, r6.x + cmp r5.zw, r6.w, r6.xyyx, r6.xyxy + min r2.y, r6.z, r5.z + max r9.x, r5.w, r6.z + dp3 r6.w, c10, r6 + add r5.z, -r2.y, r6.w + rcp r5.z, r5.z + add r9.yzw, -r6.w, r6.xxyz + mul r9.yzw, r6.w, r9 + mad r9.yzw, r9, r5.z, r6.w + cmp r6.xyz, r2.y, r6, r9.yzww + add r9.yzw, -r6.w, r6.xxyz + add r2.y, -r6.w, -c3.x + mul r9.yzw, r2.y, r9 + add r2.y, -r6.w, r9.x + add r5.z, -r9.x, -c3.x + rcp r5.w, r2.y + mad r9.xyz, r9.yzww, r5.w, r6.w + cmp r6.xyz, r5.z, r6, r9 + cmp r6.xyz, -r1.w, r6, -c11.z + add r1.w, -r2.z, r2.x + cmp r5.zw, r1.w, r2.xyzx, r2.xyxz + min r1.w, r2.w, r5.z + max r6.w, r5.w, r2.w + dp3 r2.y, c10, r2.xzww + add r5.z, -r1.w, r2.y + rcp r5.z, r5.z + add r9.xyz, -r2.y, r2.xzww + mul r9.xyz, r2.y, r9 + mad r9.xyz, r9, r5.z, r2.y + cmp r2.xzw, r1.w, r2, r9.xyyz + add r9.xyz, -r2.y, r2.xzww + add r1.w, -r2.y, -c3.x + mul r9.xyz, r1.w, r9 + add r1.w, -r2.y, r6.w + add r6.w, -r6.w, -c3.x + rcp r1.w, r1.w + mad r9.xyz, r9, r1.w, r2.y + cmp r2.xyz, r6.w, r2.xzww, r9 + cmp r2.xyz, -r1.z, r2, r6 + add r6, r4.w, c9 + mul r6, r6, r6 + cmp r0.xyz, -r6.w, r0, r2 + add r2, -r4.xxzy, r4.yzxz + mov r9.y, -c11.z + mov r10.y, -c11.z + mov r11.z, -c11.z + rcp r6.w, r2.z + max r9.w, r1.x, r8.z + min r10.w, r8.z, r1.y + add r1.w, r9.w, -r10.w + mul r5.zw, r1.w, r5.xyxy + mul r1.x, r6.w, r5.w + cmp r11.xy, r2.y, -c11.z, r1.wxzw + rcp r5.w, r5.x + mul r12, r1.w, r2 + mul r1.y, r5.w, r12.w + cmp r10.xz, r2.x, -c11.z, r1.wyyw + cmp r10.xyz, r2.w, r10, r11 + rcp r5.w, r2.w + mul r1.z, r5.w, r5.z + cmp r9.xz, r5.y, -c11.z, r1.zyww + cmp r9.xyz, r2.y, r9, r10 + mov r10.x, -c11.z + mov r11.x, -c11.z + mov r13.z, -c11.z + rcp r6.w, r2.x + mul r1.y, r6.w, r12.y + cmp r11.yz, r5.x, -c11.z, r1.xwyw + rcp r6.w, r5.y + mul r1.x, r6.w, r12.z + cmp r13.xy, r2.w, -c11.z, r1.xwzw + cmp r5.xyz, r2.y, r11, r13 + rcp r5.w, r2.y + mul r1.z, r5.w, r12.x + cmp r10.yz, r2.z, -c11.z, r1.xzww + cmp r1.xyz, r2.w, r10, r5 + cmp r1.xyz, r2.x, r1, r9 + dp3 r1.w, c10, r1 + add r1.w, -r1.w, r8.w + add r1.xyz, r1.w, r1 + add r1.w, -r1.y, r1.x + cmp r2.xy, r1.w, r1.yxzw, r1 + min r6.w, r1.z, r2.x + max r8.w, r2.y, r1.z + dp3 r1.w, c10, r1 + add r2.x, -r6.w, r1.w + rcp r2.x, r2.x + add r2.yzw, -r1.w, r1.xxyz + mul r2.yzw, r1.w, r2 + mad r2.xyz, r2.yzww, r2.x, r1.w + cmp r1.xyz, r6.w, r1, r2 + add r2.xyz, -r1.w, r1 + add r2.w, -r1.w, -c3.x + mul r2.xyz, r2.w, r2 + add r2.w, -r1.w, r8.w + add r6.w, -r8.w, -c3.x + rcp r2.w, r2.w + mad r2.xyz, r2, r2.w, r1.w + cmp r1.xyz, r6.w, r1, r2 + cmp r0.xyz, -r6.z, r1, r0 + mad r1.xyz, r7, r0.w, r4 + mul r2.xyz, r4, r8 + mad r5.xyz, r2, c3.y, r1 + mad r1.xyz, r8, -r4, r1 + cmp r0.xyz, -r6.y, r5, r0 + mad r5.xyz, r7, r0.w, -r4 + abs r5.xyz, r5 + cmp r0.xyz, -r6.x, r5, r0 + add r5.xy, -r4.yzzw, -c11.w + mad r6.xyz, r4, c7.z, c7.w + mad r1.w, r7.z, -r0.w, c7.y + mad r9.xyz, r8, c8.x, c8.y + mad r9.xyz, r9, r8, -c5.w + mul r9.xyz, r8, r9 + rsq r2.w, r8.z + rcp r2.w, r2.w + cmp r1.w, r1.w, r9.z, r2.w + mad r1.w, r7.z, -r0.w, r1.w + mad r1.w, r6.z, r1.w, r8.z + mad r10.xyz, r4, c3.y, -c3.x + mul r10.xyz, r8, r10 + mad r11, r7.yzxy, -r0.w, c7.xxyy + mad r5.zw, r10.xyyz, -r11.xyxy, r8.xyyz + cmp r12.z, r5.y, r5.w, r1.w + rsq r1.w, r8.y + rcp r1.w, r1.w + cmp r1.w, r11.w, r9.y, r1.w + mad r1.w, r7.y, -r0.w, r1.w + mad r1.w, r6.y, r1.w, r8.y + cmp r12.y, r5.x, r5.z, r1.w + add r13, r4.w, c6 + mul r13, r13, r13 + add r14, -r4.xyzx, -c11.yyyw + rsq r1.w, r8.x + rcp r1.w, r1.w + cmp r1.w, r11.z, r9.x, r1.w + mad r1.w, r7.x, -r0.w, r1.w + mad r1.w, r6.x, r1.w, r8.x + mad r6, r7.xyzx, -r0.w, -c11.wwwy + mad r9.xyz, r7, r0.w, c3.x + mul r9.xyz, r9, r9 + mad r0.w, r10.x, -r6.w, r8.x + cmp r12.x, r14.w, r0.w, r1.w + cmp r0.xyz, -r13.w, r12, r0 + add r10.xyz, r8, r8 + mad r12.xyz, r4, -c3.y, r10 + add r12.xyz, r12, c3.x + mad r15.xyz, r4, -r10, r12 + mul r10.xyz, r4, r10 + add r16.xyz, r4, r4 + mul r17.xyz, r8, r16 + mad r12.xyz, r16, -r8, r12 + cmp r6.xyz, r6, r10, r12 + cmp r5.yz, r5.xxyw, r17, r15 + cmp r5.x, r14.w, r17.x, r15.x + cmp r0.xyz, -r13.z, r5, r0 + rcp r0.w, r4.x + mad r0.w, r6.w, -r0.w, -c3.x + max r1.w, r0.w, -c11.z + mul r5.xyz, r4, r4 + cmp r0.w, -r5.x, -c11.z, r1.w + cmp r10.x, -r9.x, -c3.x, r0.w + rcp r0.w, r4.y + mad r0.w, r11.x, -r0.w, -c3.x + max r1.w, r0.w, -c11.z + cmp r0.w, -r5.y, -c11.z, r1.w + cmp r10.y, -r9.y, -c3.x, r0.w + rcp r0.w, r4.z + mad r0.w, r11.y, -r0.w, -c3.x + max r1.w, r0.w, -c11.z + cmp r0.w, -r5.z, -c11.z, r1.w + cmp r10.z, -r9.z, -c3.x, r0.w + cmp r0.xyz, -r13.y, r10, r0 + add r5.xyz, r4, c3.x + mul r5.xyz, r5, r5 + rcp r0.w, r14.x + mul r0.w, r0.w, r8.x + min r1.w, r0.w, -c3.x + cmp r0.w, -r5.x, -c3.x, r1.w + mul r9.xyz, r8, r8 + cmp r10.x, -r9.x, -c11.z, r0.w + rcp r0.w, r14.y + rcp r1.w, r14.z + mul r1.w, r1.w, r8.z + min r2.w, r1.w, -c3.x + cmp r1.w, -r5.z, -c3.x, r2.w + cmp r10.z, -r9.z, -c11.z, r1.w + mul r0.w, r0.w, r8.y + min r1.w, r0.w, -c3.x + cmp r0.w, -r5.y, -c3.x, r1.w + cmp r10.y, -r9.y, -c11.z, r0.w + cmp r0.xyz, -r13.x, r10, r0 + add r5, r4.w, c5 + mul r5, r5, r5 + max r9.xyz, r8, r4 + min r10.xyz, r4, r8 + cmp r0.xyz, -r5.w, r9, r0 + cmp r0.xyz, -r5.z, r10, r0 + cmp r0.xyz, -r5.y, r6, r0 + cmp r0.xyz, -r5.x, r1, r0 + cmp r0.xyz, -c2.z, r2, r0 + lrp r1.xyz, r7.w, r0, r4 + mul r0.xyz, r3.w, r1 + mul r1.x, r3.w, r3.w + mov r0.w, r3.w + cmp r0, -r1.x, r7, r0 + mul r1.x, r7.w, r7.w + cmp r0, -r1.x, r3, r0 + mov oC0, r0 + +// approximately 329 instruction slots used (7 texture, 322 arithmetic) +ps_4_0 +dcl_constantbuffer cb0[3], immediateIndexed +dcl_sampler s0, mode_default +dcl_sampler s1, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_resource_texture2d (float,float,float,float) t1 +dcl_resource_texture2d (float,float,float,float) t2 +dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 +dcl_resource_texture2d (float,float,float,float) t6 +dcl_input_ps linear v1.xy +dcl_input_ps linear v1.zw +dcl_input_ps linear v2.xyz +dcl_output o0.xyzw +dcl_temps 22 +sample r0.xyzw, v1.zwzz, t6.xyzw, s0 +if_z cb0[2].y + if_z cb0[2].x + sample r1.xyzw, v1.xyxx, t0.xyzw, s0 + mul r1.xyz, r1.xyzx, cb0[1].xxxx + mov r1.w, cb0[1].x + mov r2.x, l(-1) + else + ieq r2.y, l(1), cb0[2].x + if_nz r2.y + sample r3.xyzw, v1.xyxx, t0.xyzw, s0 + mul r1.xyzw, r3.xyzw, cb0[1].xxxx + mov r2.x, l(-1) + else + ieq r2.x, l(2), cb0[2].x + if_nz r2.x + sample r3.xyzw, v1.xyxx, t3.xyzw, s0 + add r2.y, r3.x, l(-0.501960) + sample r3.xyzw, v1.xyxx, t1.xyzw, s0 + add r2.z, r3.x, l(-0.062750) + sample r3.xyzw, v1.xyxx, t2.xyzw, s0 + add r2.w, r3.x, l(-0.501960) + mul r3.xy, r2.yyyy, l(1.596030, 0.812970, 0.000000, 0.000000) + mad r4.x, r2.z, l(1.164380), r3.x + mad r2.y, r2.z, l(1.164380), -r3.y + mul r3.x, r2.w, l(2.017230) + mad r4.y, -r2.w, l(0.391760), r2.y + mad r4.z, r2.z, l(1.164380), r3.x + mov r4.w, l(1.000000) + mul r1.xyzw, r4.xyzw, cb0[1].xxxx + endif + endif + endif + movc r1.xyzw, r2.xxxx, r1.xyzw, cb0[0].xyzw + mov r2.x, l(-1) +else + ieq r2.y, l(1), cb0[2].y + if_nz r2.y + if_z cb0[2].x + sample r3.xyzw, v1.xyxx, t0.xyzw, s0 + mul r3.xyz, r3.xyzx, cb0[1].xxxx + sample r4.xyzw, v2.xyxx, t5.xyzw, s0 + mov r3.w, cb0[1].x + mul r1.xyzw, r3.xyzw, r4.xxxx + mov r2.y, l(-1) + else + ieq r2.z, l(1), cb0[2].x + if_nz r2.z + sample r3.xyzw, v2.xyxx, t5.xyzw, s0 + sample r4.xyzw, v1.xyxx, t0.xyzw, s0 + mul r4.xyzw, r4.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + mov r2.y, l(-1) + else + ieq r2.y, l(2), cb0[2].x + if_nz r2.y + sample r3.xyzw, v2.xyxx, t5.xyzw, s0 + sample r4.xyzw, v1.xyxx, t3.xyzw, s0 + add r2.z, r4.x, l(-0.501960) + sample r4.xyzw, v1.xyxx, t1.xyzw, s0 + add r2.w, r4.x, l(-0.062750) + sample r4.xyzw, v1.xyxx, t2.xyzw, s0 + add r3.y, r4.x, l(-0.501960) + mul r3.zw, r2.zzzz, l(0.000000, 0.000000, 1.596030, 0.812970) + mad r4.x, r2.w, l(1.164380), r3.z + mad r2.z, r2.w, l(1.164380), -r3.w + mul r3.z, r3.y, l(2.017230) + mad r4.y, -r3.y, l(0.391760), r2.z + mad r4.z, r2.w, l(1.164380), r3.z + mov r4.w, l(1.000000) + mul r4.xyzw, r4.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + endif + endif + endif + if_z r2.y + sample r3.xyzw, v2.xyxx, t5.xyzw, s0 + mul r1.xyzw, r3.xxxx, cb0[0].xyzw + endif + mov r2.x, l(-1) + else + ieq r2.x, l(2), cb0[2].y + if_nz r2.x + div r2.yz, v2.xxyx, v2.zzzz + sample r3.xyzw, r2.yzyy, t5.xyzw, s1 + sample r4.xyzw, v1.xyxx, t0.xyzw, s0 + mul r4.xyzw, r4.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + endif + endif +endif +movc r1.xyzw, r2.xxxx, r1.xyzw, l(0,0,0,1.000000) +eq r2.x, r0.w, l(0.000000) +if_nz r2.x + mov o0.xyzw, r1.xyzw + ret +endif +eq r2.x, r1.w, l(0.000000) +if_nz r2.x + mov o0.xyzw, r0.xyzw + ret +endif +div r0.xyz, r0.xyzx, r0.wwww +div r2.xyz, r1.xyzx, r1.wwww +movc r1.xyz, cb0[2].wwww, r2.xyzx, r1.xyzx +mul r2.xyz, r0.xyzx, r1.xyzx +add r3.xyz, r0.xyzx, r1.xyzx +mad r4.xyz, -r0.xyzx, r1.xyzx, r3.xyzx +ge r5.xyzw, l(0.500000, 0.500000, 0.500000, 0.250000), r0.xyzx +add r6.xyz, r0.xyzx, r0.xyzx +mul r7.xyz, r1.xyzx, r6.xyzx +add r8.xyz, r1.xyzx, r1.xyzx +mad r9.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r6.xyzx +add r9.xyz, r9.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000) +mul r10.xyz, r0.xyzx, r8.xyzx +mad r8.xyz, -r8.xyzx, r0.xyzx, r9.xyzx +movc r5.xyz, r5.xyzx, r7.xyzx, r8.xyzx +min r7.xyz, r0.xyzx, r1.xyzx +ieq r8.xyzw, l(1, 2, 3, 4), cb0[2].zzzz +max r11.xyz, r0.xyzx, r1.xyzx +eq r12.xyzw, r0.xyzx, l(0.000000, 0.000000, 0.000000, 1.000000) +eq r13.xyzw, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +add r14.xyz, -r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +div r14.xyz, r0.xyzx, r14.xyzx +min r14.xyz, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +movc r13.xyz, r13.xyzx, l(1.000000,1.000000,1.000000,0), r14.xyzx +movc r12.xyz, r12.xyzx, l(0,0,0,0), r13.xyzx +add r13.xyz, -r0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +div r14.xyz, r13.xyzx, r1.xyzx +min r14.xyz, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +add r14.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +movc r2.w, r13.w, l(0), r14.x +movc r15.x, r12.w, l(1.000000), r2.w +eq r14.xw, r0.yyyz, l(1.000000, 0.000000, 0.000000, 1.000000) +eq r16.xy, r1.yzyy, l(0.000000, 0.000000, 0.000000, 0.000000) +movc r14.yz, r16.xxyx, l(0,0,0,0), r14.yyzy +movc r15.yz, r14.xxwx, l(0,1.000000,1.000000,0), r14.yyzy +ge r14.xyz, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx +mad r6.xyz, -r1.xyzx, r6.xyzx, r9.xyzx +movc r6.xyz, r14.xyzx, r10.xyzx, r6.xyzx +ieq r9.xyzw, l(5, 6, 7, 8), cb0[2].zzzz +mad r10.xyz, -r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000) +mul r10.xyz, r0.xyzx, r10.xyzx +mad r10.xyz, -r10.xyzx, r13.xyzx, r0.xyzx +mad r13.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000) +mad r16.xyz, r0.xyzx, l(16.000000, 16.000000, 16.000000, 0.000000), l(-12.000000, -12.000000, -12.000000, 0.000000) +mad r16.xyz, r16.xyzx, r0.xyzx, l(4.000000, 4.000000, 4.000000, 0.000000) +mul r16.xyz, r0.xyzx, r16.xyzx +sqrt r17.xyz, r0.xyzx +movc r2.w, r5.w, r16.x, r17.x +add r2.w, -r0.x, r2.w +mad r2.w, r13.x, r2.w, r0.x +movc r18.x, r14.x, r10.x, r2.w +ge r10.xw, l(0.250000, 0.000000, 0.000000, 0.250000), r0.yyyz +movc r10.xw, r10.xxxw, r16.yyyz, r17.yyyz +add r10.xw, -r0.yyyz, r10.xxxw +mad r10.xw, r13.yyyz, r10.xxxw, r0.yyyz +movc r18.yz, r14.yyzy, r10.yyzy, r10.xxwx +add r10.xyz, r0.xyzx, -r1.xyzx +mad r3.xyz, -r2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r3.xyzx +max r2.w, r0.y, r0.x +max r2.w, r0.z, r2.w +min r3.w, r0.y, r0.x +min r3.w, r0.z, r3.w +add r13.w, r2.w, -r3.w +ge r2.w, r1.y, r1.x +if_nz r2.w + lt r14.xyz, r1.xxzx, r1.zyyz + add r16.xyzw, -r1.xxzz, r1.yzxy + mul r17.xyz, r13.wwww, r16.xyzx + div r13.xyz, r17.xyzx, r16.yxwy + and r16.yz, r13.xxwx, r14.xxxx + ge r14.xw, r1.zzzz, r1.yyyx + and r17.yz, r13.wwyw, r14.yyyy + and r19.xy, r13.zwzz, r14.zzzz + mov r17.x, l(0) + mov r19.z, l(0) + movc r14.yzw, r14.wwww, r17.xxyz, r19.xxyz + mov r16.x, l(0) + movc r14.xyz, r14.xxxx, r16.xyzx, r14.yzwy +else + lt r16.xyz, r1.yyzy, r1.zxxz + add r17.xyzw, -r1.yyzz, r1.xzyx + mul r19.xyz, r13.wwww, r17.xyzx + div r13.xyz, r19.xyzx, r17.yxwy + and r17.xz, r13.xxwx, r16.xxxx + ge r16.xw, r1.zzzz, r1.xxxy + and r19.xz, r13.wwyw, r16.yyyy + and r13.xy, r13.wzww, r16.zzzz + mov r19.y, l(0) + mov r13.z, l(0) + movc r13.xyz, r16.wwww, r19.xyzx, r13.xyzx + mov r17.y, l(0) + movc r14.xyz, r16.xxxx, r17.xyzx, r13.xyzx +endif +dp3 r2.w, l(0.300000, 0.590000, 0.110000, 0.000000), r0.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r14.xyzx +add r3.w, r2.w, -r3.w +add r13.xyz, r3.wwww, r14.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r13.xyzx +min r4.w, r13.y, r13.x +min r4.w, r13.z, r4.w +max r5.w, r13.y, r13.x +max r5.w, r13.z, r5.w +lt r6.w, r4.w, l(0.000000) +add r14.xyz, -r3.wwww, r13.xyzx +mul r14.xyz, r3.wwww, r14.xyzx +add r4.w, r3.w, -r4.w +div r14.xyz, r14.xyzx, r4.wwww +add r14.xyz, r3.wwww, r14.xyzx +movc r13.xyz, r6.wwww, r14.xyzx, r13.xyzx +lt r4.w, l(1.000000), r5.w +add r14.xyz, -r3.wwww, r13.xyzx +add r6.w, -r3.w, l(1.000000) +mul r14.xyz, r6.wwww, r14.xyzx +add r5.w, -r3.w, r5.w +div r14.xyz, r14.xyzx, r5.wwww +add r14.xyz, r3.wwww, r14.xyzx +movc r13.xyz, r4.wwww, r14.xyzx, r13.xyzx +ieq r14.xyzw, l(9, 10, 11, 12), cb0[2].zzzz +max r3.w, r1.y, r1.x +max r3.w, r1.z, r3.w +min r4.w, r1.y, r1.x +min r4.w, r1.z, r4.w +add r16.w, r3.w, -r4.w +ge r3.w, r0.y, r0.x +if_nz r3.w + lt r17.xyz, r0.xxzx, r0.zyyz + add r19.xyzw, -r0.xxzz, r0.yzxy + mul r20.xyz, r16.wwww, r19.xyzx + div r16.xyz, r20.xyzx, r19.yxwy + and r19.yz, r16.xxwx, r17.xxxx + ge r17.xw, r0.zzzz, r0.yyyx + and r20.yz, r16.wwyw, r17.yyyy + and r21.xy, r16.zwzz, r17.zzzz + mov r20.x, l(0) + mov r21.z, l(0) + movc r17.yzw, r17.wwww, r20.xxyz, r21.xxyz + mov r19.x, l(0) + movc r17.xyz, r17.xxxx, r19.xyzx, r17.yzwy +else + lt r19.xyz, r0.yyzy, r0.zxxz + add r20.xyzw, -r0.yyzz, r0.xzyx + mul r21.xyz, r16.wwww, r20.xyzx + div r16.xyz, r21.xyzx, r20.yxwy + and r20.xz, r16.xxwx, r19.xxxx + ge r19.xw, r0.zzzz, r0.xxxy + and r21.xz, r16.wwyw, r19.yyyy + and r16.xy, r16.wzww, r19.zzzz + mov r21.y, l(0) + mov r16.z, l(0) + movc r16.xyz, r19.wwww, r21.xyzx, r16.xyzx + mov r20.y, l(0) + movc r17.xyz, r19.xxxx, r20.xyzx, r16.xyzx +endif +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r17.xyzx +add r3.w, r2.w, -r3.w +add r16.xyz, r3.wwww, r17.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r16.xyzx +min r4.w, r16.y, r16.x +min r4.w, r16.z, r4.w +max r5.w, r16.y, r16.x +max r5.w, r16.z, r5.w +lt r6.w, r4.w, l(0.000000) +add r17.xyz, -r3.wwww, r16.xyzx +mul r17.xyz, r3.wwww, r17.xyzx +add r4.w, r3.w, -r4.w +div r17.xyz, r17.xyzx, r4.wwww +add r17.xyz, r3.wwww, r17.xyzx +movc r16.xyz, r6.wwww, r17.xyzx, r16.xyzx +lt r4.w, l(1.000000), r5.w +add r17.xyz, -r3.wwww, r16.xyzx +add r6.w, -r3.w, l(1.000000) +mul r17.xyz, r6.wwww, r17.xyzx +add r5.w, -r3.w, r5.w +div r17.xyz, r17.xyzx, r5.wwww +add r17.xyz, r3.wwww, r17.xyzx +movc r16.xyz, r4.wwww, r17.xyzx, r16.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r1.xyzx +add r4.w, r2.w, -r3.w +add r17.xyz, r1.xyzx, r4.wwww +dp3 r4.w, l(0.300000, 0.590000, 0.110000, 0.000000), r17.xyzx +min r5.w, r17.y, r17.x +min r5.w, r17.z, r5.w +max r6.w, r17.y, r17.x +max r6.w, r17.z, r6.w +lt r7.w, r5.w, l(0.000000) +add r19.xyz, -r4.wwww, r17.xyzx +mul r19.xyz, r4.wwww, r19.xyzx +add r5.w, r4.w, -r5.w +div r19.xyz, r19.xyzx, r5.wwww +add r19.xyz, r4.wwww, r19.xyzx +movc r17.xyz, r7.wwww, r19.xyzx, r17.xyzx +lt r5.w, l(1.000000), r6.w +add r19.xyz, -r4.wwww, r17.xyzx +add r7.w, -r4.w, l(1.000000) +mul r19.xyz, r7.wwww, r19.xyzx +add r6.w, -r4.w, r6.w +div r19.xyz, r19.xyzx, r6.wwww +add r19.xyz, r4.wwww, r19.xyzx +movc r17.xyz, r5.wwww, r19.xyzx, r17.xyzx +ieq r19.xy, l(13, 14, 0, 0), cb0[2].zzzz +add r2.w, -r2.w, r3.w +add r0.xyz, r0.xyzx, r2.wwww +dp3 r2.w, l(0.300000, 0.590000, 0.110000, 0.000000), r0.xyzx +min r3.w, r0.y, r0.x +min r3.w, r0.z, r3.w +max r4.w, r0.y, r0.x +max r4.w, r0.z, r4.w +lt r5.w, r3.w, l(0.000000) +add r20.xyz, r0.xyzx, -r2.wwww +mul r20.xyz, r2.wwww, r20.xyzx +add r3.w, r2.w, -r3.w +div r20.xyz, r20.xyzx, r3.wwww +add r20.xyz, r2.wwww, r20.xyzx +movc r0.xyz, r5.wwww, r20.xyzx, r0.xyzx +lt r3.w, l(1.000000), r4.w +add r20.xyz, -r2.wwww, r0.xyzx +add r5.w, -r2.w, l(1.000000) +mul r20.xyz, r5.wwww, r20.xyzx +add r4.w, -r2.w, r4.w +div r20.xyz, r20.xyzx, r4.wwww +add r20.xyz, r2.wwww, r20.xyzx +movc r0.xyz, r3.wwww, r20.xyzx, r0.xyzx +and r0.xyz, r0.xyzx, r19.yyyy +movc r0.xyz, r19.xxxx, r17.xyzx, r0.xyzx +movc r0.xyz, r14.wwww, r16.xyzx, r0.xyzx +movc r0.xyz, r14.zzzz, r13.xyzx, r0.xyzx +movc r0.xyz, r14.yyyy, r3.xyzx, r0.xyzx +movc r0.xyz, r14.xxxx, |r10.xyzx|, r0.xyzx +movc r0.xyz, r9.wwww, r18.xyzx, r0.xyzx +movc r0.xyz, r9.zzzz, r6.xyzx, r0.xyzx +movc r0.xyz, r9.yyyy, r15.xyzx, r0.xyzx +movc r0.xyz, r9.xxxx, r12.xyzx, r0.xyzx +movc r0.xyz, r8.wwww, r11.xyzx, r0.xyzx +movc r0.xyz, r8.zzzz, r7.xyzx, r0.xyzx +movc r0.xyz, r8.yyyy, r5.xyzx, r0.xyzx +movc r0.xyz, r8.xxxx, r4.xyzx, r0.xyzx +movc r0.xyz, cb0[2].zzzz, r0.xyzx, r2.xyzx +add r2.x, -r0.w, l(1.000000) +mul r0.xyz, r0.xyzx, r0.wwww +mad r0.xyz, r2.xxxx, r1.xyzx, r0.xyzx +mul o0.xyz, r1.wwww, r0.xyzx +mov o0.w, r1.w +ret +// Approximately 345 instruction slots used +#endif + +const BYTE BlendShader[] = +{ + 68, 88, 66, 67, 121, 58, + 99, 114, 236, 21, 118, 177, + 57, 125, 153, 182, 56, 164, + 101, 220, 1, 0, 0, 0, + 176, 68, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 152, 23, 0, 0, 200, 63, + 0, 0, 68, 64, 0, 0, + 244, 67, 0, 0, 124, 68, + 0, 0, 65, 111, 110, 57, + 88, 23, 0, 0, 88, 23, + 0, 0, 0, 2, 255, 255, + 0, 23, 0, 0, 88, 0, + 0, 0, 2, 0, 64, 0, + 0, 0, 88, 0, 0, 0, + 88, 0, 7, 0, 36, 0, + 0, 0, 88, 0, 0, 0, + 0, 0, 1, 0, 1, 0, + 2, 0, 2, 0, 3, 0, + 3, 0, 5, 0, 4, 0, + 6, 0, 5, 0, 5, 1, + 6, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, + 1, 0, 2, 0, 3, 3, + 3, 3, 1, 2, 255, 255, + 81, 0, 0, 5, 3, 0, + 15, 160, 0, 0, 128, 191, + 0, 0, 0, 192, 115, 128, + 0, 191, 18, 131, 128, 189, + 81, 0, 0, 5, 4, 0, + 15, 160, 182, 74, 204, 63, + 205, 30, 80, 63, 103, 10, + 149, 63, 76, 26, 1, 64, + 81, 0, 0, 5, 5, 0, + 15, 160, 0, 0, 128, 191, + 0, 0, 0, 192, 0, 0, + 64, 192, 0, 0, 128, 192, + 81, 0, 0, 5, 6, 0, + 15, 160, 0, 0, 160, 192, + 0, 0, 192, 192, 0, 0, + 224, 192, 0, 0, 0, 193, + 81, 0, 0, 5, 7, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 128, 62, 0, 0, + 0, 64, 0, 0, 128, 191, + 81, 0, 0, 5, 8, 0, + 15, 160, 0, 0, 128, 65, + 0, 0, 64, 193, 0, 0, + 80, 193, 0, 0, 96, 193, + 81, 0, 0, 5, 9, 0, + 15, 160, 0, 0, 16, 193, + 0, 0, 32, 193, 0, 0, + 48, 193, 0, 0, 64, 193, + 81, 0, 0, 5, 10, 0, + 15, 160, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 81, 0, 0, 5, 11, 0, + 15, 160, 196, 148, 200, 62, + 0, 0, 128, 191, 0, 0, + 0, 128, 0, 0, 0, 191, + 31, 0, 0, 2, 0, 0, + 0, 128, 0, 0, 15, 176, + 31, 0, 0, 2, 0, 0, + 0, 128, 1, 0, 7, 176, + 31, 0, 0, 2, 0, 0, + 0, 144, 0, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 1, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 2, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 3, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 4, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 5, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 6, 8, 15, 160, + 1, 0, 0, 2, 0, 0, + 1, 128, 11, 0, 170, 161, + 1, 0, 0, 2, 1, 0, + 1, 128, 11, 0, 170, 161, + 1, 0, 0, 2, 2, 0, + 4, 128, 11, 0, 170, 161, + 66, 0, 0, 3, 3, 0, + 15, 128, 0, 0, 228, 176, + 1, 8, 228, 160, 66, 0, + 0, 3, 4, 0, 15, 128, + 0, 0, 228, 176, 3, 8, + 228, 160, 2, 0, 0, 3, + 0, 0, 8, 128, 4, 0, + 0, 128, 3, 0, 170, 160, + 5, 0, 0, 3, 3, 0, + 6, 128, 0, 0, 255, 128, + 4, 0, 208, 160, 2, 0, + 0, 3, 0, 0, 8, 128, + 3, 0, 0, 128, 3, 0, + 255, 160, 4, 0, 0, 4, + 1, 0, 8, 128, 0, 0, + 255, 128, 4, 0, 170, 160, + 3, 0, 170, 129, 4, 0, + 0, 4, 3, 0, 1, 128, + 0, 0, 255, 128, 4, 0, + 170, 160, 3, 0, 85, 128, + 66, 0, 0, 3, 4, 0, + 15, 128, 1, 0, 228, 176, + 4, 8, 228, 160, 66, 0, + 0, 3, 5, 0, 15, 128, + 0, 0, 228, 176, 2, 8, + 228, 160, 2, 0, 0, 3, + 2, 0, 8, 128, 5, 0, + 0, 128, 3, 0, 170, 160, + 4, 0, 0, 4, 3, 0, + 2, 128, 2, 0, 255, 128, + 11, 0, 0, 161, 1, 0, + 255, 128, 5, 0, 0, 3, + 1, 0, 8, 128, 2, 0, + 255, 128, 4, 0, 255, 160, + 4, 0, 0, 4, 3, 0, + 4, 128, 0, 0, 255, 128, + 4, 0, 170, 160, 1, 0, + 255, 128, 1, 0, 0, 2, + 3, 0, 8, 128, 3, 0, + 0, 161, 5, 0, 0, 3, + 3, 0, 15, 128, 3, 0, + 228, 128, 1, 0, 0, 160, + 5, 0, 0, 3, 5, 0, + 15, 128, 4, 0, 0, 128, + 3, 0, 228, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 1, 0, 170, 176, 5, 0, + 0, 3, 6, 0, 3, 128, + 0, 0, 255, 128, 1, 0, + 228, 176, 66, 0, 0, 3, + 7, 0, 15, 128, 0, 0, + 228, 176, 0, 8, 228, 160, + 66, 0, 0, 3, 6, 0, + 15, 128, 6, 0, 228, 128, + 6, 8, 228, 160, 5, 0, + 0, 3, 7, 0, 15, 128, + 7, 0, 228, 128, 1, 0, + 0, 160, 5, 0, 0, 3, + 8, 0, 15, 128, 4, 0, + 0, 128, 7, 0, 228, 128, + 1, 0, 0, 2, 9, 0, + 3, 128, 3, 0, 228, 160, + 2, 0, 0, 3, 10, 0, + 15, 128, 9, 0, 68, 128, + 2, 0, 80, 160, 5, 0, + 0, 3, 10, 0, 15, 128, + 10, 0, 228, 128, 10, 0, + 228, 128, 88, 0, 0, 4, + 5, 0, 15, 128, 10, 0, + 0, 129, 8, 0, 228, 128, + 5, 0, 228, 128, 1, 0, + 0, 2, 8, 0, 7, 128, + 7, 0, 228, 128, 1, 0, + 0, 2, 8, 0, 8, 128, + 1, 0, 0, 160, 5, 0, + 0, 3, 11, 0, 15, 128, + 4, 0, 0, 128, 8, 0, + 228, 128, 5, 0, 0, 3, + 4, 0, 15, 128, 4, 0, + 0, 128, 0, 0, 228, 160, + 88, 0, 0, 4, 5, 0, + 15, 128, 2, 0, 0, 161, + 11, 0, 228, 128, 5, 0, + 228, 128, 88, 0, 0, 4, + 6, 0, 6, 128, 10, 0, + 244, 129, 11, 0, 85, 160, + 11, 0, 170, 160, 88, 0, + 0, 4, 6, 0, 6, 128, + 10, 0, 224, 129, 3, 0, + 0, 160, 6, 0, 228, 128, + 88, 0, 0, 4, 6, 0, + 6, 128, 2, 0, 208, 161, + 9, 0, 0, 128, 6, 0, + 228, 128, 88, 0, 0, 4, + 4, 0, 15, 128, 6, 0, + 85, 128, 4, 0, 228, 128, + 5, 0, 228, 128, 5, 0, + 0, 3, 5, 0, 15, 128, + 6, 0, 0, 128, 7, 0, + 228, 128, 88, 0, 0, 4, + 3, 0, 15, 128, 10, 0, + 0, 129, 7, 0, 228, 128, + 3, 0, 228, 128, 88, 0, + 0, 4, 4, 0, 15, 128, + 10, 0, 170, 129, 4, 0, + 228, 128, 5, 0, 228, 128, + 88, 0, 0, 4, 3, 0, + 15, 128, 2, 0, 0, 161, + 8, 0, 228, 128, 3, 0, + 228, 128, 88, 0, 0, 4, + 3, 0, 15, 128, 6, 0, + 85, 128, 0, 0, 228, 160, + 3, 0, 228, 128, 88, 0, + 0, 4, 3, 0, 15, 128, + 2, 0, 85, 161, 3, 0, + 228, 128, 4, 0, 228, 128, + 88, 0, 0, 4, 3, 0, + 15, 128, 6, 0, 170, 128, + 11, 0, 106, 161, 3, 0, + 228, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 3, 0, + 255, 128, 5, 0, 0, 3, + 4, 0, 7, 128, 0, 0, + 255, 128, 3, 0, 228, 128, + 88, 0, 0, 4, 4, 0, + 7, 128, 2, 0, 255, 161, + 3, 0, 228, 128, 4, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 3, 128, 4, 0, + 233, 129, 4, 0, 228, 128, + 88, 0, 0, 4, 5, 0, + 12, 128, 5, 0, 0, 128, + 4, 0, 68, 128, 4, 0, + 20, 128, 11, 0, 0, 3, + 0, 0, 8, 128, 5, 0, + 170, 128, 4, 0, 170, 128, + 10, 0, 0, 3, 1, 0, + 8, 128, 4, 0, 170, 128, + 5, 0, 255, 128, 2, 0, + 0, 3, 6, 0, 8, 128, + 0, 0, 255, 128, 1, 0, + 255, 129, 1, 0, 0, 2, + 7, 0, 3, 128, 0, 0, + 235, 176, 66, 0, 0, 3, + 7, 0, 15, 128, 7, 0, + 228, 128, 5, 8, 228, 160, + 6, 0, 0, 2, 0, 0, + 8, 128, 7, 0, 255, 128, + 5, 0, 0, 3, 8, 0, + 7, 128, 0, 0, 255, 128, + 7, 0, 228, 128, 4, 0, + 0, 4, 5, 0, 12, 128, + 7, 0, 100, 128, 0, 0, + 255, 128, 8, 0, 132, 129, + 5, 0, 0, 3, 9, 0, + 3, 128, 6, 0, 255, 128, + 5, 0, 238, 128, 4, 0, + 0, 4, 10, 0, 15, 128, + 7, 0, 129, 128, 0, 0, + 255, 128, 8, 0, 88, 129, + 6, 0, 0, 2, 1, 0, + 8, 128, 10, 0, 0, 128, + 5, 0, 0, 3, 6, 0, + 2, 128, 1, 0, 255, 128, + 9, 0, 0, 128, 88, 0, + 0, 4, 1, 0, 6, 128, + 10, 0, 170, 128, 11, 0, + 170, 161, 6, 0, 220, 128, + 5, 0, 0, 3, 11, 0, + 15, 128, 6, 0, 255, 128, + 10, 0, 228, 128, 6, 0, + 0, 2, 1, 0, 8, 128, + 5, 0, 255, 128, 5, 0, + 0, 3, 6, 0, 1, 128, + 1, 0, 255, 128, 11, 0, + 85, 128, 88, 0, 0, 4, + 2, 0, 3, 128, 10, 0, + 255, 128, 11, 0, 170, 161, + 6, 0, 236, 128, 88, 0, + 0, 4, 1, 0, 7, 128, + 5, 0, 170, 128, 1, 0, + 228, 128, 2, 0, 228, 128, + 6, 0, 0, 2, 1, 0, + 8, 128, 5, 0, 170, 128, + 5, 0, 0, 3, 6, 0, + 4, 128, 1, 0, 255, 128, + 11, 0, 0, 128, 88, 0, + 0, 4, 0, 0, 6, 128, + 10, 0, 85, 128, 11, 0, + 170, 161, 6, 0, 248, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 10, 0, 255, 128, + 0, 0, 228, 128, 1, 0, + 228, 128, 1, 0, 0, 2, + 1, 0, 2, 128, 11, 0, + 170, 161, 1, 0, 0, 2, + 2, 0, 2, 128, 11, 0, + 170, 161, 1, 0, 0, 2, + 12, 0, 4, 128, 11, 0, + 170, 161, 6, 0, 0, 2, + 1, 0, 8, 128, 10, 0, + 170, 128, 5, 0, 0, 3, + 6, 0, 2, 128, 1, 0, + 255, 128, 11, 0, 255, 128, + 88, 0, 0, 4, 2, 0, + 5, 128, 10, 0, 0, 128, + 11, 0, 170, 161, 6, 0, + 215, 128, 6, 0, 0, 2, + 1, 0, 8, 128, 10, 0, + 85, 128, 5, 0, 0, 3, + 6, 0, 1, 128, 1, 0, + 255, 128, 9, 0, 85, 128, + 88, 0, 0, 4, 12, 0, + 3, 128, 5, 0, 170, 128, + 11, 0, 170, 161, 6, 0, + 227, 128, 88, 0, 0, 4, + 2, 0, 7, 128, 10, 0, + 255, 128, 2, 0, 228, 128, + 12, 0, 228, 128, 6, 0, + 0, 2, 1, 0, 8, 128, + 10, 0, 255, 128, 5, 0, + 0, 3, 6, 0, 4, 128, + 1, 0, 255, 128, 11, 0, + 170, 128, 88, 0, 0, 4, + 1, 0, 5, 128, 5, 0, + 255, 128, 11, 0, 170, 161, + 6, 0, 246, 128, 88, 0, + 0, 4, 1, 0, 7, 128, + 5, 0, 170, 128, 1, 0, + 228, 128, 2, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 10, 0, 0, 128, + 0, 0, 228, 128, 1, 0, + 228, 128, 88, 0, 0, 4, + 1, 0, 3, 128, 10, 0, + 170, 128, 8, 0, 228, 128, + 8, 0, 225, 128, 8, 0, + 0, 3, 4, 0, 8, 128, + 10, 0, 228, 160, 0, 0, + 228, 128, 8, 0, 0, 3, + 8, 0, 8, 128, 10, 0, + 228, 160, 8, 0, 228, 128, + 2, 0, 0, 3, 4, 0, + 8, 128, 4, 0, 255, 129, + 8, 0, 255, 128, 2, 0, + 0, 3, 0, 0, 7, 128, + 0, 0, 228, 128, 4, 0, + 255, 128, 2, 0, 0, 3, + 4, 0, 8, 128, 0, 0, + 85, 129, 0, 0, 0, 128, + 88, 0, 0, 4, 1, 0, + 12, 128, 4, 0, 255, 128, + 0, 0, 20, 128, 0, 0, + 68, 128, 10, 0, 0, 3, + 4, 0, 8, 128, 0, 0, + 170, 128, 1, 0, 170, 128, + 11, 0, 0, 3, 2, 0, + 1, 128, 1, 0, 255, 128, + 0, 0, 170, 128, 8, 0, + 0, 3, 1, 0, 4, 128, + 10, 0, 228, 160, 0, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 8, 128, 4, 0, + 255, 129, 1, 0, 170, 128, + 6, 0, 0, 2, 1, 0, + 8, 128, 1, 0, 255, 128, + 2, 0, 0, 3, 2, 0, + 14, 128, 0, 0, 144, 128, + 1, 0, 170, 129, 5, 0, + 0, 3, 2, 0, 14, 128, + 1, 0, 170, 128, 2, 0, + 228, 128, 4, 0, 0, 4, + 2, 0, 14, 128, 2, 0, + 228, 128, 1, 0, 255, 128, + 1, 0, 170, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 4, 0, 255, 128, 0, 0, + 228, 128, 2, 0, 249, 128, + 2, 0, 0, 3, 2, 0, + 14, 128, 1, 0, 170, 129, + 0, 0, 144, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 1, 0, 170, 129, 3, 0, + 0, 161, 5, 0, 0, 3, + 2, 0, 14, 128, 1, 0, + 255, 128, 2, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 1, 0, 170, 129, + 2, 0, 0, 128, 2, 0, + 0, 3, 4, 0, 8, 128, + 2, 0, 0, 129, 3, 0, + 0, 161, 6, 0, 0, 2, + 1, 0, 8, 128, 1, 0, + 255, 128, 4, 0, 0, 4, + 2, 0, 7, 128, 2, 0, + 249, 128, 1, 0, 255, 128, + 1, 0, 170, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 4, 0, 255, 128, 0, 0, + 228, 128, 2, 0, 228, 128, + 1, 0, 0, 2, 4, 0, + 8, 128, 2, 0, 170, 160, + 2, 0, 0, 3, 1, 0, + 12, 128, 4, 0, 255, 128, + 8, 0, 228, 160, 5, 0, + 0, 3, 1, 0, 12, 128, + 1, 0, 228, 128, 1, 0, + 228, 128, 8, 0, 0, 3, + 2, 0, 1, 128, 10, 0, + 228, 160, 4, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 2, 128, 8, 0, 255, 129, + 2, 0, 0, 128, 2, 0, + 0, 3, 2, 0, 1, 128, + 2, 0, 0, 129, 8, 0, + 255, 128, 2, 0, 0, 3, + 2, 0, 13, 128, 2, 0, + 0, 128, 4, 0, 148, 128, + 4, 0, 0, 4, 6, 0, + 7, 128, 7, 0, 228, 128, + 0, 0, 255, 128, 2, 0, + 85, 128, 2, 0, 0, 3, + 6, 0, 8, 128, 6, 0, + 85, 129, 6, 0, 0, 128, + 88, 0, 0, 4, 5, 0, + 12, 128, 6, 0, 255, 128, + 6, 0, 20, 128, 6, 0, + 68, 128, 10, 0, 0, 3, + 2, 0, 2, 128, 6, 0, + 170, 128, 5, 0, 170, 128, + 11, 0, 0, 3, 9, 0, + 1, 128, 5, 0, 255, 128, + 6, 0, 170, 128, 8, 0, + 0, 3, 6, 0, 8, 128, + 10, 0, 228, 160, 6, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 4, 128, 2, 0, + 85, 129, 6, 0, 255, 128, + 6, 0, 0, 2, 5, 0, + 4, 128, 5, 0, 170, 128, + 2, 0, 0, 3, 9, 0, + 14, 128, 6, 0, 255, 129, + 6, 0, 144, 128, 5, 0, + 0, 3, 9, 0, 14, 128, + 6, 0, 255, 128, 9, 0, + 228, 128, 4, 0, 0, 4, + 9, 0, 14, 128, 9, 0, + 228, 128, 5, 0, 170, 128, + 6, 0, 255, 128, 88, 0, + 0, 4, 6, 0, 7, 128, + 2, 0, 85, 128, 6, 0, + 228, 128, 9, 0, 249, 128, + 2, 0, 0, 3, 9, 0, + 14, 128, 6, 0, 255, 129, + 6, 0, 144, 128, 2, 0, + 0, 3, 2, 0, 2, 128, + 6, 0, 255, 129, 3, 0, + 0, 161, 5, 0, 0, 3, + 9, 0, 14, 128, 2, 0, + 85, 128, 9, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 2, 128, 6, 0, 255, 129, + 9, 0, 0, 128, 2, 0, + 0, 3, 5, 0, 4, 128, + 9, 0, 0, 129, 3, 0, + 0, 161, 6, 0, 0, 2, + 5, 0, 8, 128, 2, 0, + 85, 128, 4, 0, 0, 4, + 9, 0, 7, 128, 9, 0, + 249, 128, 5, 0, 255, 128, + 6, 0, 255, 128, 88, 0, + 0, 4, 6, 0, 7, 128, + 5, 0, 170, 128, 6, 0, + 228, 128, 9, 0, 228, 128, + 88, 0, 0, 4, 6, 0, + 7, 128, 1, 0, 255, 129, + 6, 0, 228, 128, 11, 0, + 170, 161, 2, 0, 0, 3, + 1, 0, 8, 128, 2, 0, + 170, 129, 2, 0, 0, 128, + 88, 0, 0, 4, 5, 0, + 12, 128, 1, 0, 255, 128, + 2, 0, 36, 128, 2, 0, + 132, 128, 10, 0, 0, 3, + 1, 0, 8, 128, 2, 0, + 255, 128, 5, 0, 170, 128, + 11, 0, 0, 3, 6, 0, + 8, 128, 5, 0, 255, 128, + 2, 0, 255, 128, 8, 0, + 0, 3, 2, 0, 2, 128, + 10, 0, 228, 160, 2, 0, + 248, 128, 2, 0, 0, 3, + 5, 0, 4, 128, 1, 0, + 255, 129, 2, 0, 85, 128, + 6, 0, 0, 2, 5, 0, + 4, 128, 5, 0, 170, 128, + 2, 0, 0, 3, 9, 0, + 7, 128, 2, 0, 85, 129, + 2, 0, 248, 128, 5, 0, + 0, 3, 9, 0, 7, 128, + 2, 0, 85, 128, 9, 0, + 228, 128, 4, 0, 0, 4, + 9, 0, 7, 128, 9, 0, + 228, 128, 5, 0, 170, 128, + 2, 0, 85, 128, 88, 0, + 0, 4, 2, 0, 13, 128, + 1, 0, 255, 128, 2, 0, + 228, 128, 9, 0, 148, 128, + 2, 0, 0, 3, 9, 0, + 7, 128, 2, 0, 85, 129, + 2, 0, 248, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 2, 0, 85, 129, 3, 0, + 0, 161, 5, 0, 0, 3, + 9, 0, 7, 128, 1, 0, + 255, 128, 9, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 2, 0, 85, 129, + 6, 0, 255, 128, 2, 0, + 0, 3, 6, 0, 8, 128, + 6, 0, 255, 129, 3, 0, + 0, 161, 6, 0, 0, 2, + 1, 0, 8, 128, 1, 0, + 255, 128, 4, 0, 0, 4, + 9, 0, 7, 128, 9, 0, + 228, 128, 1, 0, 255, 128, + 2, 0, 85, 128, 88, 0, + 0, 4, 2, 0, 7, 128, + 6, 0, 255, 128, 2, 0, + 248, 128, 9, 0, 228, 128, + 88, 0, 0, 4, 2, 0, + 7, 128, 1, 0, 170, 129, + 2, 0, 228, 128, 6, 0, + 228, 128, 2, 0, 0, 3, + 6, 0, 15, 128, 4, 0, + 255, 128, 9, 0, 228, 160, + 5, 0, 0, 3, 6, 0, + 15, 128, 6, 0, 228, 128, + 6, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 6, 0, 255, 129, 0, 0, + 228, 128, 2, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 15, 128, 4, 0, 96, 129, + 4, 0, 137, 128, 1, 0, + 0, 2, 9, 0, 2, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 10, 0, 2, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 11, 0, 4, 128, + 11, 0, 170, 161, 6, 0, + 0, 2, 6, 0, 8, 128, + 2, 0, 170, 128, 11, 0, + 0, 3, 9, 0, 8, 128, + 1, 0, 0, 128, 8, 0, + 170, 128, 10, 0, 0, 3, + 10, 0, 8, 128, 8, 0, + 170, 128, 1, 0, 85, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 9, 0, 255, 128, + 10, 0, 255, 129, 5, 0, + 0, 3, 5, 0, 12, 128, + 1, 0, 255, 128, 5, 0, + 68, 128, 5, 0, 0, 3, + 1, 0, 1, 128, 6, 0, + 255, 128, 5, 0, 255, 128, + 88, 0, 0, 4, 11, 0, + 3, 128, 2, 0, 85, 128, + 11, 0, 170, 161, 1, 0, + 227, 128, 6, 0, 0, 2, + 5, 0, 8, 128, 5, 0, + 0, 128, 5, 0, 0, 3, + 12, 0, 15, 128, 1, 0, + 255, 128, 2, 0, 228, 128, + 5, 0, 0, 3, 1, 0, + 2, 128, 5, 0, 255, 128, + 12, 0, 255, 128, 88, 0, + 0, 4, 10, 0, 5, 128, + 2, 0, 0, 128, 11, 0, + 170, 161, 1, 0, 215, 128, + 88, 0, 0, 4, 10, 0, + 7, 128, 2, 0, 255, 128, + 10, 0, 228, 128, 11, 0, + 228, 128, 6, 0, 0, 2, + 5, 0, 8, 128, 2, 0, + 255, 128, 5, 0, 0, 3, + 1, 0, 4, 128, 5, 0, + 255, 128, 5, 0, 170, 128, + 88, 0, 0, 4, 9, 0, + 5, 128, 5, 0, 85, 128, + 11, 0, 170, 161, 1, 0, + 246, 128, 88, 0, 0, 4, + 9, 0, 7, 128, 2, 0, + 85, 128, 9, 0, 228, 128, + 10, 0, 228, 128, 1, 0, + 0, 2, 10, 0, 1, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 11, 0, 1, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 13, 0, 4, 128, + 11, 0, 170, 161, 6, 0, + 0, 2, 6, 0, 8, 128, + 2, 0, 0, 128, 5, 0, + 0, 3, 1, 0, 2, 128, + 6, 0, 255, 128, 12, 0, + 85, 128, 88, 0, 0, 4, + 11, 0, 6, 128, 5, 0, + 0, 128, 11, 0, 170, 161, + 1, 0, 220, 128, 6, 0, + 0, 2, 6, 0, 8, 128, + 5, 0, 85, 128, 5, 0, + 0, 3, 1, 0, 1, 128, + 6, 0, 255, 128, 12, 0, + 170, 128, 88, 0, 0, 4, + 13, 0, 3, 128, 2, 0, + 255, 128, 11, 0, 170, 161, + 1, 0, 236, 128, 88, 0, + 0, 4, 5, 0, 7, 128, + 2, 0, 85, 128, 11, 0, + 228, 128, 13, 0, 228, 128, + 6, 0, 0, 2, 5, 0, + 8, 128, 2, 0, 85, 128, + 5, 0, 0, 3, 1, 0, + 4, 128, 5, 0, 255, 128, + 12, 0, 0, 128, 88, 0, + 0, 4, 10, 0, 6, 128, + 2, 0, 170, 128, 11, 0, + 170, 161, 1, 0, 248, 128, + 88, 0, 0, 4, 1, 0, + 7, 128, 2, 0, 255, 128, + 10, 0, 228, 128, 5, 0, + 228, 128, 88, 0, 0, 4, + 1, 0, 7, 128, 2, 0, + 0, 128, 1, 0, 228, 128, + 9, 0, 228, 128, 8, 0, + 0, 3, 1, 0, 8, 128, + 10, 0, 228, 160, 1, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 8, 128, 1, 0, + 255, 129, 8, 0, 255, 128, + 2, 0, 0, 3, 1, 0, + 7, 128, 1, 0, 255, 128, + 1, 0, 228, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 1, 0, 85, 129, 1, 0, + 0, 128, 88, 0, 0, 4, + 2, 0, 3, 128, 1, 0, + 255, 128, 1, 0, 225, 128, + 1, 0, 228, 128, 10, 0, + 0, 3, 6, 0, 8, 128, + 1, 0, 170, 128, 2, 0, + 0, 128, 11, 0, 0, 3, + 8, 0, 8, 128, 2, 0, + 85, 128, 1, 0, 170, 128, + 8, 0, 0, 3, 1, 0, + 8, 128, 10, 0, 228, 160, + 1, 0, 228, 128, 2, 0, + 0, 3, 2, 0, 1, 128, + 6, 0, 255, 129, 1, 0, + 255, 128, 6, 0, 0, 2, + 2, 0, 1, 128, 2, 0, + 0, 128, 2, 0, 0, 3, + 2, 0, 14, 128, 1, 0, + 255, 129, 1, 0, 144, 128, + 5, 0, 0, 3, 2, 0, + 14, 128, 1, 0, 255, 128, + 2, 0, 228, 128, 4, 0, + 0, 4, 2, 0, 7, 128, + 2, 0, 249, 128, 2, 0, + 0, 128, 1, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 7, 128, 6, 0, 255, 128, + 1, 0, 228, 128, 2, 0, + 228, 128, 2, 0, 0, 3, + 2, 0, 7, 128, 1, 0, + 255, 129, 1, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 8, 128, 1, 0, 255, 129, + 3, 0, 0, 161, 5, 0, + 0, 3, 2, 0, 7, 128, + 2, 0, 255, 128, 2, 0, + 228, 128, 2, 0, 0, 3, + 2, 0, 8, 128, 1, 0, + 255, 129, 8, 0, 255, 128, + 2, 0, 0, 3, 6, 0, + 8, 128, 8, 0, 255, 129, + 3, 0, 0, 161, 6, 0, + 0, 2, 2, 0, 8, 128, + 2, 0, 255, 128, 4, 0, + 0, 4, 2, 0, 7, 128, + 2, 0, 228, 128, 2, 0, + 255, 128, 1, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 7, 128, 6, 0, 255, 128, + 1, 0, 228, 128, 2, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 6, 0, + 170, 129, 1, 0, 228, 128, + 0, 0, 228, 128, 4, 0, + 0, 4, 1, 0, 7, 128, + 7, 0, 228, 128, 0, 0, + 255, 128, 4, 0, 228, 128, + 5, 0, 0, 3, 2, 0, + 7, 128, 4, 0, 228, 128, + 8, 0, 228, 128, 4, 0, + 0, 4, 5, 0, 7, 128, + 2, 0, 228, 128, 3, 0, + 85, 160, 1, 0, 228, 128, + 4, 0, 0, 4, 1, 0, + 7, 128, 8, 0, 228, 128, + 4, 0, 228, 129, 1, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 6, 0, + 85, 129, 5, 0, 228, 128, + 0, 0, 228, 128, 4, 0, + 0, 4, 5, 0, 7, 128, + 7, 0, 228, 128, 0, 0, + 255, 128, 4, 0, 228, 129, + 35, 0, 0, 2, 5, 0, + 7, 128, 5, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 6, 0, 0, 129, + 5, 0, 228, 128, 0, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 3, 128, 4, 0, + 233, 129, 11, 0, 255, 161, + 4, 0, 0, 4, 6, 0, + 7, 128, 4, 0, 228, 128, + 7, 0, 170, 160, 7, 0, + 255, 160, 4, 0, 0, 4, + 1, 0, 8, 128, 7, 0, + 170, 128, 0, 0, 255, 129, + 7, 0, 85, 160, 4, 0, + 0, 4, 9, 0, 7, 128, + 8, 0, 228, 128, 8, 0, + 0, 160, 8, 0, 85, 160, + 4, 0, 0, 4, 9, 0, + 7, 128, 9, 0, 228, 128, + 8, 0, 228, 128, 5, 0, + 255, 161, 5, 0, 0, 3, + 9, 0, 7, 128, 8, 0, + 228, 128, 9, 0, 228, 128, + 7, 0, 0, 2, 2, 0, + 8, 128, 8, 0, 170, 128, + 6, 0, 0, 2, 2, 0, + 8, 128, 2, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 8, 128, 1, 0, 255, 128, + 9, 0, 170, 128, 2, 0, + 255, 128, 4, 0, 0, 4, + 1, 0, 8, 128, 7, 0, + 170, 128, 0, 0, 255, 129, + 1, 0, 255, 128, 4, 0, + 0, 4, 1, 0, 8, 128, + 6, 0, 170, 128, 1, 0, + 255, 128, 8, 0, 170, 128, + 4, 0, 0, 4, 10, 0, + 7, 128, 4, 0, 228, 128, + 3, 0, 85, 160, 3, 0, + 0, 161, 5, 0, 0, 3, + 10, 0, 7, 128, 8, 0, + 228, 128, 10, 0, 228, 128, + 4, 0, 0, 4, 11, 0, + 15, 128, 7, 0, 73, 128, + 0, 0, 255, 129, 7, 0, + 80, 160, 4, 0, 0, 4, + 5, 0, 12, 128, 10, 0, + 148, 128, 11, 0, 68, 129, + 8, 0, 148, 128, 88, 0, + 0, 4, 12, 0, 4, 128, + 5, 0, 85, 128, 5, 0, + 255, 128, 1, 0, 255, 128, + 7, 0, 0, 2, 1, 0, + 8, 128, 8, 0, 85, 128, + 6, 0, 0, 2, 1, 0, + 8, 128, 1, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 8, 128, 11, 0, 255, 128, + 9, 0, 85, 128, 1, 0, + 255, 128, 4, 0, 0, 4, + 1, 0, 8, 128, 7, 0, + 85, 128, 0, 0, 255, 129, + 1, 0, 255, 128, 4, 0, + 0, 4, 1, 0, 8, 128, + 6, 0, 85, 128, 1, 0, + 255, 128, 8, 0, 85, 128, + 88, 0, 0, 4, 12, 0, + 2, 128, 5, 0, 0, 128, + 5, 0, 170, 128, 1, 0, + 255, 128, 2, 0, 0, 3, + 13, 0, 15, 128, 4, 0, + 255, 128, 6, 0, 228, 160, + 5, 0, 0, 3, 13, 0, + 15, 128, 13, 0, 228, 128, + 13, 0, 228, 128, 2, 0, + 0, 3, 14, 0, 15, 128, + 4, 0, 36, 129, 11, 0, + 213, 161, 7, 0, 0, 2, + 1, 0, 8, 128, 8, 0, + 0, 128, 6, 0, 0, 2, + 1, 0, 8, 128, 1, 0, + 255, 128, 88, 0, 0, 4, + 1, 0, 8, 128, 11, 0, + 170, 128, 9, 0, 0, 128, + 1, 0, 255, 128, 4, 0, + 0, 4, 1, 0, 8, 128, + 7, 0, 0, 128, 0, 0, + 255, 129, 1, 0, 255, 128, + 4, 0, 0, 4, 1, 0, + 8, 128, 6, 0, 0, 128, + 1, 0, 255, 128, 8, 0, + 0, 128, 4, 0, 0, 4, + 6, 0, 15, 128, 7, 0, + 36, 128, 0, 0, 255, 129, + 11, 0, 127, 161, 4, 0, + 0, 4, 9, 0, 7, 128, + 7, 0, 228, 128, 0, 0, + 255, 128, 3, 0, 0, 160, + 5, 0, 0, 3, 9, 0, + 7, 128, 9, 0, 228, 128, + 9, 0, 228, 128, 4, 0, + 0, 4, 0, 0, 8, 128, + 10, 0, 0, 128, 6, 0, + 255, 129, 8, 0, 0, 128, + 88, 0, 0, 4, 12, 0, + 1, 128, 14, 0, 255, 128, + 0, 0, 255, 128, 1, 0, + 255, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 13, 0, + 255, 129, 12, 0, 228, 128, + 0, 0, 228, 128, 2, 0, + 0, 3, 10, 0, 7, 128, + 8, 0, 228, 128, 8, 0, + 228, 128, 4, 0, 0, 4, + 12, 0, 7, 128, 4, 0, + 228, 128, 3, 0, 85, 161, + 10, 0, 228, 128, 2, 0, + 0, 3, 12, 0, 7, 128, + 12, 0, 228, 128, 3, 0, + 0, 160, 4, 0, 0, 4, + 15, 0, 7, 128, 4, 0, + 228, 128, 10, 0, 228, 129, + 12, 0, 228, 128, 5, 0, + 0, 3, 10, 0, 7, 128, + 4, 0, 228, 128, 10, 0, + 228, 128, 2, 0, 0, 3, + 16, 0, 7, 128, 4, 0, + 228, 128, 4, 0, 228, 128, + 5, 0, 0, 3, 17, 0, + 7, 128, 8, 0, 228, 128, + 16, 0, 228, 128, 4, 0, + 0, 4, 12, 0, 7, 128, + 16, 0, 228, 128, 8, 0, + 228, 129, 12, 0, 228, 128, + 88, 0, 0, 4, 6, 0, + 7, 128, 6, 0, 228, 128, + 10, 0, 228, 128, 12, 0, + 228, 128, 88, 0, 0, 4, + 5, 0, 6, 128, 5, 0, + 208, 128, 17, 0, 228, 128, + 15, 0, 228, 128, 88, 0, + 0, 4, 5, 0, 1, 128, + 14, 0, 255, 128, 17, 0, + 0, 128, 15, 0, 0, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 13, 0, 170, 129, + 5, 0, 228, 128, 0, 0, + 228, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 4, 0, + 0, 128, 4, 0, 0, 4, + 0, 0, 8, 128, 6, 0, + 255, 128, 0, 0, 255, 129, + 3, 0, 0, 161, 11, 0, + 0, 3, 1, 0, 8, 128, + 0, 0, 255, 128, 11, 0, + 170, 161, 5, 0, 0, 3, + 5, 0, 7, 128, 4, 0, + 228, 128, 4, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 8, 128, 5, 0, 0, 129, + 11, 0, 170, 161, 1, 0, + 255, 128, 88, 0, 0, 4, + 10, 0, 1, 128, 9, 0, + 0, 129, 3, 0, 0, 161, + 0, 0, 255, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 4, 0, 85, 128, 4, 0, + 0, 4, 0, 0, 8, 128, + 11, 0, 0, 128, 0, 0, + 255, 129, 3, 0, 0, 161, + 11, 0, 0, 3, 1, 0, + 8, 128, 0, 0, 255, 128, + 11, 0, 170, 161, 88, 0, + 0, 4, 0, 0, 8, 128, + 5, 0, 85, 129, 11, 0, + 170, 161, 1, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 2, 128, 9, 0, 85, 129, + 3, 0, 0, 161, 0, 0, + 255, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 4, 0, + 170, 128, 4, 0, 0, 4, + 0, 0, 8, 128, 11, 0, + 85, 128, 0, 0, 255, 129, + 3, 0, 0, 161, 11, 0, + 0, 3, 1, 0, 8, 128, + 0, 0, 255, 128, 11, 0, + 170, 161, 88, 0, 0, 4, + 0, 0, 8, 128, 5, 0, + 170, 129, 11, 0, 170, 161, + 1, 0, 255, 128, 88, 0, + 0, 4, 10, 0, 4, 128, + 9, 0, 170, 129, 3, 0, + 0, 161, 0, 0, 255, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 13, 0, 85, 129, + 10, 0, 228, 128, 0, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 7, 128, 4, 0, + 228, 128, 3, 0, 0, 160, + 5, 0, 0, 3, 5, 0, + 7, 128, 5, 0, 228, 128, + 5, 0, 228, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 14, 0, 0, 128, 5, 0, + 0, 3, 0, 0, 8, 128, + 0, 0, 255, 128, 8, 0, + 0, 128, 10, 0, 0, 3, + 1, 0, 8, 128, 0, 0, + 255, 128, 3, 0, 0, 161, + 88, 0, 0, 4, 0, 0, + 8, 128, 5, 0, 0, 129, + 3, 0, 0, 161, 1, 0, + 255, 128, 5, 0, 0, 3, + 9, 0, 7, 128, 8, 0, + 228, 128, 8, 0, 228, 128, + 88, 0, 0, 4, 10, 0, + 1, 128, 9, 0, 0, 129, + 11, 0, 170, 161, 0, 0, + 255, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 14, 0, + 85, 128, 6, 0, 0, 2, + 1, 0, 8, 128, 14, 0, + 170, 128, 5, 0, 0, 3, + 1, 0, 8, 128, 1, 0, + 255, 128, 8, 0, 170, 128, + 10, 0, 0, 3, 2, 0, + 8, 128, 1, 0, 255, 128, + 3, 0, 0, 161, 88, 0, + 0, 4, 1, 0, 8, 128, + 5, 0, 170, 129, 3, 0, + 0, 161, 2, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 4, 128, 9, 0, 170, 129, + 11, 0, 170, 161, 1, 0, + 255, 128, 5, 0, 0, 3, + 0, 0, 8, 128, 0, 0, + 255, 128, 8, 0, 85, 128, + 10, 0, 0, 3, 1, 0, + 8, 128, 0, 0, 255, 128, + 3, 0, 0, 161, 88, 0, + 0, 4, 0, 0, 8, 128, + 5, 0, 85, 129, 3, 0, + 0, 161, 1, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 2, 128, 9, 0, 85, 129, + 11, 0, 170, 161, 0, 0, + 255, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 13, 0, + 0, 129, 10, 0, 228, 128, + 0, 0, 228, 128, 2, 0, + 0, 3, 5, 0, 15, 128, + 4, 0, 255, 128, 5, 0, + 228, 160, 5, 0, 0, 3, + 5, 0, 15, 128, 5, 0, + 228, 128, 5, 0, 228, 128, + 11, 0, 0, 3, 9, 0, + 7, 128, 8, 0, 228, 128, + 4, 0, 228, 128, 10, 0, + 0, 3, 10, 0, 7, 128, + 4, 0, 228, 128, 8, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 5, 0, + 255, 129, 9, 0, 228, 128, + 0, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 5, 0, 170, 129, 10, 0, + 228, 128, 0, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 5, 0, 85, 129, + 6, 0, 228, 128, 0, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 5, 0, + 0, 129, 1, 0, 228, 128, + 0, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 2, 0, 170, 161, 2, 0, + 228, 128, 0, 0, 228, 128, + 18, 0, 0, 4, 1, 0, + 7, 128, 7, 0, 255, 128, + 0, 0, 228, 128, 4, 0, + 228, 128, 5, 0, 0, 3, + 0, 0, 7, 128, 3, 0, + 255, 128, 1, 0, 228, 128, + 5, 0, 0, 3, 1, 0, + 1, 128, 3, 0, 255, 128, + 3, 0, 255, 128, 1, 0, + 0, 2, 0, 0, 8, 128, + 3, 0, 255, 128, 88, 0, + 0, 4, 0, 0, 15, 128, + 1, 0, 0, 129, 7, 0, + 228, 128, 0, 0, 228, 128, + 5, 0, 0, 3, 1, 0, + 1, 128, 7, 0, 255, 128, + 7, 0, 255, 128, 88, 0, + 0, 4, 0, 0, 15, 128, + 1, 0, 0, 129, 3, 0, + 228, 128, 0, 0, 228, 128, + 1, 0, 0, 2, 0, 8, + 15, 128, 0, 0, 228, 128, + 255, 255, 0, 0, 83, 72, + 68, 82, 40, 40, 0, 0, + 64, 0, 0, 0, 10, 10, + 0, 0, 89, 0, 0, 4, + 70, 142, 32, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 90, 0, 0, 3, 0, 96, + 16, 0, 0, 0, 0, 0, + 90, 0, 0, 3, 0, 96, + 16, 0, 1, 0, 0, 0, + 88, 24, 0, 4, 0, 112, + 16, 0, 0, 0, 0, 0, + 85, 85, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 1, 0, 0, 0, 85, 85, + 0, 0, 88, 24, 0, 4, + 0, 112, 16, 0, 2, 0, + 0, 0, 85, 85, 0, 0, + 88, 24, 0, 4, 0, 112, + 16, 0, 3, 0, 0, 0, + 85, 85, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 5, 0, 0, 0, 85, 85, + 0, 0, 88, 24, 0, 4, + 0, 112, 16, 0, 6, 0, + 0, 0, 85, 85, 0, 0, + 98, 16, 0, 3, 50, 16, + 16, 0, 1, 0, 0, 0, + 98, 16, 0, 3, 194, 16, + 16, 0, 1, 0, 0, 0, + 98, 16, 0, 3, 114, 16, + 16, 0, 2, 0, 0, 0, + 101, 0, 0, 3, 242, 32, + 16, 0, 0, 0, 0, 0, + 104, 0, 0, 2, 22, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 0, 0, + 0, 0, 230, 26, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 6, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 31, 0, 0, 4, + 26, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 31, 0, 0, 4, 10, 128, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 1, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 114, 0, 16, 0, + 1, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 6, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 54, 0, 0, 6, 130, 0, + 16, 0, 1, 0, 0, 0, + 10, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 18, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 255, 255, + 255, 255, 18, 0, 0, 1, + 32, 0, 0, 8, 34, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 1, 0, + 0, 0, 10, 128, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 31, 0, 4, 3, + 26, 0, 16, 0, 2, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 3, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 0, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 3, 0, 0, 0, 6, 128, + 32, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 54, 0, + 0, 5, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 255, 255, 255, 255, + 18, 0, 0, 1, 32, 0, + 0, 8, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 2, 0, 0, 0, + 10, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 31, 0, 4, 3, 10, 0, + 16, 0, 2, 0, 0, 0, + 69, 0, 0, 9, 242, 0, + 16, 0, 3, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 3, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 34, 0, + 16, 0, 2, 0, 0, 0, + 10, 0, 16, 0, 3, 0, + 0, 0, 1, 64, 0, 0, + 115, 128, 0, 191, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 1, 0, + 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 66, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 18, 131, + 128, 189, 69, 0, 0, 9, + 242, 0, 16, 0, 3, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 2, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 7, + 130, 0, 16, 0, 2, 0, + 0, 0, 10, 0, 16, 0, + 3, 0, 0, 0, 1, 64, + 0, 0, 115, 128, 0, 191, + 56, 0, 0, 10, 50, 0, + 16, 0, 3, 0, 0, 0, + 86, 5, 16, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 182, 74, 204, 63, 205, 30, + 80, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, + 0, 9, 18, 0, 16, 0, + 4, 0, 0, 0, 42, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 103, 10, + 149, 63, 10, 0, 16, 0, + 3, 0, 0, 0, 50, 0, + 0, 10, 34, 0, 16, 0, + 2, 0, 0, 0, 42, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 103, 10, + 149, 63, 26, 0, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 56, 0, 0, 7, + 18, 0, 16, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 76, 26, 1, 64, + 50, 0, 0, 10, 34, 0, + 16, 0, 4, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 196, 148, + 200, 62, 26, 0, 16, 0, + 2, 0, 0, 0, 50, 0, + 0, 9, 66, 0, 16, 0, + 4, 0, 0, 0, 42, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 103, 10, + 149, 63, 10, 0, 16, 0, + 3, 0, 0, 0, 54, 0, + 0, 5, 130, 0, 16, 0, + 4, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 56, 0, 0, 8, 242, 0, + 16, 0, 1, 0, 0, 0, + 70, 14, 16, 0, 4, 0, + 0, 0, 6, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 21, 0, 0, 1, + 21, 0, 0, 1, 21, 0, + 0, 1, 55, 0, 0, 10, + 242, 0, 16, 0, 1, 0, + 0, 0, 6, 0, 16, 0, + 2, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 18, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 255, 255, + 255, 255, 18, 0, 0, 1, + 32, 0, 0, 8, 34, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 1, 0, + 0, 0, 26, 128, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 31, 0, 4, 3, + 26, 0, 16, 0, 2, 0, + 0, 0, 31, 0, 0, 4, + 10, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 69, 0, 0, 9, 242, 0, + 16, 0, 3, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 0, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 56, 0, 0, 8, 114, 0, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 3, 0, + 0, 0, 6, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 16, 16, 0, + 2, 0, 0, 0, 70, 126, + 16, 0, 5, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 54, 0, 0, 6, + 130, 0, 16, 0, 3, 0, + 0, 0, 10, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 56, 0, 0, 7, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 3, 0, 0, 0, 6, 0, + 16, 0, 4, 0, 0, 0, + 54, 0, 0, 5, 34, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 255, 255, + 255, 255, 18, 0, 0, 1, + 32, 0, 0, 8, 66, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 1, 0, + 0, 0, 10, 128, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 31, 0, 4, 3, + 42, 0, 16, 0, 2, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 3, 0, + 0, 0, 70, 16, 16, 0, + 2, 0, 0, 0, 70, 126, + 16, 0, 5, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 0, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 14, 16, 0, + 4, 0, 0, 0, 6, 128, + 32, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 56, 0, + 0, 7, 242, 0, 16, 0, + 1, 0, 0, 0, 6, 0, + 16, 0, 3, 0, 0, 0, + 70, 14, 16, 0, 4, 0, + 0, 0, 54, 0, 0, 5, + 34, 0, 16, 0, 2, 0, + 0, 0, 1, 64, 0, 0, + 255, 255, 255, 255, 18, 0, + 0, 1, 32, 0, 0, 8, + 34, 0, 16, 0, 2, 0, + 0, 0, 1, 64, 0, 0, + 2, 0, 0, 0, 10, 128, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 31, 0, + 4, 3, 26, 0, 16, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 70, 16, + 16, 0, 2, 0, 0, 0, + 70, 126, 16, 0, 5, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 3, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 0, 0, + 0, 7, 66, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 0, 4, 0, 0, 0, + 1, 64, 0, 0, 115, 128, + 0, 191, 69, 0, 0, 9, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 1, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 7, + 130, 0, 16, 0, 2, 0, + 0, 0, 10, 0, 16, 0, + 4, 0, 0, 0, 1, 64, + 0, 0, 18, 131, 128, 189, + 69, 0, 0, 9, 242, 0, + 16, 0, 4, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 2, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 34, 0, + 16, 0, 3, 0, 0, 0, + 10, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 115, 128, 0, 191, 56, 0, + 0, 10, 194, 0, 16, 0, + 3, 0, 0, 0, 166, 10, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 182, 74, 204, 63, 205, 30, + 80, 63, 50, 0, 0, 9, + 18, 0, 16, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 103, 10, 149, 63, + 42, 0, 16, 0, 3, 0, + 0, 0, 50, 0, 0, 10, + 66, 0, 16, 0, 2, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 103, 10, 149, 63, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 56, 0, 0, 7, 66, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 3, 0, + 0, 0, 1, 64, 0, 0, + 76, 26, 1, 64, 50, 0, + 0, 10, 34, 0, 16, 0, + 4, 0, 0, 0, 26, 0, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 1, 64, + 0, 0, 196, 148, 200, 62, + 42, 0, 16, 0, 2, 0, + 0, 0, 50, 0, 0, 9, + 66, 0, 16, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 103, 10, 149, 63, + 42, 0, 16, 0, 3, 0, + 0, 0, 54, 0, 0, 5, + 130, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 8, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 14, + 16, 0, 4, 0, 0, 0, + 6, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 56, 0, 0, 7, 242, 0, + 16, 0, 1, 0, 0, 0, + 6, 0, 16, 0, 3, 0, + 0, 0, 70, 14, 16, 0, + 4, 0, 0, 0, 21, 0, + 0, 1, 21, 0, 0, 1, + 21, 0, 0, 1, 31, 0, + 0, 3, 26, 0, 16, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 70, 16, + 16, 0, 2, 0, 0, 0, + 70, 126, 16, 0, 5, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 242, 0, 16, 0, + 1, 0, 0, 0, 6, 0, + 16, 0, 3, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 21, 0, 0, 1, 54, 0, + 0, 5, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 255, 255, 255, 255, + 18, 0, 0, 1, 32, 0, + 0, 8, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 2, 0, 0, 0, + 26, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 31, 0, 4, 3, 10, 0, + 16, 0, 2, 0, 0, 0, + 14, 0, 0, 7, 98, 0, + 16, 0, 2, 0, 0, 0, + 6, 17, 16, 0, 2, 0, + 0, 0, 166, 26, 16, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 150, 5, + 16, 0, 2, 0, 0, 0, + 70, 126, 16, 0, 5, 0, + 0, 0, 0, 96, 16, 0, + 1, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 14, + 16, 0, 4, 0, 0, 0, + 6, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 56, 0, 0, 7, 242, 0, + 16, 0, 1, 0, 0, 0, + 6, 0, 16, 0, 3, 0, + 0, 0, 70, 14, 16, 0, + 4, 0, 0, 0, 21, 0, + 0, 1, 21, 0, 0, 1, + 21, 0, 0, 1, 55, 0, + 0, 12, 242, 0, 16, 0, + 1, 0, 0, 0, 6, 0, + 16, 0, 2, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 128, 63, 24, 0, + 0, 7, 18, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 31, 0, 4, 3, + 10, 0, 16, 0, 2, 0, + 0, 0, 54, 0, 0, 5, + 242, 32, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 1, 0, 0, 0, 62, 0, + 0, 1, 21, 0, 0, 1, + 24, 0, 0, 7, 18, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 0, 1, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 31, 0, + 4, 3, 10, 0, 16, 0, + 2, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 0, 0, 0, 0, + 62, 0, 0, 1, 21, 0, + 0, 1, 14, 0, 0, 7, + 114, 0, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 246, 15, 16, 0, + 1, 0, 0, 0, 55, 0, + 0, 10, 114, 0, 16, 0, + 1, 0, 0, 0, 246, 143, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 70, 2, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 2, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 114, 0, 16, 0, + 4, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 3, 0, + 0, 0, 29, 0, 0, 10, + 242, 0, 16, 0, 5, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 63, 0, 0, + 0, 63, 0, 0, 0, 63, + 0, 0, 128, 62, 70, 2, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 6, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 6, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 50, 0, 0, 12, 114, 0, + 16, 0, 9, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, + 0, 0, 0, 0, 70, 2, + 16, 0, 6, 0, 0, 0, + 0, 0, 0, 10, 114, 0, + 16, 0, 9, 0, 0, 0, + 70, 2, 16, 0, 9, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 191, 0, 0, + 128, 191, 0, 0, 128, 191, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 10, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 8, 0, + 0, 0, 50, 0, 0, 10, + 114, 0, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 9, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 5, 0, 0, 0, + 70, 2, 16, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 8, 0, 0, 0, + 51, 0, 0, 7, 114, 0, + 16, 0, 7, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 32, 0, + 0, 11, 242, 0, 16, 0, + 8, 0, 0, 0, 2, 64, + 0, 0, 1, 0, 0, 0, + 2, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, + 166, 138, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 52, 0, 0, 7, 114, 0, + 16, 0, 11, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 24, 0, + 0, 10, 242, 0, 16, 0, + 12, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 63, 24, 0, 0, 10, + 242, 0, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 11, 114, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 128, 65, 0, + 0, 0, 1, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 51, 0, 0, 10, 114, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 55, 0, + 0, 12, 114, 0, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 55, 0, + 0, 12, 114, 0, 16, 0, + 12, 0, 0, 0, 70, 2, + 16, 0, 12, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 13, 0, 0, 0, 0, 0, + 0, 11, 114, 0, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 51, 0, + 0, 10, 114, 0, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 0, 0, 0, 11, + 114, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 14, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 55, 0, + 0, 9, 130, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 0, 13, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 14, 0, 0, 0, 55, 0, + 0, 9, 18, 0, 16, 0, + 15, 0, 0, 0, 58, 0, + 16, 0, 12, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 58, 0, 16, 0, + 2, 0, 0, 0, 24, 0, + 0, 10, 146, 0, 16, 0, + 14, 0, 0, 0, 86, 9, + 16, 0, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 63, 24, 0, 0, 10, + 50, 0, 16, 0, 16, 0, + 0, 0, 150, 5, 16, 0, + 1, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 55, 0, 0, 12, 98, 0, + 16, 0, 14, 0, 0, 0, + 6, 1, 16, 0, 16, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 86, 6, + 16, 0, 14, 0, 0, 0, + 55, 0, 0, 12, 98, 0, + 16, 0, 15, 0, 0, 0, + 6, 3, 16, 0, 14, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 86, 6, + 16, 0, 14, 0, 0, 0, + 29, 0, 0, 10, 114, 0, + 16, 0, 14, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 114, 0, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 1, 0, 0, 0, 70, 2, + 16, 0, 6, 0, 0, 0, + 70, 2, 16, 0, 9, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 6, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 10, 0, 0, 0, + 70, 2, 16, 0, 6, 0, + 0, 0, 32, 0, 0, 11, + 242, 0, 16, 0, 9, 0, + 0, 0, 2, 64, 0, 0, + 5, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 166, 138, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 50, 0, + 0, 16, 114, 0, 16, 0, + 10, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 1, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 0, 64, + 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 10, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 10, 0, 0, 0, + 50, 0, 0, 10, 114, 0, + 16, 0, 10, 0, 0, 0, + 70, 2, 16, 128, 65, 0, + 0, 0, 10, 0, 0, 0, + 70, 2, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 50, 0, + 0, 15, 114, 0, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 64, 0, 0, 0, 64, + 0, 0, 0, 64, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 191, 0, 0, + 128, 191, 0, 0, 128, 191, + 0, 0, 0, 0, 50, 0, + 0, 15, 114, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 65, 0, 0, 128, 65, + 0, 0, 128, 65, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 64, 193, 0, 0, + 64, 193, 0, 0, 64, 193, + 0, 0, 0, 0, 50, 0, + 0, 12, 114, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 64, 0, 0, + 128, 64, 0, 0, 128, 64, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 75, 0, 0, 5, + 114, 0, 16, 0, 17, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 130, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 0, 5, 0, 0, 0, + 10, 0, 16, 0, 16, 0, + 0, 0, 10, 0, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 50, 0, 0, 9, 130, 0, + 16, 0, 2, 0, 0, 0, + 10, 0, 16, 0, 13, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 18, 0, + 16, 0, 18, 0, 0, 0, + 10, 0, 16, 0, 14, 0, + 0, 0, 10, 0, 16, 0, + 10, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 29, 0, 0, 10, 146, 0, + 16, 0, 10, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 62, 86, 9, 16, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 146, 0, 16, 0, + 10, 0, 0, 0, 6, 12, + 16, 0, 10, 0, 0, 0, + 86, 9, 16, 0, 16, 0, + 0, 0, 86, 9, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 146, 0, 16, 0, + 10, 0, 0, 0, 86, 9, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 6, 12, + 16, 0, 10, 0, 0, 0, + 50, 0, 0, 9, 146, 0, + 16, 0, 10, 0, 0, 0, + 86, 9, 16, 0, 13, 0, + 0, 0, 6, 12, 16, 0, + 10, 0, 0, 0, 86, 9, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 98, 0, + 16, 0, 18, 0, 0, 0, + 86, 6, 16, 0, 14, 0, + 0, 0, 86, 6, 16, 0, + 10, 0, 0, 0, 6, 3, + 16, 0, 10, 0, 0, 0, + 0, 0, 0, 8, 114, 0, + 16, 0, 10, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 1, 0, + 0, 0, 50, 0, 0, 13, + 114, 0, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, + 0, 0, 0, 0, 70, 2, + 16, 0, 3, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 2, 0, 0, 0, + 26, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 2, 0, 0, 0, 42, 0, + 16, 0, 0, 0, 0, 0, + 58, 0, 16, 0, 2, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 3, 0, + 0, 0, 26, 0, 16, 0, + 0, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 42, 0, 16, 0, 0, 0, + 0, 0, 58, 0, 16, 0, + 3, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 13, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 29, 0, 0, 7, 130, 0, + 16, 0, 2, 0, 0, 0, + 26, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 31, 0, + 4, 3, 58, 0, 16, 0, + 2, 0, 0, 0, 49, 0, + 0, 7, 114, 0, 16, 0, + 14, 0, 0, 0, 6, 2, + 16, 0, 1, 0, 0, 0, + 102, 9, 16, 0, 1, 0, + 0, 0, 0, 0, 0, 8, + 242, 0, 16, 0, 16, 0, + 0, 0, 6, 10, 16, 128, + 65, 0, 0, 0, 1, 0, + 0, 0, 150, 4, 16, 0, + 1, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 0, 13, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 22, 7, + 16, 0, 16, 0, 0, 0, + 1, 0, 0, 7, 98, 0, + 16, 0, 16, 0, 0, 0, + 6, 3, 16, 0, 13, 0, + 0, 0, 6, 0, 16, 0, + 14, 0, 0, 0, 29, 0, + 0, 7, 146, 0, 16, 0, + 14, 0, 0, 0, 166, 10, + 16, 0, 1, 0, 0, 0, + 86, 1, 16, 0, 1, 0, + 0, 0, 1, 0, 0, 7, + 98, 0, 16, 0, 17, 0, + 0, 0, 246, 13, 16, 0, + 13, 0, 0, 0, 86, 5, + 16, 0, 14, 0, 0, 0, + 1, 0, 0, 7, 50, 0, + 16, 0, 19, 0, 0, 0, + 230, 10, 16, 0, 13, 0, + 0, 0, 166, 10, 16, 0, + 14, 0, 0, 0, 54, 0, + 0, 5, 18, 0, 16, 0, + 17, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 66, 0, + 16, 0, 19, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 226, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 0, + 14, 0, 0, 0, 6, 9, + 16, 0, 17, 0, 0, 0, + 6, 9, 16, 0, 19, 0, + 0, 0, 54, 0, 0, 5, + 18, 0, 16, 0, 16, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 14, 0, 0, 0, 6, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 150, 7, 16, 0, + 14, 0, 0, 0, 18, 0, + 0, 1, 49, 0, 0, 7, + 114, 0, 16, 0, 16, 0, + 0, 0, 86, 6, 16, 0, + 1, 0, 0, 0, 38, 8, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 17, 0, 0, 0, + 86, 10, 16, 128, 65, 0, + 0, 0, 1, 0, 0, 0, + 134, 1, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 19, 0, + 0, 0, 246, 15, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 13, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 22, 7, 16, 0, + 17, 0, 0, 0, 1, 0, + 0, 7, 82, 0, 16, 0, + 17, 0, 0, 0, 6, 3, + 16, 0, 13, 0, 0, 0, + 6, 0, 16, 0, 16, 0, + 0, 0, 29, 0, 0, 7, + 146, 0, 16, 0, 16, 0, + 0, 0, 166, 10, 16, 0, + 1, 0, 0, 0, 6, 4, + 16, 0, 1, 0, 0, 0, + 1, 0, 0, 7, 82, 0, + 16, 0, 19, 0, 0, 0, + 246, 13, 16, 0, 13, 0, + 0, 0, 86, 5, 16, 0, + 16, 0, 0, 0, 1, 0, + 0, 7, 50, 0, 16, 0, + 13, 0, 0, 0, 182, 15, + 16, 0, 13, 0, 0, 0, + 166, 10, 16, 0, 16, 0, + 0, 0, 54, 0, 0, 5, + 34, 0, 16, 0, 19, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 66, 0, 16, 0, + 13, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 13, 0, 0, 0, + 246, 15, 16, 0, 16, 0, + 0, 0, 70, 2, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 54, 0, 0, 5, 34, 0, + 16, 0, 17, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 14, 0, + 0, 0, 6, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 13, 0, + 0, 0, 21, 0, 0, 1, + 16, 0, 0, 10, 130, 0, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 154, 153, + 153, 62, 61, 10, 23, 63, + 174, 71, 225, 61, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 16, 0, + 0, 10, 130, 0, 16, 0, + 3, 0, 0, 0, 2, 64, + 0, 0, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 13, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 16, 0, 0, 10, + 130, 0, 16, 0, 3, 0, + 0, 0, 2, 64, 0, 0, + 154, 153, 153, 62, 61, 10, + 23, 63, 174, 71, 225, 61, + 0, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 26, 0, 16, 0, 13, 0, + 0, 0, 10, 0, 16, 0, + 13, 0, 0, 0, 51, 0, + 0, 7, 130, 0, 16, 0, + 4, 0, 0, 0, 42, 0, + 16, 0, 13, 0, 0, 0, + 58, 0, 16, 0, 4, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 26, 0, 16, 0, + 13, 0, 0, 0, 10, 0, + 16, 0, 13, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 5, 0, 0, 0, + 42, 0, 16, 0, 13, 0, + 0, 0, 58, 0, 16, 0, + 5, 0, 0, 0, 49, 0, + 0, 7, 130, 0, 16, 0, + 6, 0, 0, 0, 58, 0, + 16, 0, 4, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 114, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 13, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 14, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 3, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 4, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 246, 15, 16, 0, 4, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 13, 0, 0, 0, + 246, 15, 16, 0, 6, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 58, 0, 16, 0, + 5, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 14, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 6, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 5, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 58, 0, 16, 0, 5, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 246, 15, + 16, 0, 5, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 14, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 13, 0, 0, 0, 246, 15, + 16, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 0, + 13, 0, 0, 0, 32, 0, + 0, 11, 242, 0, 16, 0, + 14, 0, 0, 0, 2, 64, + 0, 0, 9, 0, 0, 0, + 10, 0, 0, 0, 11, 0, + 0, 0, 12, 0, 0, 0, + 166, 138, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 3, 0, 0, 0, 42, 0, + 16, 0, 1, 0, 0, 0, + 58, 0, 16, 0, 3, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 26, 0, 16, 0, + 1, 0, 0, 0, 10, 0, + 16, 0, 1, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 42, 0, 16, 0, 1, 0, + 0, 0, 58, 0, 16, 0, + 4, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 16, 0, 0, 0, 58, 0, + 16, 0, 3, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 4, 0, 0, 0, + 29, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 31, 0, + 4, 3, 58, 0, 16, 0, + 3, 0, 0, 0, 49, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 6, 2, + 16, 0, 0, 0, 0, 0, + 102, 9, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 242, 0, 16, 0, 19, 0, + 0, 0, 6, 10, 16, 128, + 65, 0, 0, 0, 0, 0, + 0, 0, 150, 4, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 16, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 22, 7, + 16, 0, 19, 0, 0, 0, + 1, 0, 0, 7, 98, 0, + 16, 0, 19, 0, 0, 0, + 6, 3, 16, 0, 16, 0, + 0, 0, 6, 0, 16, 0, + 17, 0, 0, 0, 29, 0, + 0, 7, 146, 0, 16, 0, + 17, 0, 0, 0, 166, 10, + 16, 0, 0, 0, 0, 0, + 86, 1, 16, 0, 0, 0, + 0, 0, 1, 0, 0, 7, + 98, 0, 16, 0, 20, 0, + 0, 0, 246, 13, 16, 0, + 16, 0, 0, 0, 86, 5, + 16, 0, 17, 0, 0, 0, + 1, 0, 0, 7, 50, 0, + 16, 0, 21, 0, 0, 0, + 230, 10, 16, 0, 16, 0, + 0, 0, 166, 10, 16, 0, + 17, 0, 0, 0, 54, 0, + 0, 5, 18, 0, 16, 0, + 20, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 66, 0, + 16, 0, 21, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 226, 0, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 17, 0, 0, 0, 6, 9, + 16, 0, 20, 0, 0, 0, + 6, 9, 16, 0, 21, 0, + 0, 0, 54, 0, 0, 5, + 18, 0, 16, 0, 19, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 17, 0, 0, 0, 6, 0, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 150, 7, 16, 0, + 17, 0, 0, 0, 18, 0, + 0, 1, 49, 0, 0, 7, + 114, 0, 16, 0, 19, 0, + 0, 0, 86, 6, 16, 0, + 0, 0, 0, 0, 38, 8, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 20, 0, 0, 0, + 86, 10, 16, 128, 65, 0, + 0, 0, 0, 0, 0, 0, + 134, 1, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 21, 0, + 0, 0, 246, 15, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 21, 0, + 0, 0, 22, 7, 16, 0, + 20, 0, 0, 0, 1, 0, + 0, 7, 82, 0, 16, 0, + 20, 0, 0, 0, 6, 3, + 16, 0, 16, 0, 0, 0, + 6, 0, 16, 0, 19, 0, + 0, 0, 29, 0, 0, 7, + 146, 0, 16, 0, 19, 0, + 0, 0, 166, 10, 16, 0, + 0, 0, 0, 0, 6, 4, + 16, 0, 0, 0, 0, 0, + 1, 0, 0, 7, 82, 0, + 16, 0, 21, 0, 0, 0, + 246, 13, 16, 0, 16, 0, + 0, 0, 86, 5, 16, 0, + 19, 0, 0, 0, 1, 0, + 0, 7, 50, 0, 16, 0, + 16, 0, 0, 0, 182, 15, + 16, 0, 16, 0, 0, 0, + 166, 10, 16, 0, 19, 0, + 0, 0, 54, 0, 0, 5, + 34, 0, 16, 0, 21, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 66, 0, 16, 0, + 16, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 16, 0, 0, 0, + 246, 15, 16, 0, 19, 0, + 0, 0, 70, 2, 16, 0, + 21, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 54, 0, 0, 5, 34, 0, + 16, 0, 20, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 17, 0, + 0, 0, 6, 0, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 21, 0, 0, 1, + 16, 0, 0, 10, 130, 0, + 16, 0, 3, 0, 0, 0, + 2, 64, 0, 0, 154, 153, + 153, 62, 61, 10, 23, 63, + 174, 71, 225, 61, 0, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 3, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 16, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 16, 0, + 0, 10, 130, 0, 16, 0, + 3, 0, 0, 0, 2, 64, + 0, 0, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 26, 0, 16, 0, + 16, 0, 0, 0, 10, 0, + 16, 0, 16, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 42, 0, 16, 0, 16, 0, + 0, 0, 58, 0, 16, 0, + 4, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 5, 0, 0, 0, 26, 0, + 16, 0, 16, 0, 0, 0, + 10, 0, 16, 0, 16, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 42, 0, 16, 0, + 16, 0, 0, 0, 58, 0, + 16, 0, 5, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 6, 0, 0, 0, + 58, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 56, 0, 0, 7, 114, 0, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 4, 0, 0, 0, 58, 0, + 16, 0, 3, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 4, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 4, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 16, 0, + 0, 0, 246, 15, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 49, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 58, 0, + 16, 0, 5, 0, 0, 0, + 0, 0, 0, 8, 114, 0, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 6, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 0, 6, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 5, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 5, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 0, 5, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 16, 0, 0, 0, + 246, 15, 16, 0, 4, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 16, 0, 0, 10, 130, 0, + 16, 0, 3, 0, 0, 0, + 2, 64, 0, 0, 154, 153, + 153, 62, 61, 10, 23, 63, + 174, 71, 225, 61, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 4, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 246, 15, 16, 0, + 4, 0, 0, 0, 16, 0, + 0, 10, 130, 0, 16, 0, + 4, 0, 0, 0, 2, 64, + 0, 0, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 26, 0, 16, 0, + 17, 0, 0, 0, 10, 0, + 16, 0, 17, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 5, 0, 0, 0, + 42, 0, 16, 0, 17, 0, + 0, 0, 58, 0, 16, 0, + 5, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 6, 0, 0, 0, 26, 0, + 16, 0, 17, 0, 0, 0, + 10, 0, 16, 0, 17, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 6, 0, + 0, 0, 42, 0, 16, 0, + 17, 0, 0, 0, 58, 0, + 16, 0, 6, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 7, 0, 0, 0, + 58, 0, 16, 0, 5, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 19, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 56, 0, 0, 7, 114, 0, + 16, 0, 19, 0, 0, 0, + 246, 15, 16, 0, 4, 0, + 0, 0, 70, 2, 16, 0, + 19, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 5, 0, 0, 0, 58, 0, + 16, 0, 4, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 5, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 19, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 246, 15, 16, 0, + 5, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 19, 0, 0, 0, 246, 15, + 16, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 49, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 58, 0, + 16, 0, 6, 0, 0, 0, + 0, 0, 0, 8, 114, 0, + 16, 0, 19, 0, 0, 0, + 246, 15, 16, 128, 65, 0, + 0, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 7, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 7, 114, 0, 16, 0, + 19, 0, 0, 0, 246, 15, + 16, 0, 7, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 6, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 6, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, + 246, 15, 16, 0, 6, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 19, 0, + 0, 0, 246, 15, 16, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 32, 0, 0, 11, 50, 0, + 16, 0, 19, 0, 0, 0, + 2, 64, 0, 0, 13, 0, + 0, 0, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 166, 138, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 2, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 2, 0, + 0, 0, 58, 0, 16, 0, + 3, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 2, 0, + 0, 0, 16, 0, 0, 10, + 130, 0, 16, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 154, 153, 153, 62, 61, 10, + 23, 63, 174, 71, 225, 61, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 51, 0, + 0, 7, 130, 0, 16, 0, + 3, 0, 0, 0, 42, 0, + 16, 0, 0, 0, 0, 0, + 58, 0, 16, 0, 3, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 26, 0, 16, 0, + 0, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 42, 0, 16, 0, 0, 0, + 0, 0, 58, 0, 16, 0, + 4, 0, 0, 0, 49, 0, + 0, 7, 130, 0, 16, 0, + 5, 0, 0, 0, 58, 0, + 16, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 114, 0, 16, 0, 20, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 2, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 20, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 20, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 20, 0, + 0, 0, 246, 15, 16, 0, + 2, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 58, 0, 16, 0, + 4, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 2, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 5, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 114, 0, 16, 0, 20, 0, + 0, 0, 246, 15, 16, 0, + 5, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 4, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 2, 0, 0, 0, + 58, 0, 16, 0, 4, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 20, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 0, 4, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 20, 0, 0, 0, + 246, 15, 16, 0, 2, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 20, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 19, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 246, 15, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 166, 10, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 86, 5, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 10, + 114, 0, 16, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 128, 129, 0, 0, 0, + 10, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 18, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 166, 10, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 15, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 6, 0, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 12, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 11, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 166, 10, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 5, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 6, 0, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 10, 114, 0, + 16, 0, 0, 0, 0, 0, + 166, 138, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 2, 0, 0, 0, 0, 0, + 0, 8, 18, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 56, 0, 0, 7, 114, 0, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 246, 15, 16, 0, + 0, 0, 0, 0, 50, 0, + 0, 9, 114, 0, 16, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 32, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 54, 0, 0, 5, + 130, 32, 16, 0, 0, 0, + 0, 0, 58, 0, 16, 0, + 1, 0, 0, 0, 62, 0, + 0, 1, 83, 84, 65, 84, + 116, 0, 0, 0, 89, 1, + 0, 0, 22, 0, 0, 0, + 0, 0, 0, 0, 4, 0, + 0, 0, 196, 0, 0, 0, + 10, 0, 0, 0, 13, 0, + 0, 0, 14, 0, 0, 0, + 11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 25, 0, 0, 0, + 45, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 82, 68, 69, 70, 168, 3, + 0, 0, 1, 0, 0, 0, + 136, 1, 0, 0, 9, 0, + 0, 0, 28, 0, 0, 0, + 0, 4, 255, 255, 0, 1, + 0, 0, 116, 3, 0, 0, + 60, 1, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 1, 0, + 0, 0, 69, 1, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 95, 1, + 0, 0, 2, 0, 0, 0, + 5, 0, 0, 0, 4, 0, + 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, + 100, 1, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 1, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 103, 1, 0, 0, + 2, 0, 0, 0, 5, 0, + 0, 0, 4, 0, 0, 0, + 255, 255, 255, 255, 2, 0, + 0, 0, 1, 0, 0, 0, + 13, 0, 0, 0, 107, 1, + 0, 0, 2, 0, 0, 0, + 5, 0, 0, 0, 4, 0, + 0, 0, 255, 255, 255, 255, + 3, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, + 111, 1, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 5, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 117, 1, 0, 0, + 2, 0, 0, 0, 5, 0, + 0, 0, 4, 0, 0, 0, + 255, 255, 255, 255, 6, 0, + 0, 0, 1, 0, 0, 0, + 13, 0, 0, 0, 127, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 115, 83, 97, 109, 112, 108, + 101, 114, 0, 76, 97, 121, + 101, 114, 84, 101, 120, 116, + 117, 114, 101, 83, 97, 109, + 112, 108, 101, 114, 76, 105, + 110, 101, 97, 114, 0, 116, + 82, 71, 66, 0, 116, 89, + 0, 116, 67, 98, 0, 116, + 67, 114, 0, 116, 77, 97, + 115, 107, 0, 116, 66, 97, + 99, 107, 100, 114, 111, 112, + 0, 36, 71, 108, 111, 98, + 97, 108, 115, 0, 127, 1, + 0, 0, 10, 0, 0, 0, + 160, 1, 0, 0, 48, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 144, 2, + 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 156, 2, 0, 0, + 0, 0, 0, 0, 172, 2, + 0, 0, 16, 0, 0, 0, + 4, 0, 0, 0, 2, 0, + 0, 0, 188, 2, 0, 0, + 0, 0, 0, 0, 204, 2, + 0, 0, 32, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 220, 2, 0, 0, + 0, 0, 0, 0, 236, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 252, 2, 0, 0, + 0, 0, 0, 0, 12, 3, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 252, 2, 0, 0, + 0, 0, 0, 0, 24, 3, + 0, 0, 176, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 156, 2, 0, 0, + 0, 0, 0, 0, 44, 3, + 0, 0, 192, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 60, 3, 0, 0, + 0, 0, 0, 0, 76, 3, + 0, 0, 208, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 60, 3, 0, 0, + 0, 0, 0, 0, 87, 3, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 60, 3, 0, 0, + 0, 0, 0, 0, 97, 3, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 252, 2, 0, 0, + 0, 0, 0, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 102, 76, 97, 121, + 101, 114, 79, 112, 97, 99, + 105, 116, 121, 0, 171, 171, + 0, 0, 3, 0, 1, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 128, 0, 0, 0, 4, 0, + 0, 0, 8, 0, 0, 0, + 104, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 56, 0, 0, 0, 1, 0, + 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171 + 0, 0, 3, 3, 0, 0, + 116, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 12, 12, 0, 0, + 116, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 7, 7, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 79, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 83, 86, + 95, 84, 97, 114, 103, 101, + 116, 0, 171, 171 }; -ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(ComponentAlphaShaderMask) }; +ShaderBytes sBlendShader = { BlendShader, sizeof(BlendShader) }; diff --git a/gfx/layers/d3d11/genshaders.sh b/gfx/layers/d3d11/genshaders.sh index 170d70ad53..230da9b529 100755 --- a/gfx/layers/d3d11/genshaders.sh +++ b/gfx/layers/d3d11/genshaders.sh @@ -33,7 +33,6 @@ makeShaderVS LayerQuadVS makeShaderPS SolidColorShader makeShaderPS RGBShader makeShaderPS RGBAShader -makeShaderPS RGBAShaderPremul makeShaderPS ComponentAlphaShader makeShaderPS YCbCrShader makeShaderVS LayerQuadMaskVS @@ -41,12 +40,16 @@ makeShaderVS LayerQuadMask3DVS makeShaderPS SolidColorShaderMask makeShaderPS RGBShaderMask makeShaderPS RGBAShaderMask -makeShaderPS RGBAShaderMaskPremul makeShaderPS RGBAShaderMask3D -makeShaderPS RGBAShaderMask3DPremul makeShaderPS YCbCrShaderMask makeShaderPS ComponentAlphaShaderMask +# Mix-blend shaders +makeShaderVS LayerQuadBlendVS +makeShaderVS LayerQuadBlendMaskVS +makeShaderVS LayerQuadBlendMask3DVS +makeShaderPS BlendShader + SRC=CompositorD3D11VR.hlsl DEST=CompositorD3D11ShadersVR.h diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 2ca7da8aaa..f52ad672bb 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -420,9 +420,25 @@ CompositorOGL::Initialize() } } + reporter.SetSuccessful(); return true; } +/* + * Returns a size that is equal to, or larger than and closest to, + * aSize where both width and height are powers of two. + * If the OpenGL setup is capable of using non-POT textures, + * then it will just return aSize. + */ +static IntSize +CalculatePOTSize(const IntSize& aSize, GLContext* gl) +{ + if (CanUploadNonPowerOfTwo(gl)) + return aSize; + + return IntSize(NextPowerOfTwo(aSize.width), NextPowerOfTwo(aSize.height)); +} + // |aRect| is the rectangle we want to draw to. We will draw it with // up to 4 draw commands if necessary to avoid wrapping. // |aTexCoordRect| is the rectangle from the texture that we want to @@ -435,10 +451,26 @@ CompositorOGL::BindAndDrawQuadWithTextureRect(ShaderProgramOGL *aProg, const Rect& aTexCoordRect, TextureSource *aTexture) { + Rect scaledTexCoordRect = aTexCoordRect; + + // If the OpenGL setup does not support non-power-of-two textures then the + // texture's width and height will have been increased to the next + // power-of-two (unless already a power of two). In that case we must scale + // the texture coordinates to account for that. + if (!CanUploadNonPowerOfTwo(mGLContext)) { + const IntSize& textureSize = aTexture->GetSize(); + const IntSize potSize = CalculatePOTSize(textureSize, mGLContext); + if (potSize != textureSize) { + const float xScale = (float)textureSize.width / (float)potSize.width; + const float yScale = (float)textureSize.height / (float)potSize.height; + scaledTexCoordRect.Scale(xScale, yScale); + } + } + Rect layerRects[4]; Rect textureRects[4]; size_t rects = DecomposeIntoNoRepeatRects(aRect, - aTexCoordRect, + scaledTexCoordRect, &layerRects, &textureRects); @@ -581,21 +613,6 @@ GetFrameBufferInternalFormat(GLContext* gl, return LOCAL_GL_RGBA; } -/* - * Returns a size that is larger than and closest to aSize where both - * width and height are powers of two. - * If the OpenGL setup is capable of using non-POT textures, then it - * will just return aSize. - */ -static IntSize -CalculatePOTSize(const IntSize& aSize, GLContext* gl) -{ - if (CanUploadNonPowerOfTwo(gl)) - return aSize; - - return IntSize(NextPowerOfTwo(aSize.width), NextPowerOfTwo(aSize.height)); -} - void CompositorOGL::ClearRect(const gfx::Rect& aRect) { @@ -1107,10 +1124,11 @@ CompositorOGL::DrawQuad(const Rect& aRect, } if (BlendOpIsMixBlendMode(blendMode)) { - gfx::Matrix4x4 transform; - gfx::IntRect rect = ComputeBackdropCopyRect(aRect, aClipRect, aTransform, &transform); + gfx::Matrix4x4 backdropTransform; + gfx::IntRect rect = ComputeBackdropCopyRect(aRect, aClipRect, aTransform, &backdropTransform); + mixBlendBackdrop = CreateTexture(rect, true, mCurrentRenderTarget->GetFBO()); - program->SetBackdropTransform(transform); + program->SetBackdropTransform(backdropTransform); } program->SetRenderOffset(offset.x, offset.y); diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 77e412aaf2..b35744f542 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -203,6 +203,8 @@ private: DECL_GFX_PREF(Live, "dom.w3c_touch_events.enabled", TouchEventsEnabled, int32_t, 0); DECL_GFX_PREF(Live, "general.smoothScroll", SmoothScrollEnabled, bool, true); + DECL_GFX_PREF(Live, "general.smoothScroll.currentVelocityWeighting", + SmoothScrollCurrentVelocityWeighting, float, 0.25); DECL_GFX_PREF(Live, "general.smoothScroll.durationToIntervalRatio", SmoothScrollDurationToIntervalRatio, int32_t, 200); DECL_GFX_PREF(Live, "general.smoothScroll.mouseWheel", WheelSmoothScrollEnabled, bool, true); @@ -210,6 +212,18 @@ private: WheelSmoothScrollMaxDurationMs, int32_t, 400); DECL_GFX_PREF(Live, "general.smoothScroll.mouseWheel.durationMinMS", WheelSmoothScrollMinDurationMs, int32_t, 200); + DECL_GFX_PREF(Live, "general.smoothScroll.pages", PageSmoothScrollEnabled, bool, true); + DECL_GFX_PREF(Live, "general.smoothScroll.pages.durationMaxMS", + PageSmoothScrollMaxDurationMs, int32_t, 150); + DECL_GFX_PREF(Live, "general.smoothScroll.pages.durationMinMS", + PageSmoothScrollMinDurationMs, int32_t, 150); + DECL_GFX_PREF(Live, "general.smoothScroll.pixels", PixelSmoothScrollEnabled, bool, true); + DECL_GFX_PREF(Live, "general.smoothScroll.pixels.durationMaxMS", + PixelSmoothScrollMaxDurationMs, int32_t, 150); + DECL_GFX_PREF(Live, "general.smoothScroll.pixels.durationMinMS", + PixelSmoothScrollMinDurationMs, int32_t, 150); + DECL_GFX_PREF(Live, "general.smoothScroll.stopDecelerationWeighting", + SmoothScrollStopDecelerationWeighting, float, 0.4f); DECL_GFX_PREF(Once, "gfx.android.rgb16.force", AndroidRGB16Force, bool, false); #if defined(ANDROID) @@ -251,6 +265,7 @@ private: // The maximums here are quite conservative, we can tighten them if problems show up. DECL_GFX_PREF(Once, "gfx.max-alloc-size", MaxAllocSize, int32_t, (int32_t)500000000); DECL_GFX_PREF(Once, "gfx.max-texture-size", MaxTextureSize, int32_t, (int32_t)32767); + DECL_GFX_PREF(Live, "gfx.partialpresent.force", PartialPresent, int32_t, 0); DECL_GFX_PREF(Live, "gfx.perf-warnings.enabled", PerfWarnings, bool, false); DECL_GFX_PREF(Live, "gfx.SurfaceTexture.detach.enabled", SurfaceTextureDetachEnabled, bool, true); DECL_GFX_PREF(Live, "gfx.testing.device-reset", DeviceResetForTesting, int32_t, 0); diff --git a/gfx/thebes/gfxUtils.h b/gfx/thebes/gfxUtils.h index eb47fd3db7..3665e41f39 100644 --- a/gfx/thebes/gfxUtils.h +++ b/gfx/thebes/gfxUtils.h @@ -331,8 +331,8 @@ IsPowerOfTwo(int aNumber) } /** - * Returns the first integer greater than |aNumber| which is a power of two - * Undefined for |aNumber| < 0 + * Returns the first integer greater than or equal to |aNumber| which is a + * power of two. Undefined for |aNumber| < 0. */ static inline int NextPowerOfTwo(int aNumber) diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h index 5f8a235352..30a8f646cd 100644 --- a/js/src/gc/Heap.h +++ b/js/src/gc/Heap.h @@ -744,6 +744,7 @@ struct Arena private: static JS_FRIEND_DATA(const uint32_t) ThingSizes[]; static JS_FRIEND_DATA(const uint32_t) FirstThingOffsets[]; + static const uint32_t ThingsPerArena[]; public: static void staticAsserts(); @@ -756,17 +757,12 @@ struct Arena return FirstThingOffsets[size_t(kind)]; } - static size_t thingsPerArena(size_t thingSize) { - MOZ_ASSERT(thingSize % CellSize == 0); - - /* We should be able to fit FreeSpan in any GC thing. */ - MOZ_ASSERT(thingSize >= sizeof(FreeSpan)); - - return (ArenaSize - sizeof(ArenaHeader)) / thingSize; + static size_t thingsPerArena(AllocKind kind) { + return ThingsPerArena[size_t(kind)]; } - static size_t thingsSpan(size_t thingSize) { - return thingsPerArena(thingSize) * thingSize; + static size_t thingsSpan(AllocKind kind) { + return thingsPerArena(kind) * thingSize(kind); } static bool isAligned(uintptr_t thing, size_t thingSize) { diff --git a/js/src/jit-test/tests/debug/Debugger-findObjects-11.js b/js/src/jit-test/tests/debug/Debugger-findObjects-11.js new file mode 100644 index 0000000000..f0330447f0 --- /dev/null +++ b/js/src/jit-test/tests/debug/Debugger-findObjects-11.js @@ -0,0 +1,7 @@ +// This shouldn't segfault. + +var g = newGlobal(); +g.eval(`function f() { return function() { + function g() {} +}; }`); +new Debugger(g).findObjects(); diff --git a/js/src/jit-test/tests/modules/bug-1245518.js b/js/src/jit-test/tests/modules/bug-1245518.js new file mode 100644 index 0000000000..3ba79645b7 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1245518.js @@ -0,0 +1,15 @@ +evalInFrame = function(global) { + dbgGlobal = newGlobal(); + dbg = new dbgGlobal.Debugger(); + return function(upCount, code) { + dbg.addDebuggee(global); + frame = dbg.getNewestFrame().older; + frame.eval(code); + } +}(this); +m = parseModule(` + function g() this.hours = 0; + evalInFrame.call(0, 0, "g()") +`); +m.declarationInstantiation(); +m.evaluation(); diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 73b32357c0..dd686f37e6 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -1401,6 +1401,30 @@ JSFunction::infallibleIsDefaultClassConstructor(JSContext* cx) const return isDefault; } +bool +JSFunction::isDerivedClassConstructor() +{ + bool derived; + if (isInterpretedLazy()) { + // There is only one plausible lazy self-hosted derived + // constructor. + if (isSelfHostedBuiltin()) { + JSAtom* name = &getExtendedSlot(LAZY_FUNCTION_NAME_SLOT).toString()->asAtom(); + + // This function is called from places without access to a + // JSContext. Trace some plumbing to get what we want. + derived = name == compartment()->runtimeFromAnyThread()-> + commonNames->DefaultDerivedClassConstructor; + } else { + derived = lazyScript()->isDerivedClassConstructor(); + } + } else { + derived = nonLazyScript()->isDerivedClassConstructor(); + } + MOZ_ASSERT_IF(derived, isClassConstructor()); + return derived; +} + bool JSFunction::getLength(JSContext* cx, uint16_t* length) { diff --git a/js/src/jsfun.h b/js/src/jsfun.h index 0f9d4c00e7..8c6526cd85 100644 --- a/js/src/jsfun.h +++ b/js/src/jsfun.h @@ -551,15 +551,7 @@ class JSFunction : public js::NativeObject u.n.jitinfo = data; } - bool isDerivedClassConstructor() { - bool derived; - if (isInterpretedLazy()) - derived = lazyScript()->isDerivedClassConstructor(); - else - derived = nonLazyScript()->isDerivedClassConstructor(); - MOZ_ASSERT_IF(derived, isClassConstructor()); - return derived; - } + bool isDerivedClassConstructor(); static unsigned offsetOfNativeOrScript() { static_assert(offsetof(U, n.native) == offsetof(U, i.s.script_), diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index a3fb0691a7..b3d89927ca 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -261,14 +261,20 @@ const AllocKind gc::slotsToThingKind[] = { static_assert(JS_ARRAY_LENGTH(slotsToThingKind) == SLOTS_TO_THING_KIND_LIMIT, "We have defined a slot count for each kind."); -// Assert that SortedArenaList::MinThingSize is <= the real minimum thing size. -#define CHECK_MIN_THING_SIZE_INNER(x_) \ +// Assert that SortedArenaList::MinThingSize and sizeof(FreeSpan) are <= the +// real minimum thing size. Also assert each size is a multiple of CellSize. +#define CHECK_THING_SIZE_INNER(x_) \ static_assert(x_ >= SortedArenaList::MinThingSize, \ - #x_ " is less than SortedArenaList::MinThingSize!"); -#define CHECK_MIN_THING_SIZE(...) { __VA_ARGS__ }; /* Define the array. */ \ - MOZ_FOR_EACH(CHECK_MIN_THING_SIZE_INNER, (), (__VA_ARGS__ UINT32_MAX)) + #x_ " is less than SortedArenaList::MinThingSize!"); \ + static_assert(x_ >= sizeof(FreeSpan), \ + #x_ " is less than sizeof(FreeSpan)"); \ + static_assert(x_ % CellSize == 0, \ + #x_ " not a multiple of CellSize"); -const uint32_t Arena::ThingSizes[] = CHECK_MIN_THING_SIZE( +#define CHECK_THING_SIZE(...) { __VA_ARGS__ }; /* Define the array. */ \ + MOZ_FOR_EACH(CHECK_THING_SIZE_INNER, (), (__VA_ARGS__ 0x20)) + +const uint32_t Arena::ThingSizes[] = CHECK_THING_SIZE( sizeof(JSFunction), /* AllocKind::FUNCTION */ sizeof(FunctionExtended), /* AllocKind::FUNCTION_EXTENDED */ sizeof(JSObject_Slots0), /* AllocKind::OBJECT0 */ @@ -296,8 +302,8 @@ const uint32_t Arena::ThingSizes[] = CHECK_MIN_THING_SIZE( sizeof(jit::JitCode), /* AllocKind::JITCODE */ ); -#undef CHECK_MIN_THING_SIZE_INNER -#undef CHECK_MIN_THING_SIZE +#undef CHECK_THING_SIZE_INNER +#undef CHECK_THING_SIZE #define OFFSET(type) uint32_t(sizeof(ArenaHeader) + (ArenaSize - sizeof(ArenaHeader)) % sizeof(type)) @@ -331,6 +337,38 @@ const uint32_t Arena::FirstThingOffsets[] = { #undef OFFSET +#define COUNT(type) uint32_t((ArenaSize - sizeof(ArenaHeader)) / sizeof(type)) + +const uint32_t Arena::ThingsPerArena[] = { + COUNT(JSFunction), /* AllocKind::FUNCTION */ + COUNT(FunctionExtended), /* AllocKind::FUNCTION_EXTENDED */ + COUNT(JSObject_Slots0), /* AllocKind::OBJECT0 */ + COUNT(JSObject_Slots0), /* AllocKind::OBJECT0_BACKGROUND */ + COUNT(JSObject_Slots2), /* AllocKind::OBJECT2 */ + COUNT(JSObject_Slots2), /* AllocKind::OBJECT2_BACKGROUND */ + COUNT(JSObject_Slots4), /* AllocKind::OBJECT4 */ + COUNT(JSObject_Slots4), /* AllocKind::OBJECT4_BACKGROUND */ + COUNT(JSObject_Slots8), /* AllocKind::OBJECT8 */ + COUNT(JSObject_Slots8), /* AllocKind::OBJECT8_BACKGROUND */ + COUNT(JSObject_Slots12), /* AllocKind::OBJECT12 */ + COUNT(JSObject_Slots12), /* AllocKind::OBJECT12_BACKGROUND */ + COUNT(JSObject_Slots16), /* AllocKind::OBJECT16 */ + COUNT(JSObject_Slots16), /* AllocKind::OBJECT16_BACKGROUND */ + COUNT(JSScript), /* AllocKind::SCRIPT */ + COUNT(LazyScript), /* AllocKind::LAZY_SCRIPT */ + COUNT(Shape), /* AllocKind::SHAPE */ + COUNT(AccessorShape), /* AllocKind::ACCESSOR_SHAPE */ + COUNT(BaseShape), /* AllocKind::BASE_SHAPE */ + COUNT(ObjectGroup), /* AllocKind::OBJECT_GROUP */ + COUNT(JSFatInlineString), /* AllocKind::FAT_INLINE_STRING */ + COUNT(JSString), /* AllocKind::STRING */ + COUNT(JSExternalString), /* AllocKind::EXTERNAL_STRING */ + COUNT(JS::Symbol), /* AllocKind::SYMBOL */ + COUNT(jit::JitCode), /* AllocKind::JITCODE */ +}; + +#undef COUNT + struct js::gc::FinalizePhase { size_t length; @@ -455,9 +493,11 @@ ArenaHeader::unmarkAll() Arena::staticAsserts() { static_assert(JS_ARRAY_LENGTH(ThingSizes) == size_t(AllocKind::LIMIT), - "We haven't defined all thing sizes."); + "We haven't defined all thing sizes."); static_assert(JS_ARRAY_LENGTH(FirstThingOffsets) == size_t(AllocKind::LIMIT), - "We haven't defined all offsets."); + "We haven't defined all offsets."); + static_assert(JS_ARRAY_LENGTH(ThingsPerArena) == size_t(AllocKind::LIMIT), + "We haven't defined all counts."); } void @@ -542,7 +582,7 @@ Arena::finalize(FreeOp* fop, AllocKind thingKind, size_t thingSize) size_t nfree = 0; for (const FreeSpan* span = &newListHead; !span->isEmpty(); span = span->nextSpan()) nfree += span->length(thingSize); - MOZ_ASSERT(nfree + nmarked == thingsPerArena(thingSize)); + MOZ_ASSERT(nfree + nmarked == thingsPerArena(thingKind)); #endif aheader.setFirstFreeSpan(&newListHead); return nmarked; @@ -570,7 +610,7 @@ FinalizeTypedArenas(FreeOp* fop, MOZ_ASSERT_IF(fop->onBackgroundThread(), keepArenas == ArenaLists::KEEP_ARENAS); size_t thingSize = Arena::thingSize(thingKind); - size_t thingsPerArena = Arena::thingsPerArena(thingSize); + size_t thingsPerArena = Arena::thingsPerArena(thingKind); while (ArenaHeader* aheader = *src) { *src = aheader->next; @@ -923,6 +963,7 @@ void Chunk::addArenaToFreeList(JSRuntime* rt, ArenaHeader* aheader) { MOZ_ASSERT(!aheader->allocated()); + MOZ_RELEASE_ASSERT(uintptr_t(info.freeArenasHead) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); aheader->next = info.freeArenasHead; info.freeArenasHead = aheader; ++info.numArenasFreeCommitted; @@ -2032,7 +2073,7 @@ size_t ArenaHeader::countFreeCells() size_t ArenaHeader::countUsedCells() { - return Arena::thingsPerArena(getThingSize()) - countFreeCells(); + return Arena::thingsPerArena(getAllocKind()) - countFreeCells(); } ArenaHeader* @@ -2094,7 +2135,7 @@ ArenaList::pickArenasToRelocate(size_t& arenaTotalOut, size_t& relocTotalOut) } mozilla::DebugOnly lastFreeCells(0); - size_t cellsPerArena = Arena::thingsPerArena((*arenap)->getThingSize()); + size_t cellsPerArena = Arena::thingsPerArena((*arenap)->getAllocKind()); while (*arenap) { ArenaHeader* arena = *arenap; @@ -2255,6 +2296,7 @@ ArenaList::relocateArenas(ArenaHeader* toRelocate, ArenaHeader* relocated, Slice toRelocate = arena->next; RelocateArena(arena, sliceBudget); // Prepend to list of relocated arenas + MOZ_RELEASE_ASSERT(uintptr_t(relocated) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); arena->next = relocated; relocated = arena; stats.count(gcstats::STAT_ARENA_RELOCATED); @@ -2364,7 +2406,7 @@ GCRuntime::relocateArenas(Zone* zone, JS::gcreason::Reason reason, ArenaHeader*& // Check that we did as much compaction as we should have. There // should always be less than one arena's worth of free cells. for (auto i : AllAllocKinds()) { - size_t thingsPerArena = Arena::thingsPerArena(Arena::thingSize(i)); + size_t thingsPerArena = Arena::thingsPerArena(i); if (CanRelocateAllocKind(i)) { ArenaList& al = zone->arenas.arenaLists[i]; size_t freeCells = 0; @@ -2803,6 +2845,8 @@ GCRuntime::protectAndHoldArenas(ArenaHeader* arenaList) ArenaHeader* next = arena->next; if (!next) { // Prepend to hold list before we protect the memory. + MOZ_RELEASE_ASSERT( + uintptr_t(relocatedArenasToRelease) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); arena->next = relocatedArenasToRelease; relocatedArenasToRelease = arenaList; } @@ -2850,7 +2894,7 @@ GCRuntime::releaseRelocatedArenasWithoutUnlocking(ArenaHeader* arenaList, const #if defined(JS_CRASH_DIAGNOSTICS) || defined(JS_GC_ZEAL) JS_POISON(reinterpret_cast(arena->thingsStart(thingKind)), - JS_MOVED_TENURED_PATTERN, Arena::thingsSpan(thingSize)); + JS_MOVED_TENURED_PATTERN, Arena::thingsSpan(thingKind)); #endif releaseArena(aheader, lock); @@ -2936,7 +2980,7 @@ ArenaLists::forceFinalizeNow(FreeOp* fop, AllocKind thingKind, KeepArenasEnum ke return; arenaLists[thingKind].clear(); - size_t thingsPerArena = Arena::thingsPerArena(Arena::thingSize(thingKind)); + size_t thingsPerArena = Arena::thingsPerArena(thingKind); SortedArenaList finalizedSorted(thingsPerArena); auto unlimited = SliceBudget::unlimited(); @@ -3005,7 +3049,7 @@ ArenaLists::backgroundFinalize(FreeOp* fop, ArenaHeader* listHead, ArenaHeader** AllocKind thingKind = listHead->getAllocKind(); Zone* zone = listHead->zone; - size_t thingsPerArena = Arena::thingsPerArena(Arena::thingSize(thingKind)); + size_t thingsPerArena = Arena::thingsPerArena(thingKind); SortedArenaList finalizedSorted(thingsPerArena); auto unlimited = SliceBudget::unlimited(); @@ -3432,6 +3476,7 @@ GCRuntime::sweepBackgroundThings(ZoneList& zones, LifoAlloc& freeBlocks, ThreadT for (unsigned index = 0 ; index < BackgroundFinalizePhases[phase].length ; ++index) { AllocKind kind = BackgroundFinalizePhases[phase].kinds[index]; ArenaHeader* arenas = zone->arenas.arenaListsToSweep[kind]; + MOZ_RELEASE_ASSERT(uintptr_t(arenas) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); if (arenas) ArenaLists::backgroundFinalize(&fop, arenas, &emptyArenas); } @@ -5444,7 +5489,7 @@ SweepArenaList(ArenaHeader** arenasToSweep, SliceBudget& sliceBudget, Args... ar *arenasToSweep = (*arenasToSweep)->next; AllocKind kind = MapTypeToFinalizeKind::kind; - sliceBudget.step(Arena::thingsPerArena(Arena::thingSize(kind))); + sliceBudget.step(Arena::thingsPerArena(kind)); if (sliceBudget.isOverBudget()) return false; } @@ -5517,7 +5562,7 @@ GCRuntime::sweepPhase(SliceBudget& sliceBudget) AllocKind kind = IncrementalFinalizePhases[finalizePhase].kinds[sweepKindIndex]; /* Set the number of things per arena for this AllocKind. */ - size_t thingsPerArena = Arena::thingsPerArena(Arena::thingSize(kind)); + size_t thingsPerArena = Arena::thingsPerArena(kind); incrementalSweepList.setThingsPerArena(thingsPerArena); if (!zone->arenas.foregroundFinalize(&fop, kind, sliceBudget, @@ -7740,6 +7785,8 @@ JSObject* NewMemoryInfoObject(JSContext* cx) { RootedObject obj(cx, JS_NewObject(cx, nullptr)); + if (!obj) + return nullptr; using namespace MemInfo; struct NamedGetter { diff --git a/js/src/jsgc.h b/js/src/jsgc.h index e98027cdc1..eec0b9e113 100644 --- a/js/src/jsgc.h +++ b/js/src/jsgc.h @@ -306,6 +306,7 @@ struct SortedArenaListSegment void append(ArenaHeader* aheader) { MOZ_ASSERT(aheader); MOZ_ASSERT_IF(head, head->getAllocKind() == aheader->getAllocKind()); + MOZ_RELEASE_ASSERT(uintptr_t(aheader) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); *tailp = aheader; tailp = &aheader->next; } @@ -316,6 +317,7 @@ struct SortedArenaListSegment // description of ArenaList), but from the perspective of a SortedArenaList // this makes no difference. void linkTo(ArenaHeader* aheader) { + MOZ_RELEASE_ASSERT(uintptr_t(aheader) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); *tailp = aheader; } }; @@ -544,6 +546,7 @@ class SortedArenaList void extractEmpty(ArenaHeader** empty) { SortedArenaListSegment& segment = segments[thingsPerArena_]; if (segment.head) { + MOZ_RELEASE_ASSERT(uintptr_t(*empty) != uintptr_t(UINT64_C(0x4b4b4b4b4b4b4b4b))); *segment.tailp = *empty; *empty = segment.head; segment.clear(); @@ -594,7 +597,7 @@ class ArenaLists enum BackgroundFinalizeStateEnum { BFS_DONE, BFS_RUN }; - typedef mozilla::Atomic + typedef mozilla::Atomic BackgroundFinalizeState; /* The current background finalization state, accessed atomically. */ diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 210ff1b76c..4bb246ca79 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -2571,61 +2571,7 @@ js::GetOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id, return ok; } - RootedNativeObject nobj(cx, obj.as()); - RootedShape shape(cx); - if (!NativeLookupOwnProperty(cx, nobj, id, &shape)) - return false; - if (!shape) { - desc.object().set(nullptr); - return true; - } - - desc.setAttributes(GetShapeAttributes(obj, shape)); - if (desc.isAccessorDescriptor()) { - MOZ_ASSERT(desc.isShared()); - - // The result of GetOwnPropertyDescriptor() must be either undefined or - // a complete property descriptor (per ES6 draft rev 32 (2015 Feb 2) - // 6.1.7.3, Invariants of the Essential Internal Methods). - // - // It is an unfortunate fact that in SM, properties can exist that have - // JSPROP_GETTER or JSPROP_SETTER but not both. In these cases, rather - // than return true with desc incomplete, we fill out the missing - // getter or setter with a null, following CompletePropertyDescriptor. - if (desc.hasGetterObject()) { - desc.setGetterObject(shape->getterObject()); - } else { - desc.setGetterObject(nullptr); - desc.attributesRef() |= JSPROP_GETTER; - } - if (desc.hasSetterObject()) { - desc.setSetterObject(shape->setterObject()); - } else { - desc.setSetterObject(nullptr); - desc.attributesRef() |= JSPROP_SETTER; - } - - desc.value().setUndefined(); - } else { - // This is either a straight-up data property or (rarely) a - // property with a JSGetterOp/JSSetterOp. The latter must be - // reported to the caller as a plain data property, so clear - // desc.getter/setter, and mask away the SHARED bit. - desc.setGetter(nullptr); - desc.setSetter(nullptr); - desc.attributesRef() &= ~JSPROP_SHARED; - - if (IsImplicitDenseOrTypedArrayElement(shape)) { - desc.value().set(nobj->getDenseOrTypedArrayElement(JSID_TO_INT(id))); - } else { - if (!NativeGetExistingProperty(cx, nobj, nobj, shape, desc.value())) - return false; - } - } - - desc.object().set(nobj); - desc.assertComplete(); - return true; + return NativeGetOwnPropertyDescriptor(cx, obj.as(), id, desc); } bool @@ -3307,12 +3253,12 @@ GetObjectSlotNameFunctor::operator()(JS::CallbackTracer* trc, char* buf, size_t if (slotname) JS_snprintf(buf, bufsize, pattern, slotname); else - JS_snprintf(buf, bufsize, "**UNKNOWN SLOT %ld**", (long)slot); + JS_snprintf(buf, bufsize, "**UNKNOWN SLOT %" PRIu32 "**", slot); } while (false); } else { jsid propid = shape->propid(); if (JSID_IS_INT(propid)) { - JS_snprintf(buf, bufsize, "%ld", (long)JSID_TO_INT(propid)); + JS_snprintf(buf, bufsize, "%" PRId32 "", JSID_TO_INT(propid)); } else if (JSID_IS_ATOM(propid)) { PutEscapedString(buf, bufsize, JSID_TO_ATOM(propid), 0); } else if (JSID_IS_SYMBOL(propid)) { @@ -3647,8 +3593,11 @@ js::DumpInterpreterFrame(JSContext* cx, InterpreterFrame* start) JS_FRIEND_API(void) js::DumpBacktrace(JSContext* cx) { - Sprinter sprinter(cx); - sprinter.init(); + Sprinter sprinter(cx, false); + if (!sprinter.init()) { + fprintf(stdout, "js::DumpBacktrace: OOM\n"); + return; + } size_t depth = 0; for (AllFramesIter i(cx); !i.done(); ++i, ++depth) { const char* filename = JS_GetScriptFilename(i.script()); @@ -3667,9 +3616,8 @@ js::DumpBacktrace(JSContext* cx) } fprintf(stdout, "%s", sprinter.string()); #ifdef XP_WIN32 - if (IsDebuggerPresent()) { + if (IsDebuggerPresent()) OutputDebugStringA(sprinter.string()); - } #endif } diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 0f4598a528..c76aecd47e 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -141,7 +141,7 @@ JSObject::getGroup(JSContext* cx) inline void JSObject::setGroup(js::ObjectGroup* group) { - MOZ_ASSERT(group); + MOZ_RELEASE_ASSERT(group); MOZ_ASSERT(!isSingleton()); group_ = group; } @@ -590,9 +590,7 @@ inline bool IsInternalFunctionObject(JSObject& funobj) { JSFunction& fun = funobj.as(); - MOZ_ASSERT_IF(fun.isLambda(), - fun.isInterpreted() || fun.isAsmJSNative()); - return fun.isLambda() && fun.isInterpreted() && !fun.environment(); + return fun.isInterpreted() && !fun.environment(); } /* diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index 37e762f50c..1398a7eb1b 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -147,12 +147,16 @@ js::StackDefs(JSScript* script, jsbytecode* pc) const char * PCCounts::numExecName = "interp"; void -js::DumpIonScriptCounts(Sprinter* sp, jit::IonScriptCounts* ionCounts) +js::DumpIonScriptCounts(Sprinter* sp, HandleScript script, + jit::IonScriptCounts* ionCounts) { Sprint(sp, "IonScript [%lu blocks]:\n", ionCounts->numBlocks()); for (size_t i = 0; i < ionCounts->numBlocks(); i++) { const jit::IonBlockCounts& block = ionCounts->block(i); - Sprint(sp, "BB #%lu [%05u]", block.id(), block.offset()); + unsigned lineNumber = 0, columnNumber = 0; + lineNumber = PCToLineNumber(script, script->offsetToPC(block.offset()), &columnNumber); + Sprint(sp, "BB #%lu [%05u,%u,%u]", block.id(), block.offset(), + lineNumber, columnNumber); if (block.description()) Sprint(sp, " [inlined %s]", block.description()); for (size_t j = 0; j < block.numSuccessors(); j++) @@ -189,7 +193,7 @@ js::DumpPCCounts(JSContext* cx, HandleScript script, Sprinter* sp) jit::IonScriptCounts* ionCounts = script->getIonCounts(); while (ionCounts) { - DumpIonScriptCounts(sp, ionCounts); + DumpIonScriptCounts(sp, script, ionCounts); ionCounts = ionCounts->previous(); } } @@ -972,7 +976,7 @@ js::Disassemble1(JSContext* cx, HandleScript script, jsbytecode* pc, default: { char numBuf[12]; - JS_snprintf(numBuf, sizeof numBuf, "%lx", (unsigned long) cs->format); + JS_snprintf(numBuf, sizeof numBuf, "%x", cs->format); JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_UNKNOWN_FORMAT, numBuf); return 0; diff --git a/js/src/jsopcode.h b/js/src/jsopcode.h index d1c9d3f0ea..b46e733409 100644 --- a/js/src/jsopcode.h +++ b/js/src/jsopcode.h @@ -846,7 +846,8 @@ DumpPCCounts(JSContext* cx, JS::Handle script, Sprinter* sp); namespace jit { struct IonScriptCounts; } void -DumpIonScriptCounts(js::Sprinter* sp, jit::IonScriptCounts* ionCounts); +DumpIonScriptCounts(js::Sprinter* sp, HandleScript script, + jit::IonScriptCounts* ionCounts); void DumpCompartmentPCCounts(JSContext* cx); diff --git a/js/src/vm/MemoryMetrics.cpp b/js/src/vm/MemoryMetrics.cpp index 6af6f463c7..6be0fde81c 100644 --- a/js/src/vm/MemoryMetrics.cpp +++ b/js/src/vm/MemoryMetrics.cpp @@ -356,7 +356,7 @@ StatsArenaCallback(JSRuntime* rt, void* data, gc::Arena* arena, // The admin space includes (a) the header and (b) the padding between the // end of the header and the start of the first GC thing. - size_t allocationSpace = arena->thingsSpan(thingSize); + size_t allocationSpace = Arena::thingsSpan(arena->aheader.getAllocKind()); rtStats->currZoneStats->gcHeapArenaAdmin += gc::ArenaSize - allocationSpace; // We don't call the callback on unused things. So we compute the diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp index 06b1d6b70d..219f42fd58 100644 --- a/js/src/vm/NativeObject.cpp +++ b/js/src/vm/NativeObject.cpp @@ -1659,6 +1659,69 @@ js::NativeHasProperty(JSContext* cx, HandleNativeObject obj, HandleId id, bool* } +/*** [[GetOwnPropertyDescriptor]] ****************************************************************/ + +bool +js::NativeGetOwnPropertyDescriptor(JSContext* cx, HandleNativeObject obj, HandleId id, + MutableHandle desc) +{ + RootedShape shape(cx); + if (!NativeLookupOwnProperty(cx, obj, id, &shape)) + return false; + if (!shape) { + desc.object().set(nullptr); + return true; + } + + desc.setAttributes(GetShapeAttributes(obj, shape)); + if (desc.isAccessorDescriptor()) { + MOZ_ASSERT(desc.isShared()); + + // The result of GetOwnPropertyDescriptor() must be either undefined or + // a complete property descriptor (per ES6 draft rev 32 (2015 Feb 2) + // 6.1.7.3, Invariants of the Essential Internal Methods). + // + // It is an unfortunate fact that in SM, properties can exist that have + // JSPROP_GETTER or JSPROP_SETTER but not both. In these cases, rather + // than return true with desc incomplete, we fill out the missing + // getter or setter with a null, following CompletePropertyDescriptor. + if (desc.hasGetterObject()) { + desc.setGetterObject(shape->getterObject()); + } else { + desc.setGetterObject(nullptr); + desc.attributesRef() |= JSPROP_GETTER; + } + if (desc.hasSetterObject()) { + desc.setSetterObject(shape->setterObject()); + } else { + desc.setSetterObject(nullptr); + desc.attributesRef() |= JSPROP_SETTER; + } + + desc.value().setUndefined(); + } else { + // This is either a straight-up data property or (rarely) a + // property with a JSGetterOp/JSSetterOp. The latter must be + // reported to the caller as a plain data property, so clear + // desc.getter/setter, and mask away the SHARED bit. + desc.setGetter(nullptr); + desc.setSetter(nullptr); + desc.attributesRef() &= ~JSPROP_SHARED; + + if (IsImplicitDenseOrTypedArrayElement(shape)) { + desc.value().set(obj->getDenseOrTypedArrayElement(JSID_TO_INT(id))); + } else { + if (!NativeGetExistingProperty(cx, obj, obj, shape, desc.value())) + return false; + } + } + + desc.object().set(obj); + desc.assertComplete(); + return true; +} + + /*** [[Get]] *************************************************************************************/ static inline bool diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h index d9e6921719..d46ff9c4ca 100644 --- a/js/src/vm/NativeObject.h +++ b/js/src/vm/NativeObject.h @@ -1339,6 +1339,10 @@ NativeDefineProperty(ExclusiveContext* cx, HandleNativeObject obj, PropertyName* extern bool NativeHasProperty(JSContext* cx, HandleNativeObject obj, HandleId id, bool* foundp); +extern bool +NativeGetOwnPropertyDescriptor(JSContext* cx, HandleNativeObject obj, HandleId id, + MutableHandle desc); + extern bool NativeGetProperty(JSContext* cx, HandleNativeObject obj, HandleValue receiver, HandleId id, MutableHandleValue vp); diff --git a/js/src/vm/ScopeObject.cpp b/js/src/vm/ScopeObject.cpp index 073dff8d4b..9858e9b99b 100644 --- a/js/src/vm/ScopeObject.cpp +++ b/js/src/vm/ScopeObject.cpp @@ -622,8 +622,20 @@ ModuleEnvironmentObject::setProperty(JSContext* cx, HandleObject obj, HandleId i ModuleEnvironmentObject::getOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id, MutableHandle desc) { - // We never call this hook on scope objects. - MOZ_CRASH(); + const IndirectBindingMap& bindings = obj->as().importBindings(); + Shape* shape; + ModuleEnvironmentObject* env; + if (bindings.lookup(id, &env, &shape)) { + desc.setAttributes(JSPROP_ENUMERATE | JSPROP_PERMANENT); + desc.object().set(obj); + RootedValue value(cx, env->getSlot(shape->slot())); + desc.setValue(value); + desc.assertComplete(); + return true; + } + + RootedNativeObject self(cx, &obj->as()); + return NativeGetOwnPropertyDescriptor(cx, self, id, desc); } /* static */ bool diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index 1395ee89ad..3e5c70ca1d 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -3264,9 +3264,8 @@ static const JSWrapObjectCallbacks WrapObjectCallbacks = { xpc::WrapperFactory::PrepareForWrapping }; -XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect) - : CycleCollectedJSRuntime(nullptr, JS::DefaultHeapMaxBytes, JS::DefaultNurseryBytes), - mJSContextStack(new XPCJSContextStack(this)), +XPCJSRuntime::XPCJSRuntime() + : mJSContextStack(new XPCJSContextStack(this)), mCallContext(nullptr), mAutoRoots(nullptr), mResolveName(JSID_VOID), @@ -3287,18 +3286,31 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect) mWrappedJSRoots(nullptr), mObjectHolderRoots(nullptr), mWatchdogManager(new WatchdogManager(this)), - mUnprivilegedJunkScope(this->Runtime(), nullptr), - mPrivilegedJunkScope(this->Runtime(), nullptr), - mCompilationScope(this->Runtime(), nullptr), mAsyncSnowWhiteFreer(new AsyncFreeSnowWhite()), mSlowScriptSecondHalf(false) { - // these jsids filled in later when we have a JSContext to work with. - mStrIDs[0] = JSID_VOID; +} + +nsresult +XPCJSRuntime::Initialize() +{ + nsresult rv = CycleCollectedJSRuntime::Initialize(nullptr, + JS::DefaultHeapMaxBytes, + JS::DefaultNurseryBytes); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } MOZ_ASSERT(Runtime()); JSRuntime* runtime = Runtime(); + mUnprivilegedJunkScope.init(runtime, nullptr); + mPrivilegedJunkScope.init(runtime, nullptr); + mCompilationScope.init(runtime, nullptr); + + // these jsids filled in later when we have a JSContext to work with. + mStrIDs[0] = JSID_VOID; + auto rtPrivate = new PerThreadAtomCache(); memset(rtPrivate, 0, sizeof(PerThreadAtomCache)); JS_SetRuntimePrivate(runtime, rtPrivate); @@ -3444,18 +3456,23 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect) // Watch for the JS boolean options. ReloadPrefsCallback(nullptr, this); Preferences::RegisterCallback(ReloadPrefsCallback, JS_OPTIONS_DOT_STR, this); + + return NS_OK; } // static XPCJSRuntime* -XPCJSRuntime::newXPCJSRuntime(nsXPConnect* aXPConnect) +XPCJSRuntime::newXPCJSRuntime() { - NS_PRECONDITION(aXPConnect,"bad param"); + XPCJSRuntime* self = new XPCJSRuntime(); + nsresult rv = self->Initialize(); + if (NS_FAILED(rv)) { + NS_RUNTIMEABORT("new XPCJSRuntime failed to initialize."); + delete self; + return nullptr; + } - XPCJSRuntime* self = new XPCJSRuntime(aXPConnect); - - if (self && - self->Runtime() && + if (self->Runtime() && self->GetMultiCompartmentWrappedJSMap() && self->GetWrappedJSClassMap() && self->GetIID2NativeInterfaceMap() && diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index c2b7dc33a4..be0117cc44 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -60,7 +60,10 @@ nsXPConnect::nsXPConnect() : mRuntime(nullptr), mShuttingDown(false) { - mRuntime = XPCJSRuntime::newXPCJSRuntime(this); + mRuntime = XPCJSRuntime::newXPCJSRuntime(); + if (!mRuntime) { + NS_RUNTIMEABORT("Couldn't create XPCJSRuntime."); + } char* reportableEnv = PR_GetEnv("MOZ_REPORT_ALL_JS_EXCEPTIONS"); if (reportableEnv && *reportableEnv) diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 0c193f10c3..ac6c441762 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -430,7 +430,7 @@ private: class XPCJSRuntime : public mozilla::CycleCollectedJSRuntime { public: - static XPCJSRuntime* newXPCJSRuntime(nsXPConnect* aXPConnect); + static XPCJSRuntime* newXPCJSRuntime(); static XPCJSRuntime* Get() { return nsXPConnect::XPConnect()->GetRuntime(); } XPCJSContextStack* GetJSContextStack() {return mJSContextStack;} @@ -619,8 +619,9 @@ public: PRTime GetWatchdogTimestamp(WatchdogTimestampCategory aCategory); private: - XPCJSRuntime() = delete; - explicit XPCJSRuntime(nsXPConnect* aXPConnect); + XPCJSRuntime(); + + nsresult Initialize(); void ReleaseIncrementally(nsTArray& array); diff --git a/layout/generic/AsyncScrollBase.cpp b/layout/generic/AsyncScrollBase.cpp index da1512308c..e85444f0fc 100644 --- a/layout/generic/AsyncScrollBase.cpp +++ b/layout/generic/AsyncScrollBase.cpp @@ -4,6 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "AsyncScrollBase.h" +#include "gfxPrefs.h" using namespace mozilla; @@ -77,26 +78,23 @@ AsyncScrollBase::InitializeHistory(TimeStamp aTime) mPrevEventTime[2] = mPrevEventTime[1] - maxDelta; } -const double kCurrentVelocityWeighting = 0.25; -const double kStopDecelerationWeighting = 0.4; - void AsyncScrollBase::InitTimingFunction(nsSMILKeySpline& aTimingFunction, nscoord aCurrentPos, nscoord aCurrentVelocity, nscoord aDestination) { - if (aDestination == aCurrentPos || kCurrentVelocityWeighting == 0) { - aTimingFunction.Init(0, 0, 1 - kStopDecelerationWeighting, 1); + if (aDestination == aCurrentPos || gfxPrefs::SmoothScrollCurrentVelocityWeighting() == 0) { + aTimingFunction.Init(0, 0, 1 - gfxPrefs::SmoothScrollStopDecelerationWeighting(), 1); return; } const TimeDuration oneSecond = TimeDuration::FromSeconds(1); double slope = aCurrentVelocity * (mDuration / oneSecond) / (aDestination - aCurrentPos); double normalization = sqrt(1.0 + slope * slope); - double dt = 1.0 / normalization * kCurrentVelocityWeighting; - double dxy = slope / normalization * kCurrentVelocityWeighting; - aTimingFunction.Init(dt, dxy, 1 - kStopDecelerationWeighting, 1); + double dt = 1.0 / normalization * gfxPrefs::SmoothScrollCurrentVelocityWeighting(); + double dxy = slope / normalization * gfxPrefs::SmoothScrollCurrentVelocityWeighting(); + aTimingFunction.Init(dt, dxy, 1 - gfxPrefs::SmoothScrollStopDecelerationWeighting(), 1); } nsPoint diff --git a/layout/reftests/css-blending/reftest.list b/layout/reftests/css-blending/reftest.list index ef93b3ffe8..868d23f5d9 100644 --- a/layout/reftests/css-blending/reftest.list +++ b/layout/reftests/css-blending/reftest.list @@ -6,7 +6,7 @@ pref(layout.css.mix-blend-mode.enabled,true) == blend-difference-stacking.html b pref(layout.css.background-blend-mode.enabled,true) == background-blending-alpha.html background-blending-alpha-ref.html pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-color.html background-blending-gradient-color-ref.html -fuzzy-if(azureSkiaGL,3,7597) fuzzy-if(cocoaWidget,3,7597) fuzzy-if(d2d,1,3800) pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-gradient.html background-blending-gradient-gradient-ref.html +fuzzy-if(azureSkiaGL,3,7597) fuzzy-if(cocoaWidget,3,7597) fuzzy-if(d2d,1,3800) fuzzy-if(d3d11,1,4200) pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-gradient.html background-blending-gradient-gradient-ref.html fuzzy-if(azureSkiaGL,2,7174) fuzzy-if(azureQuartz,2,7174) pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-image.html background-blending-gradient-color-ref.html fuzzy-if(azureQuartz,2,10000) fuzzy-if(azureSkia||d2d||gtkWidget,1,10000) pref(layout.css.background-blend-mode.enabled,true) == background-blending-image-color-jpg.html background-blending-image-color-ref.html pref(layout.css.background-blend-mode.enabled,true) == background-blending-image-color-png.html background-blending-image-color-ref.html @@ -38,10 +38,10 @@ fuzzy-if(azureQuartz,1,1600) fuzzy-if(d2d||azureSkia||gtkWidget,10,4800) pref(la fuzzy-if(azureQuartz,2,40000) fuzzy-if(azureSkia||d2d||gtkWidget,1,40000) pref(layout.css.background-blend-mode.enabled,true) == background-blending-image-color-959674.html background-blending-image-color-959674-ref.html #fuzzy due to inconsistencies in rounded rect cliping between parent and child; may be related to antialiasing. Between platforms, the max difference is the same, and the number of different pixels is either 36 or 37. (Win, Mac and Lin) -fuzzy(64,37) pref(layout.css.mix-blend-mode.enabled,true) == mix-blend-mode-952051.html mix-blend-mode-952051-ref.html +fuzzy(64,53) pref(layout.css.mix-blend-mode.enabled,true) == mix-blend-mode-952051.html mix-blend-mode-952051-ref.html -pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.html mix-blend-mode-and-filter-ref.html -pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.svg mix-blend-mode-and-filter-ref.svg +fuzzy-if(d3d11,49,200) pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.html mix-blend-mode-and-filter-ref.html +fuzzy-if(d3d11,1,3) pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.svg mix-blend-mode-and-filter-ref.svg fuzzy(1,14400) pref(layout.css.mix-blend-mode.enabled,true) == mix-blend-mode-child-of-blended-has-opacity.html mix-blend-mode-child-of-blended-has-opacity-ref.html diff --git a/media/webrtc/signaling/test/FakeLogging.h b/media/webrtc/signaling/test/FakeLogging.h new file mode 100644 index 0000000000..4363a55a45 --- /dev/null +++ b/media/webrtc/signaling/test/FakeLogging.h @@ -0,0 +1,18 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef FakeLogging_h +#define FakeLogging_h + +#if !defined(MOZILLA_XPCOMRT_API) +namespace mozilla { +namespace detail { +void log_print(const PRLogModuleInfo* aModule, + LogLevel aLevel, + const char* aFmt, ...) { } +} +} +#endif + +#endif diff --git a/media/webrtc/signaling/test/jsep_session_unittest.cpp b/media/webrtc/signaling/test/jsep_session_unittest.cpp index 0e5408e456..70e3676c98 100644 --- a/media/webrtc/signaling/test/jsep_session_unittest.cpp +++ b/media/webrtc/signaling/test/jsep_session_unittest.cpp @@ -19,6 +19,7 @@ #include "FakeMediaStreams.h" #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "signaling/src/sdp/SdpMediaSection.h" #include "signaling/src/sdp/SipccSdpParser.h" diff --git a/media/webrtc/signaling/test/jsep_track_unittest.cpp b/media/webrtc/signaling/test/jsep_track_unittest.cpp index 6a6fac97cd..87f783c35f 100644 --- a/media/webrtc/signaling/test/jsep_track_unittest.cpp +++ b/media/webrtc/signaling/test/jsep_track_unittest.cpp @@ -11,6 +11,7 @@ // Magic linker includes :( #include "FakeMediaStreams.h" #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "signaling/src/jsep/JsepTrack.h" #include "signaling/src/sdp/SipccSdp.h" diff --git a/media/webrtc/signaling/test/mediaconduit_unittests.cpp b/media/webrtc/signaling/test/mediaconduit_unittests.cpp index 874ad4ce13..4922c69416 100644 --- a/media/webrtc/signaling/test/mediaconduit_unittests.cpp +++ b/media/webrtc/signaling/test/mediaconduit_unittests.cpp @@ -17,6 +17,7 @@ using namespace std; #include "GmpVideoCodec.h" #include "nsIEventTarget.h" #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "nsThreadUtils.h" #include "runnable_utils.h" #include "signaling/src/common/EncodingConstraints.h" diff --git a/media/webrtc/signaling/test/mediapipeline_unittest.cpp b/media/webrtc/signaling/test/mediapipeline_unittest.cpp index 7471ec9256..bc6e9a0561 100644 --- a/media/webrtc/signaling/test/mediapipeline_unittest.cpp +++ b/media/webrtc/signaling/test/mediapipeline_unittest.cpp @@ -19,6 +19,7 @@ #include "mozilla/RefPtr.h" #include "FakeMediaStreams.h" #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "MediaConduitErrors.h" #include "MediaConduitInterface.h" #include "MediaPipeline.h" diff --git a/media/webrtc/signaling/test/sdp_file_parser.cpp b/media/webrtc/signaling/test/sdp_file_parser.cpp index 2ae8c2153d..3fb0c2f1ce 100644 --- a/media/webrtc/signaling/test/sdp_file_parser.cpp +++ b/media/webrtc/signaling/test/sdp_file_parser.cpp @@ -14,6 +14,7 @@ // without this include linking fails #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "signaling/src/sdp/SipccSdpParser.h" diff --git a/media/webrtc/signaling/test/sdp_unittests.cpp b/media/webrtc/signaling/test/sdp_unittests.cpp index a13684370f..322b574020 100644 --- a/media/webrtc/signaling/test/sdp_unittests.cpp +++ b/media/webrtc/signaling/test/sdp_unittests.cpp @@ -22,6 +22,7 @@ #include "nsThreadUtils.h" #include "FakeMediaStreams.h" #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "PeerConnectionImpl.h" #include "PeerConnectionCtx.h" diff --git a/media/webrtc/signaling/test/signaling_unittests.cpp b/media/webrtc/signaling/test/signaling_unittests.cpp index 8662eb68db..92bf6a2a41 100644 --- a/media/webrtc/signaling/test/signaling_unittests.cpp +++ b/media/webrtc/signaling/test/signaling_unittests.cpp @@ -22,6 +22,7 @@ #include "FakePCObserver.h" #include "FakeMediaStreams.h" #include "FakeMediaStreamsImpl.h" +#include "FakeLogging.h" #include "PeerConnectionImpl.h" #include "PeerConnectionCtx.h" #include "PeerConnectionMedia.h" diff --git a/mfbt/Attributes.h b/mfbt/Attributes.h index cb7f4de13a..b351c14fca 100644 --- a/mfbt/Attributes.h +++ b/mfbt/Attributes.h @@ -462,10 +462,12 @@ * intended to prevent introducing static initializers. This attribute * currently makes it a compile-time error to instantiate these classes * anywhere other than at the global scope, or as a static member of a class. + * In non-debug mode, it also prohibits non-trivial constructors and + * destructors. * MOZ_TRIVIAL_CTOR_DTOR: Applies to all classes that must have both a trivial - * constructor and a trivial destructor. Setting this attribute on a class - * makes it a compile-time error for that class to get a non-trivial - * constructor or destructor for any reason. + * or constexpr constructor and a trivial destructor. Setting this attribute + * on a class makes it a compile-time error for that class to get a + * non-trivial constructor or destructor for any reason. * MOZ_HEAP_ALLOCATOR: Applies to any function. This indicates that the return * value is allocated on the heap, and will as a result check such allocations * during MOZ_STACK_CLASS and MOZ_NONHEAP_CLASS annotation checking. diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 721fcfa59f..b335e11b2b 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2484,6 +2484,9 @@ pref("general.smoothScroll.other", true); // intervals). // This defines how longer is the duration compared to events interval (percentage) pref("general.smoothScroll.durationToIntervalRatio", 200); +// These two prefs determine the timing function. +pref("general.smoothScroll.currentVelocityWeighting", "0.25"); +pref("general.smoothScroll.stopDecelerationWeighting", "0.4"); pref("profile.confirm_automigration",true); // profile.migration_behavior determines how the profiles root is set diff --git a/netwerk/test/NetwerkTestLogging.h b/netwerk/test/NetwerkTestLogging.h new file mode 100644 index 0000000000..68e955fd39 --- /dev/null +++ b/netwerk/test/NetwerkTestLogging.h @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef NetwerkTestLogging_h +#define NetwerkTestLogging_h + +#include "mozilla/Logging.h" + +// The netwerk standalone cpp unit tests will just use PR_LogPrint as they don't +// have access to mozilla::detail::log_print. To support that MOZ_LOG is +// redefined. +#undef MOZ_LOG +#define MOZ_LOG(_module,_level,_args) \ + PR_BEGIN_MACRO \ + if (MOZ_LOG_TEST(_module,_level)) { \ + PR_LogPrint _args; \ + } \ + PR_END_MACRO + +#endif diff --git a/netwerk/test/TestBlockingSocket.cpp b/netwerk/test/TestBlockingSocket.cpp index 3312a87b34..d4b4a615fb 100644 --- a/netwerk/test/TestBlockingSocket.cpp +++ b/netwerk/test/TestBlockingSocket.cpp @@ -15,7 +15,7 @@ #include "nsIInputStream.h" #include "nsServiceManagerUtils.h" #include "nsIOutputStream.h" -#include "mozilla/Logging.h" +#include "NetwerkTestLogging.h" #include "prenv.h" #include "prthread.h" #include diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index 9de713d9c2..9724a9dce9 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -56,7 +56,7 @@ #include "nsStringAPI.h" #include "nsNetUtil.h" #include "nsServiceManagerUtils.h" -#include "mozilla/Logging.h" +#include "NetwerkTestLogging.h" using namespace mozilla; diff --git a/netwerk/test/TestServ.cpp b/netwerk/test/TestServ.cpp index 17978a2b88..7a013ea60a 100644 --- a/netwerk/test/TestServ.cpp +++ b/netwerk/test/TestServ.cpp @@ -14,7 +14,7 @@ #include "nsComponentManagerUtils.h" #include "nsStringAPI.h" #include "nsCOMPtr.h" -#include "mozilla/Logging.h" +#include "NetwerkTestLogging.h" // // set NSPR_LOG_MODULES=Test:5 diff --git a/netwerk/test/TestStreamLoader.cpp b/netwerk/test/TestStreamLoader.cpp index 6e7e4de67b..62419052a7 100644 --- a/netwerk/test/TestStreamLoader.cpp +++ b/netwerk/test/TestStreamLoader.cpp @@ -3,7 +3,7 @@ #include "nsNetUtil.h" #include "nsServiceManagerUtils.h" #include "nsThreadUtils.h" -#include "mozilla/Logging.h" +#include "NetwerkTestLogging.h" #include "mozilla/Attributes.h" #include "nsIScriptSecurityManager.h" diff --git a/netwerk/test/TestUpload.cpp b/netwerk/test/TestUpload.cpp index 00bf4e70ca..91433c3965 100644 --- a/netwerk/test/TestUpload.cpp +++ b/netwerk/test/TestUpload.cpp @@ -17,7 +17,7 @@ #include "nsIUploadChannel.h" -#include "mozilla/Logging.h" +#include "NetwerkTestLogging.h" // // set NSPR_LOG_MODULES=Test:5 // diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 72ec035272..375e0bfb04 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -4373,12 +4373,12 @@ void XRE_GlibInit() { static bool ran_once = false; - // GLib < 2.24 doesn't want g_thread_init to be invoked twice, so ensure - // it's only done once. No need for thread safety here, since this is invoked + // glib < 2.24 doesn't want g_thread_init to be invoked twice, so ensure + // we only do it once. No need for thread safety here, since this is invoked // well before any thread is spawned. if (!ran_once) { - // GLib version < 2.36 doesn't initialize g_slice in a static initializer. - // Ensure this happens through g_thread_init (GLib version < 2.32) or + // glib version < 2.36 doesn't initialize g_slice in a static initializer. + // Ensure this happens through g_thread_init (glib version < 2.32) or // g_type_init (2.32 <= gLib version < 2.36)." g_thread_init(nullptr); g_type_init(); diff --git a/widget/InputData.h b/widget/InputData.h index bbc838a8f4..304fbd539d 100644 --- a/widget/InputData.h +++ b/widget/InputData.h @@ -537,7 +537,7 @@ public: enum ScrollDeltaType { // There are three kinds of scroll delta modes in Gecko: "page", "line" and - // "pixel". For apz, we currently only support the "line" and "pixel" modes. + // "pixel". SCROLLDELTA_LINE, SCROLLDELTA_PAGE, SCROLLDELTA_PIXEL diff --git a/xpcom/base/CycleCollectedJSRuntime.cpp b/xpcom/base/CycleCollectedJSRuntime.cpp index ed4882db52..6d230a3b9a 100644 --- a/xpcom/base/CycleCollectedJSRuntime.cpp +++ b/xpcom/base/CycleCollectedJSRuntime.cpp @@ -209,7 +209,7 @@ NoteWeakMapsTracer::trace(JSObject* aMap, JS::GCCellPtr aKey, mChildTracer.mKey = aKey; mChildTracer.mKeyDelegate = kdelegate; - if (aValue.is()) { + if (!aValue.is()) { JS::TraceChildren(&mChildTracer, aValue); } @@ -406,12 +406,10 @@ static const JSZoneParticipant sJSZoneCycleCollectorGlobal; static void JSObjectsTenuredCb(JSRuntime* aRuntime, void* aData) { - static_cast(aData)->JSObjectsTenured(aRuntime); + static_cast(aData)->JSObjectsTenured(); } -CycleCollectedJSRuntime::CycleCollectedJSRuntime(JSRuntime* aParentRuntime, - uint32_t aMaxBytes, - uint32_t aMaxNurseryBytes) +CycleCollectedJSRuntime::CycleCollectedJSRuntime() : mGCThingCycleCollectorGlobal(sGCThingCycleCollectorGlobal) , mJSZoneCycleCollectorGlobal(sJSZoneCycleCollectorGlobal) , mJSRuntime(nullptr) @@ -425,16 +423,52 @@ CycleCollectedJSRuntime::CycleCollectedJSRuntime(JSRuntime* aParentRuntime, nsCOMPtr thread = do_GetCurrentThread(); mOwningThread = thread.forget().downcast().take(); MOZ_RELEASE_ASSERT(mOwningThread); +} + +CycleCollectedJSRuntime::~CycleCollectedJSRuntime() +{ + // If the allocation failed, here we are. + if (!mJSRuntime) { + return; + } + + MOZ_ASSERT(!mDeferredFinalizerTable.Count()); + + // Last chance to process any events. + ProcessMetastableStateQueue(mBaseRecursionDepth); + MOZ_ASSERT(mMetastableStateEvents.IsEmpty()); + + ProcessStableStateQueue(); + MOZ_ASSERT(mStableStateEvents.IsEmpty()); + + // Clear mPendingException first, since it might be cycle collected. + mPendingException = nullptr; + + JS_DestroyRuntime(mJSRuntime); + mJSRuntime = nullptr; + nsCycleCollector_forgetJSRuntime(); + + mozilla::dom::DestroyScriptSettings(); + + mOwningThread->SetScriptObserver(nullptr); + NS_RELEASE(mOwningThread); +} + +nsresult +CycleCollectedJSRuntime::Initialize(JSRuntime* aParentRuntime, + uint32_t aMaxBytes, + uint32_t aMaxNurseryBytes) +{ + MOZ_ASSERT(!mJSRuntime); mOwningThread->SetScriptObserver(this); // The main thread has a base recursion depth of 0, workers of 1. mBaseRecursionDepth = RecursionDepth(); mozilla::dom::InitScriptSettings(); - mJSRuntime = JS_NewRuntime(aMaxBytes, aMaxNurseryBytes, aParentRuntime); if (!mJSRuntime) { - MOZ_CRASH(); + return NS_ERROR_OUT_OF_MEMORY; } if (!JS_AddExtraGCRootsTracer(mJSRuntime, TraceBlackJS, this)) { @@ -476,31 +510,8 @@ CycleCollectedJSRuntime::CycleCollectedJSRuntime(JSRuntime* aParentRuntime, JS::dbg::SetDebuggerMallocSizeOf(mJSRuntime, moz_malloc_size_of); nsCycleCollector_registerJSRuntime(this); -} -CycleCollectedJSRuntime::~CycleCollectedJSRuntime() -{ - MOZ_ASSERT(mJSRuntime); - MOZ_ASSERT(!mDeferredFinalizerTable.Count()); - - // Last chance to process any events. - ProcessMetastableStateQueue(mBaseRecursionDepth); - MOZ_ASSERT(mMetastableStateEvents.IsEmpty()); - - ProcessStableStateQueue(); - MOZ_ASSERT(mStableStateEvents.IsEmpty()); - - // Clear mPendingException first, since it might be cycle collected. - mPendingException = nullptr; - - JS_DestroyRuntime(mJSRuntime); - mJSRuntime = nullptr; - nsCycleCollector_forgetJSRuntime(); - - mozilla::dom::DestroyScriptSettings(); - - mOwningThread->SetScriptObserver(nullptr); - NS_RELEASE(mOwningThread); + return NS_OK; } size_t @@ -650,6 +661,8 @@ void CycleCollectedJSRuntime::TraverseZone(JS::Zone* aZone, nsCycleCollectionTraversalCallback& aCb) { + MOZ_ASSERT(mJSRuntime); + /* * We treat the zone as being gray. We handle non-gray GCthings in the * zone by not reporting their children to the CC. The black-gray invariant @@ -963,6 +976,8 @@ mozilla::TraceScriptHolder(nsISupports* aHolder, JSTracer* aTracer) void CycleCollectedJSRuntime::TraceNativeGrayRoots(JSTracer* aTracer) { + MOZ_ASSERT(mJSRuntime); + // NB: This is here just to preserve the existing XPConnect order. I doubt it // would hurt to do this after the JS holders. TraceAdditionalNativeGrayRoots(aTracer); @@ -977,6 +992,7 @@ CycleCollectedJSRuntime::TraceNativeGrayRoots(JSTracer* aTracer) void CycleCollectedJSRuntime::AddJSHolder(void* aHolder, nsScriptObjectTracer* aTracer) { + MOZ_ASSERT(mJSRuntime); mJSHolders.Put(aHolder, aTracer); } @@ -1027,6 +1043,8 @@ struct ClearJSHolder : public TraceCallbacks void CycleCollectedJSRuntime::RemoveJSHolder(void* aHolder) { + MOZ_ASSERT(mJSRuntime); + nsScriptObjectTracer* tracer = mJSHolders.Get(aHolder); if (!tracer) { return; @@ -1039,6 +1057,7 @@ CycleCollectedJSRuntime::RemoveJSHolder(void* aHolder) bool CycleCollectedJSRuntime::IsJSHolder(void* aHolder) { + MOZ_ASSERT(mJSRuntime); return mJSHolders.Get(aHolder, nullptr); } @@ -1051,6 +1070,8 @@ AssertNoGcThing(JS::GCCellPtr aGCThing, const char* aName, void* aClosure) void CycleCollectedJSRuntime::AssertNoObjectsToTrace(void* aPossibleJSHolder) { + MOZ_ASSERT(mJSRuntime); + nsScriptObjectTracer* tracer = mJSHolders.Get(aPossibleJSHolder); if (tracer) { tracer->Trace(aPossibleJSHolder, TraceCallbackFunc(AssertNoGcThing), nullptr); @@ -1061,6 +1082,8 @@ CycleCollectedJSRuntime::AssertNoObjectsToTrace(void* aPossibleJSHolder) already_AddRefed CycleCollectedJSRuntime::GetPendingException() const { + MOZ_ASSERT(mJSRuntime); + nsCOMPtr out = mPendingException; return out.forget(); } @@ -1068,30 +1091,36 @@ CycleCollectedJSRuntime::GetPendingException() const void CycleCollectedJSRuntime::SetPendingException(nsIException* aException) { + MOZ_ASSERT(mJSRuntime); mPendingException = aException; } std::queue>& CycleCollectedJSRuntime::GetPromiseMicroTaskQueue() { + MOZ_ASSERT(mJSRuntime); return mPromiseMicroTaskQueue; } nsCycleCollectionParticipant* CycleCollectedJSRuntime::GCThingParticipant() { + MOZ_ASSERT(mJSRuntime); return &mGCThingCycleCollectorGlobal; } nsCycleCollectionParticipant* CycleCollectedJSRuntime::ZoneParticipant() { + MOZ_ASSERT(mJSRuntime); return &mJSZoneCycleCollectorGlobal; } nsresult CycleCollectedJSRuntime::TraverseRoots(nsCycleCollectionNoteRootCallback& aCb) { + MOZ_ASSERT(mJSRuntime); + TraverseNativeRoots(aCb); NoteWeakMapsTracer trc(mJSRuntime, aCb); @@ -1108,6 +1137,8 @@ CycleCollectedJSRuntime::TraverseRoots(nsCycleCollectionNoteRootCallback& aCb) bool CycleCollectedJSRuntime::UsefulToMergeZones() const { + MOZ_ASSERT(mJSRuntime); + if (!NS_IsMainThread()) { return false; } @@ -1137,6 +1168,7 @@ CycleCollectedJSRuntime::UsefulToMergeZones() const void CycleCollectedJSRuntime::FixWeakMappingGrayBits() const { + MOZ_ASSERT(mJSRuntime); MOZ_ASSERT(!JS::IsIncrementalGCInProgress(mJSRuntime), "Don't call FixWeakMappingGrayBits during a GC."); FixWeakMappingGrayBitsTracer fixer(mJSRuntime); @@ -1146,12 +1178,15 @@ CycleCollectedJSRuntime::FixWeakMappingGrayBits() const bool CycleCollectedJSRuntime::AreGCGrayBitsValid() const { + MOZ_ASSERT(mJSRuntime); return js::AreGCGrayBitsValid(mJSRuntime); } void CycleCollectedJSRuntime::GarbageCollect(uint32_t aReason) const { + MOZ_ASSERT(mJSRuntime); + MOZ_ASSERT(aReason < JS::gcreason::NUM_REASONS); JS::gcreason::Reason gcreason = static_cast(aReason); @@ -1160,8 +1195,10 @@ CycleCollectedJSRuntime::GarbageCollect(uint32_t aReason) const } void -CycleCollectedJSRuntime::JSObjectsTenured(JSRuntime* aRuntime) +CycleCollectedJSRuntime::JSObjectsTenured() { + MOZ_ASSERT(mJSRuntime); + for (auto iter = mNurseryObjects.Iter(); !iter.Done(); iter.Next()) { nsWrapperCache* cache = iter.Get(); JSObject* wrapper = cache->GetWrapperPreserveColor(); @@ -1186,6 +1223,7 @@ for (auto iter = mPreservedNurseryObjects.Iter(); !iter.Done(); iter.Next()) { void CycleCollectedJSRuntime::NurseryWrapperAdded(nsWrapperCache* aCache) { + MOZ_ASSERT(mJSRuntime); MOZ_ASSERT(aCache); MOZ_ASSERT(aCache->GetWrapperPreserveColor()); MOZ_ASSERT(!JS::ObjectIsTenured(aCache->GetWrapperPreserveColor())); @@ -1195,6 +1233,8 @@ CycleCollectedJSRuntime::NurseryWrapperAdded(nsWrapperCache* aCache) void CycleCollectedJSRuntime::NurseryWrapperPreserved(JSObject* aWrapper) { + MOZ_ASSERT(mJSRuntime); + mPreservedNurseryObjects.InfallibleAppend( JS::PersistentRooted(mJSRuntime, aWrapper)); } @@ -1204,6 +1244,8 @@ CycleCollectedJSRuntime::DeferredFinalize(DeferredFinalizeAppendFunction aAppend DeferredFinalizeFunction aFunc, void* aThing) { + MOZ_ASSERT(mJSRuntime); + void* thingArray = nullptr; bool hadThingArray = mDeferredFinalizerTable.Get(aFunc, &thingArray); @@ -1216,6 +1258,8 @@ CycleCollectedJSRuntime::DeferredFinalize(DeferredFinalizeAppendFunction aAppend void CycleCollectedJSRuntime::DeferredFinalize(nsISupports* aSupports) { + MOZ_ASSERT(mJSRuntime); + typedef DeferredFinalizerImpl Impl; DeferredFinalize(Impl::AppendDeferredFinalizePointer, Impl::DeferredFinalize, aSupports); @@ -1224,12 +1268,14 @@ CycleCollectedJSRuntime::DeferredFinalize(nsISupports* aSupports) void CycleCollectedJSRuntime::DumpJSHeap(FILE* aFile) { + MOZ_ASSERT(mJSRuntime); js::DumpHeap(Runtime(), aFile, js::CollectNurseryBeforeDump); } void CycleCollectedJSRuntime::ProcessStableStateQueue() { + MOZ_ASSERT(mJSRuntime); MOZ_RELEASE_ASSERT(!mDoingStableStates); mDoingStableStates = true; @@ -1245,6 +1291,7 @@ CycleCollectedJSRuntime::ProcessStableStateQueue() void CycleCollectedJSRuntime::ProcessMetastableStateQueue(uint32_t aRecursionDepth) { + MOZ_ASSERT(mJSRuntime); MOZ_RELEASE_ASSERT(!mDoingStableStates); mDoingStableStates = true; @@ -1275,6 +1322,8 @@ CycleCollectedJSRuntime::ProcessMetastableStateQueue(uint32_t aRecursionDepth) void CycleCollectedJSRuntime::AfterProcessTask(uint32_t aRecursionDepth) { + MOZ_ASSERT(mJSRuntime); + // See HTML 6.1.4.2 Processing model // Execute any events that were waiting for a microtask to complete. @@ -1295,12 +1344,15 @@ CycleCollectedJSRuntime::AfterProcessTask(uint32_t aRecursionDepth) void CycleCollectedJSRuntime::AfterProcessMicrotask() { + MOZ_ASSERT(mJSRuntime); AfterProcessMicrotask(RecursionDepth()); } void CycleCollectedJSRuntime::AfterProcessMicrotask(uint32_t aRecursionDepth) { + MOZ_ASSERT(mJSRuntime); + // Between microtasks, execute any events that were waiting for a microtask // to complete. ProcessMetastableStateQueue(aRecursionDepth); @@ -1322,6 +1374,8 @@ CycleCollectedJSRuntime::RunInStableState(already_AddRefed&& aRunna void CycleCollectedJSRuntime::RunInMetastableState(already_AddRefed&& aRunnable) { + MOZ_ASSERT(mJSRuntime); + RunInMetastableStateData data; data.mRunnable = aRunnable; @@ -1440,6 +1494,8 @@ IncrementalFinalizeRunnable::Run() void CycleCollectedJSRuntime::FinalizeDeferredThings(DeferredFinalizeType aType) { + MOZ_ASSERT(mJSRuntime); + /* * If the previous GC created a runnable to finalize objects * incrementally, and if it hasn't finished yet, finish it now. We @@ -1478,6 +1534,8 @@ void CycleCollectedJSRuntime::AnnotateAndSetOutOfMemory(OOMState* aStatePtr, OOMState aNewState) { + MOZ_ASSERT(mJSRuntime); + *aStatePtr = aNewState; #ifdef MOZ_CRASHREPORTER CrashReporter::AnnotateCrashReport(aStatePtr == &mOutOfMemoryState @@ -1494,9 +1552,12 @@ CycleCollectedJSRuntime::AnnotateAndSetOutOfMemory(OOMState* aStatePtr, void CycleCollectedJSRuntime::OnGC(JSGCStatus aStatus) { + MOZ_ASSERT(mJSRuntime); + switch (aStatus) { case JSGC_BEGIN: nsCycleCollector_prepareForGarbageCollection(); + mZonesWaitingForGC.Clear(); break; case JSGC_END: { #ifdef MOZ_CRASHREPORTER @@ -1523,6 +1584,8 @@ CycleCollectedJSRuntime::OnGC(JSGCStatus aStatus) void CycleCollectedJSRuntime::OnOutOfMemory() { + MOZ_ASSERT(mJSRuntime); + AnnotateAndSetOutOfMemory(&mOutOfMemoryState, OOMState::Reporting); CustomOutOfMemoryCallback(); AnnotateAndSetOutOfMemory(&mOutOfMemoryState, OOMState::Reported); @@ -1531,7 +1594,22 @@ CycleCollectedJSRuntime::OnOutOfMemory() void CycleCollectedJSRuntime::OnLargeAllocationFailure() { + MOZ_ASSERT(mJSRuntime); + AnnotateAndSetOutOfMemory(&mLargeAllocationFailureState, OOMState::Reporting); CustomLargeAllocationFailureCallback(); AnnotateAndSetOutOfMemory(&mLargeAllocationFailureState, OOMState::Reported); } + +void +CycleCollectedJSRuntime::PrepareWaitingZonesForGC() +{ + if (mZonesWaitingForGC.Count() == 0) { + JS::PrepareForFullGC(Runtime()); + } else { + for (auto iter = mZonesWaitingForGC.Iter(); !iter.Done(); iter.Next()) { + JS::PrepareZoneForGC(iter.Get()->GetKey()); + } + mZonesWaitingForGC.Clear(); + } +} diff --git a/xpcom/base/CycleCollectedJSRuntime.h b/xpcom/base/CycleCollectedJSRuntime.h index 8cf8137c25..a1e250325d 100644 --- a/xpcom/base/CycleCollectedJSRuntime.h +++ b/xpcom/base/CycleCollectedJSRuntime.h @@ -19,6 +19,7 @@ #include "nsDataHashtable.h" #include "nsHashKeys.h" #include "nsTArray.h" +#include "nsTHashtable.h" class nsCycleCollectionNoteRootCallback; class nsIException; @@ -134,11 +135,13 @@ class CycleCollectedJSRuntime friend class JSZoneParticipant; friend class IncrementalFinalizeRunnable; protected: - CycleCollectedJSRuntime(JSRuntime* aParentRuntime, - uint32_t aMaxBytes, - uint32_t aMaxNurseryBytes); + CycleCollectedJSRuntime(); virtual ~CycleCollectedJSRuntime(); + nsresult Initialize(JSRuntime* aParentRuntime, + uint32_t aMaxBytes, + uint32_t aMaxNurseryBytes); + size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; void UnmarkSkippableJSHolders(); @@ -218,7 +221,9 @@ private: void TraceNativeGrayRoots(JSTracer* aTracer); void AfterProcessMicrotask(uint32_t aRecursionDepth); +public: void ProcessStableStateQueue(); +private: void ProcessMetastableStateQueue(uint32_t aRecursionDepth); public: @@ -291,7 +296,7 @@ public: void NurseryWrapperAdded(nsWrapperCache* aCache); void NurseryWrapperPreserved(JSObject* aWrapper); - void JSObjectsTenured(JSRuntime* aRuntime); + void JSObjectsTenured(); void DeferredFinalize(DeferredFinalizeAppendFunction aAppendFunc, DeferredFinalizeFunction aFunc, @@ -330,6 +335,18 @@ public: // isn't one. static CycleCollectedJSRuntime* Get(); + // Add aZone to the set of zones waiting for a GC. + void AddZoneWaitingForGC(JS::Zone* aZone) + { + mZonesWaitingForGC.PutEntry(aZone); + } + + // Prepare any zones for GC that have been passed to AddZoneWaitingForGC() + // since the last GC or since the last call to PrepareWaitingZonesForGC(), + // whichever was most recent. If there were no such zones, prepare for a + // full GC. + void PrepareWaitingZonesForGC(); + // Storage for watching rejected promises waiting for some client to // consume their rejection. // We store values as `nsISupports` to avoid adding compile-time dependencies @@ -382,6 +399,8 @@ private: SegmentedVector, kSegmentSize, InfallibleAllocPolicy> mPreservedNurseryObjects; + + nsTHashtable> mZonesWaitingForGC; }; void TraceScriptHolder(nsISupports* aHolder, JSTracer* aTracer); diff --git a/xpcom/base/LogModulePrefWatcher.cpp b/xpcom/base/LogModulePrefWatcher.cpp new file mode 100644 index 0000000000..b0920b1474 --- /dev/null +++ b/xpcom/base/LogModulePrefWatcher.cpp @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "LogModulePrefWatcher.h" + +#include "mozilla/Logging.h" +#include "mozilla/Preferences.h" +#include "nsString.h" + +static const char kLoggingPrefPrefix[] = "logging."; + +namespace mozilla { + +NS_IMPL_ISUPPORTS(LogModulePrefWatcher, nsIObserver) + +/** + * Loads the log level from the given pref and updates the corresponding + * LogModule. + */ +void +LoadPrefValue(const char* aName) +{ + LogLevel logLevel = LogLevel::Disabled; + + int32_t prefLevel = 0; + nsAutoCString prefStr; + + if (Preferences::GetInt(aName, &prefLevel) == NS_OK) { + logLevel = ToLogLevel(prefLevel); + } else if (Preferences::GetCString(aName, &prefStr) == NS_OK) { + if (prefStr.LowerCaseEqualsLiteral("error")) { + logLevel = LogLevel::Error; + } else if (prefStr.LowerCaseEqualsLiteral("warning")) { + logLevel = LogLevel::Warning; + } else if (prefStr.LowerCaseEqualsLiteral("info")) { + logLevel = LogLevel::Info; + } else if (prefStr.LowerCaseEqualsLiteral("debug")) { + logLevel = LogLevel::Debug; + } else if (prefStr.LowerCaseEqualsLiteral("verbose")) { + logLevel = LogLevel::Verbose; + } + } + + const char* moduleName = aName + strlen(kLoggingPrefPrefix); + LogModule::Get(moduleName)->SetLevel(logLevel); +} + +void +LoadExistingPrefs() +{ + uint32_t count; + char** names; + nsresult rv = Preferences::GetRootBranch()-> + GetChildList(kLoggingPrefPrefix, &count, &names); + if (NS_SUCCEEDED(rv) && count) { + for (size_t i = 0; i < count; i++) { + LoadPrefValue(names[i]); + } + NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, names); + } +} + +LogModulePrefWatcher::LogModulePrefWatcher() +{ +} + +void +LogModulePrefWatcher::RegisterPrefWatcher() +{ + RefPtr prefWatcher = new LogModulePrefWatcher(); + Preferences::AddStrongObserver(prefWatcher, kLoggingPrefPrefix); + LoadExistingPrefs(); +} + +NS_IMETHODIMP +LogModulePrefWatcher::Observe(nsISupports* aSubject, const char* aTopic, + const char16_t* aData) +{ + if (strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, aTopic) == 0) { + NS_LossyConvertUTF16toASCII prefName(aData); + LoadPrefValue(prefName.get()); + } + + return NS_OK; +} + +} // namespace mozilla diff --git a/xpcom/base/LogModulePrefWatcher.h b/xpcom/base/LogModulePrefWatcher.h new file mode 100644 index 0000000000..657e54f011 --- /dev/null +++ b/xpcom/base/LogModulePrefWatcher.h @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef LogModulePrefWatcher_h +#define LogModulePrefWatcher_h + +#include "nsIObserver.h" + +namespace mozilla { + +/** + * Watches for changes to "logging.*" prefs and then updates the appropriate + * LogModule's log level. Both the integer and string versions of the LogLevel + * enum are supported. + * + * For example setting the pref "logging.Foo" to "Verbose" will set the + * LogModule for "Foo" to the LogLevel::Verbose level. Setting "logging.Bar" to + * 4 would set the LogModule for "Bar" to the LogLevel::Debug level. + */ +class LogModulePrefWatcher : public nsIObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVER + + /** + * Starts observing logging pref changes. + */ + static void RegisterPrefWatcher(); + +private: + LogModulePrefWatcher(); + virtual ~LogModulePrefWatcher() + { + } +}; +} // namespace mozilla + +#endif // LogModulePrefWatcher_h diff --git a/xpcom/base/Logging.cpp b/xpcom/base/Logging.cpp index d1d6949010..2d44d152ee 100644 --- a/xpcom/base/Logging.cpp +++ b/xpcom/base/Logging.cpp @@ -9,32 +9,102 @@ #include #include "mozilla/ClearOnShutdown.h" +#include "mozilla/FileUtils.h" #include "mozilla/Mutex.h" #include "mozilla/StaticPtr.h" +#include "mozilla/Snprintf.h" #include "nsClassHashtable.h" +#include "nsDebug.h" +#include "NSPRLogModulesParser.h" + +#include "prenv.h" +#include "prprf.h" +#ifdef XP_WIN +#include +#else +#include +#include +#endif // NB: Initial amount determined by auditing the codebase for the total amount // of unique module names and padding up to the next power of 2. const uint32_t kInitialModuleCount = 256; namespace mozilla { -/** - * Safely converts an integer into a valid LogLevel. - */ + +namespace detail { + +void log_print(const PRLogModuleInfo* aModule, + LogLevel aLevel, + const char* aFmt, ...) +{ + va_list ap; + va_start(ap, aFmt); + char* buff = PR_vsmprintf(aFmt, ap); + PR_LogPrint("%s", buff); + PR_smprintf_free(buff); + va_end(ap); +} + +void log_print(const LogModule* aModule, + LogLevel aLevel, + const char* aFmt, ...) +{ + va_list ap; + va_start(ap, aFmt); + aModule->Printv(aLevel, aFmt, ap); + va_end(ap); +} + +int log_pid() +{ +#ifdef XP_WIN + return _getpid(); +#else + return getpid(); +#endif +} + +} + LogLevel -Clamp(int32_t aLevel) +ToLogLevel(int32_t aLevel) { aLevel = std::min(aLevel, static_cast(LogLevel::Verbose)); aLevel = std::max(aLevel, static_cast(LogLevel::Disabled)); return static_cast(aLevel); } +const char* +ToLogStr(LogLevel aLevel) { + switch (aLevel) { + case LogLevel::Error: + return "E"; + case LogLevel::Warning: + return "W"; + case LogLevel::Info: + return "I"; + case LogLevel::Debug: + return "D"; + case LogLevel::Verbose: + return "V"; + case LogLevel::Disabled: + default: + MOZ_CRASH("Invalid log level."); + return ""; + } +} + class LogModuleManager { public: LogModuleManager() : mModulesLock("logmodules") , mModules(kInitialModuleCount) + , mOutFile(nullptr) + , mMainThread(PR_GetCurrentThread()) + , mAddTimestamp(false) + , mIsSync(false) { } @@ -44,30 +114,141 @@ public: // its destructor. } + /** + * Loads config from env vars if present. + */ + void Init() + { + bool shouldAppend = false; + bool addTimestamp = false; + bool isSync = false; + const char* modules = PR_GetEnv("NSPR_LOG_MODULES"); + NSPRLogModulesParser(modules, + [&shouldAppend, &addTimestamp, &isSync] + (const char* aName, LogLevel aLevel) mutable { + if (strcmp(aName, "append") == 0) { + shouldAppend = true; + } else if (strcmp(aName, "timestamp") == 0) { + addTimestamp = true; + } else if (strcmp(aName, "sync") == 0) { + isSync = true; + } else { + LogModule::Get(aName)->SetLevel(aLevel); + } + }); + + mAddTimestamp = addTimestamp; + mIsSync = isSync; + + const char* logFile = PR_GetEnv("NSPR_LOG_FILE"); + if (logFile && logFile[0]) { + static const char kPIDToken[] = "%PID"; + const char* pidTokenPtr = strstr(logFile, kPIDToken); + char buf[2048]; + if (pidTokenPtr && + snprintf_literal(buf, "%.*s%d%s", + static_cast(pidTokenPtr - logFile), logFile, + detail::log_pid(), + pidTokenPtr + strlen(kPIDToken)) > 0) + { + logFile = buf; + } + + mOutFile = fopen(logFile, shouldAppend ? "a" : "w"); + } + } + LogModule* CreateOrGetModule(const char* aName) { OffTheBooksMutexAutoLock guard(mModulesLock); LogModule* module = nullptr; if (!mModules.Get(aName, &module)) { - // Create the PRLogModule, this will read any env vars that set the log - // level ahead of time. The module is held internally by NSPR, so it's - // okay to drop the pointer when leaving this scope. - PRLogModuleInfo* prModule = PR_NewLogModule(aName); - - // NSPR does not impose a restriction on the values that log levels can - // be. LogModule uses the LogLevel enum class so we must clamp the value - // to a max of Verbose. - LogLevel logLevel = Clamp(prModule->level); - module = new LogModule(logLevel); + module = new LogModule(aName, LogLevel::Disabled); mModules.Put(aName, module); } return module; } + void Print(const char* aName, LogLevel aLevel, const char* aFmt, va_list aArgs) + { + const size_t kBuffSize = 1024; + char buff[kBuffSize]; + + char* buffToWrite = buff; + + // For backwards compat we need to use the NSPR format string versions + // of sprintf and friends and then hand off to printf. + va_list argsCopy; + va_copy(argsCopy, aArgs); + size_t charsWritten = PR_vsnprintf(buff, kBuffSize, aFmt, argsCopy); + va_end(argsCopy); + + if (charsWritten == kBuffSize - 1) { + // We may have maxed out, allocate a buffer instead. + buffToWrite = PR_vsmprintf(aFmt, aArgs); + charsWritten = strlen(buffToWrite); + } + + // Determine if a newline needs to be appended to the message. + const char* newline = ""; + if (charsWritten == 0 || buffToWrite[charsWritten - 1] != '\n') { + newline = "\n"; + } + + FILE* out = mOutFile ? mOutFile : stderr; + + // This differs from the NSPR format in that we do not output the + // opaque system specific thread pointer (ie pthread_t) cast + // to a long. The address of the current PR_Thread continues to be + // prefixed. + // + // Additionally we prefix the output with the abbreviated log level + // and the module name. + PRThread *currentThread = PR_GetCurrentThread(); + const char *currentThreadName = (mMainThread == currentThread) + ? "Main Thread" + : PR_GetThreadName(currentThread); + + char noNameThread[40]; + if (!currentThreadName) { + snprintf_literal(noNameThread, "Unnamed thread %p", currentThread); + currentThreadName = noNameThread; + } + + if (!mAddTimestamp) { + fprintf_stderr(out, + "[%s]: %s/%s %s%s", + currentThreadName, ToLogStr(aLevel), + aName, buffToWrite, newline); + } else { + PRExplodedTime now; + PR_ExplodeTime(PR_Now(), PR_GMTParameters, &now); + fprintf_stderr( + out, + "%04d-%02d-%02d %02d:%02d:%02d.%06d UTC - [%s]: %s/%s %s%s", + now.tm_year, now.tm_month + 1, now.tm_mday, + now.tm_hour, now.tm_min, now.tm_sec, now.tm_usec, + currentThreadName, ToLogStr(aLevel), + aName, buffToWrite, newline); + } + + if (mIsSync) { + fflush(out); + } + + if (buffToWrite != buff) { + PR_smprintf_free(buffToWrite); + } + } + private: OffTheBooksMutex mModulesLock; nsClassHashtable mModules; + ScopedCloseFile mOutFile; + PRThread *mMainThread; + bool mAddTimestamp; + bool mIsSync; }; StaticAutoPtr sLogModuleManager; @@ -95,6 +276,16 @@ LogModule::Init() // before all logging is complete. And, yes, that means we leak, but // we're doing that intentionally. sLogModuleManager = new LogModuleManager(); + sLogModuleManager->Init(); +} + +void +LogModule::Printv(LogLevel aLevel, const char* aFmt, va_list aArgs) const +{ + MOZ_ASSERT(sLogModuleManager != nullptr); + + // Forward to LogModule manager w/ level and name + sLogModuleManager->Print(Name(), aLevel, aFmt, aArgs); } } // namespace mozilla diff --git a/xpcom/base/Logging.h b/xpcom/base/Logging.h index d2d73fb5dd..728194785f 100644 --- a/xpcom/base/Logging.h +++ b/xpcom/base/Logging.h @@ -7,6 +7,9 @@ #ifndef mozilla_logging_h #define mozilla_logging_h +#include +#include + #include "prlog.h" #include "mozilla/Assertions.h" @@ -45,9 +48,16 @@ enum class LogLevel { Verbose, }; +/** + * Safely converts an integer into a valid LogLevel. + */ +LogLevel ToLogLevel(int32_t aLevel); + class LogModule { public: + ~LogModule() { ::free(mName); } + /** * Retrieves the module with the given name. If it does not already exist * it will be created. @@ -74,14 +84,33 @@ public: */ LogLevel Level() const { return mLevel; } + /** + * Sets the log module's level. + */ + void SetLevel(LogLevel level) { mLevel = level; } + + /** + * Print a log message for this module. + */ + void Printv(LogLevel aLevel, const char* aFmt, va_list aArgs) const; + + /** + * Retrieves the module name. + */ + const char* Name() const { return mName; } + private: friend class LogModuleManager; - explicit LogModule(LogLevel aLevel) : mLevel(aLevel) {} + explicit LogModule(const char* aName, LogLevel aLevel) + : mName(strdup(aName)), mLevel(aLevel) + { + } LogModule(LogModule&) = delete; LogModule& operator=(const LogModule&) = delete; + char* mName; Atomic mLevel; }; @@ -133,21 +162,43 @@ inline bool log_test(const PRLogModuleInfo* module, LogLevel level) { return module && module->level >= static_cast(level); } +/** + * A rather inefficient wrapper for PR_LogPrint that always allocates. + * PR_LogModuleInfo is deprecated so it's not worth the effort to do + * any better. + */ +void log_print(const PRLogModuleInfo* aModule, + LogLevel aLevel, + const char* aFmt, ...); + inline bool log_test(const LogModule* module, LogLevel level) { MOZ_ASSERT(level != LogLevel::Disabled); return module && module->ShouldLog(level); } +#if !defined(MOZILLA_XPCOMRT_API) +void log_print(const LogModule* aModule, + LogLevel aLevel, + const char* aFmt, ...); +#else +inline void log_print(const LogModule* aModule, LogLevel aLevel, const char* aFmt, ...) {} +#endif } // namespace detail } // namespace mozilla + #define MOZ_LOG_TEST(_module,_level) mozilla::detail::log_test(_module, _level) +// Helper macro used convert MOZ_LOG's third parameter, |_args|, from a +// parenthesized form to a varargs form. For example: +// ("%s", "a message") => "%s", "a message" +#define MOZ_LOG_EXPAND_ARGS(...) __VA_ARGS__ + #define MOZ_LOG(_module,_level,_args) \ PR_BEGIN_MACRO \ if (MOZ_LOG_TEST(_module,_level)) { \ - PR_LogPrint _args; \ + mozilla::detail::log_print(_module, _level, MOZ_LOG_EXPAND_ARGS _args); \ } \ PR_END_MACRO diff --git a/xpcom/base/NSPRLogModulesParser.cpp b/xpcom/base/NSPRLogModulesParser.cpp new file mode 100644 index 0000000000..43c80e915f --- /dev/null +++ b/xpcom/base/NSPRLogModulesParser.cpp @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "NSPRLogModulesParser.h" + +#include "mozilla/Tokenizer.h" + +const char kDelimiters[] = ", "; +const char kAdditionalWordChars[] = "_-"; + +namespace mozilla { + +void +NSPRLogModulesParser(const char* aLogModules, + Function aCallback) +{ + if (!aLogModules) { + return; + } + + Tokenizer parser(aLogModules, kDelimiters, kAdditionalWordChars); + nsAutoCString moduleName; + + // Format: LOG_MODULES="Foo:2,Bar, Baz:5" + while (parser.ReadWord(moduleName)) { + // Next should be :, default to Error if not provided. + LogLevel logLevel = LogLevel::Error; + if (parser.CheckChar(':')) { + // Check if a negative value is provided. + int32_t multiplier = 1; + if (parser.CheckChar([](const char aChar) { return aChar == '-'; })) { + multiplier = -1; + } + + // NB: If a level isn't provided after the ':' we assume the default + // Error level is desired. This differs from NSPR which will stop + // processing the log module string in this case. + int32_t level; + if (parser.ReadInteger(&level)) { + logLevel = ToLogLevel(level * multiplier); + } + } + + aCallback(moduleName.get(), logLevel); + + // Skip ahead to the next token. + parser.SkipWhites(); + } +} + +} // namespace mozilla diff --git a/xpcom/base/NSPRLogModulesParser.h b/xpcom/base/NSPRLogModulesParser.h new file mode 100644 index 0000000000..664bd73e68 --- /dev/null +++ b/xpcom/base/NSPRLogModulesParser.h @@ -0,0 +1,22 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/Logging.h" +#include "mozilla/Function.h" + +namespace mozilla { + +/** + * Helper function that parses the legacy NSPR_LOG_MODULES env var format + * for specifying log levels and logging options. + * + * @param aLogModules The log modules configuration string. + * @param aCallback The callback to invoke for each log module config entry. + */ +void NSPRLogModulesParser(const char* aLogModules, + Function aCallback); + +} // namespace mozilla diff --git a/xpcom/base/StaticMutex.h b/xpcom/base/StaticMutex.h index 5c72d52b80..731e694058 100644 --- a/xpcom/base/StaticMutex.h +++ b/xpcom/base/StaticMutex.h @@ -26,7 +26,7 @@ namespace mozilla { * initialized to 0 in order to initialize mMutex. It is only safe to use * StaticMutex as a global or static variable. */ -class StaticMutex +class MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS StaticMutex { public: // In debug builds, check that mMutex is initialized for us as we expect by diff --git a/xpcom/base/moz.build b/xpcom/base/moz.build index b1acae9ed5..f010dd348b 100644 --- a/xpcom/base/moz.build +++ b/xpcom/base/moz.build @@ -110,6 +110,7 @@ UNIFIED_SOURCES += [ 'HoldDropJSObjects.cpp', 'JSObjectHolder.cpp', 'Logging.cpp', + 'LogModulePrefWatcher.cpp', 'nsConsoleMessage.cpp', 'nsConsoleService.cpp', 'nsCycleCollector.cpp', @@ -122,6 +123,7 @@ UNIFIED_SOURCES += [ 'nsMemoryInfoDumper.cpp', 'nsMemoryReporterManager.cpp', 'nsMessageLoop.cpp', + 'NSPRLogModulesParser.cpp', 'nsSecurityConsoleMessage.cpp', 'nsStatusReporterManager.cpp', 'nsSystemInfo.cpp', diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index 1622132fac..345164f74b 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -1483,6 +1483,26 @@ struct CCGraphDescriber : public LinkedListElement Type mType; }; +class LogStringMessageAsync : public nsCancelableRunnable +{ +public: + explicit LogStringMessageAsync(const nsAString& aMsg) : mMsg(aMsg) + {} + + NS_IMETHOD Run() override + { + nsCOMPtr cs = + do_GetService(NS_CONSOLESERVICE_CONTRACTID); + if (cs) { + cs->LogStringMessage(mMsg.get()); + } + return NS_OK; + } + +private: + nsString mMsg; +}; + class nsCycleCollectorLogSinkToFile final : public nsICycleCollectorLogSink { public: @@ -1681,17 +1701,16 @@ private: aLog->mFile = logFileFinalDestination; // Log to the error console. - nsCOMPtr cs = - do_GetService(NS_CONSOLESERVICE_CONTRACTID); - if (cs) { - // Copy out the path. - nsAutoString logPath; - logFileFinalDestination->GetPath(logPath); + nsAutoString logPath; + logFileFinalDestination->GetPath(logPath); + nsAutoString msg = aCollectorKind + + NS_LITERAL_STRING(" Collector log dumped to ") + logPath; - nsString msg = aCollectorKind + - NS_LITERAL_STRING(" Collector log dumped to ") + logPath; - cs->LogStringMessage(msg.get()); - } + // We don't want any JS to run between ScanRoots and CollectWhite calls, + // and since ScanRoots calls this method, better to log the message + // asynchronously. + RefPtr log = new LogStringMessageAsync(msg); + NS_DispatchToCurrentThread(log); return NS_OK; } @@ -2628,7 +2647,7 @@ class SnowWhiteKiller : public TraceCallbacks ObjectsVector; public: - SnowWhiteKiller(nsCycleCollector* aCollector, uint32_t aMaxCount) + explicit SnowWhiteKiller(nsCycleCollector* aCollector) : mCollector(aCollector) , mObjects(kSegmentSize) { @@ -2731,10 +2750,10 @@ class RemoveSkippableVisitor : public SnowWhiteKiller { public: RemoveSkippableVisitor(nsCycleCollector* aCollector, - uint32_t aMaxCount, bool aRemoveChildlessNodes, + bool aRemoveChildlessNodes, bool aAsyncSnowWhiteFreeing, CC_ForgetSkippableCallback aCb) - : SnowWhiteKiller(aCollector, aAsyncSnowWhiteFreeing ? 0 : aMaxCount) + : SnowWhiteKiller(aCollector) , mRemoveChildlessNodes(aRemoveChildlessNodes) , mAsyncSnowWhiteFreeing(aAsyncSnowWhiteFreeing) , mDispatchedDeferredDeletion(false) @@ -2791,7 +2810,7 @@ nsPurpleBuffer::RemoveSkippable(nsCycleCollector* aCollector, bool aAsyncSnowWhiteFreeing, CC_ForgetSkippableCallback aCb) { - RemoveSkippableVisitor visitor(aCollector, Count(), aRemoveChildlessNodes, + RemoveSkippableVisitor visitor(aCollector, aRemoveChildlessNodes, aAsyncSnowWhiteFreeing, aCb); VisitEntries(visitor); } @@ -2810,7 +2829,7 @@ nsCycleCollector::FreeSnowWhite(bool aUntilNoSWInPurpleBuffer) bool hadSnowWhiteObjects = false; do { - SnowWhiteKiller visitor(this, mPurpleBuf.Count()); + SnowWhiteKiller visitor(this); mPurpleBuf.VisitEntries(visitor); hadSnowWhiteObjects = hadSnowWhiteObjects || visitor.HasSnowWhiteObjects(); @@ -3253,9 +3272,15 @@ nsCycleCollector::CollectWhite() if (pinfo->mColor == white && pinfo->mParticipant) { if (pinfo->IsGrayJS()) { ++numWhiteGCed; + JS::Zone* zone; if (MOZ_UNLIKELY(pinfo->mParticipant == zoneParticipant)) { ++numWhiteJSZones; + zone = static_cast(pinfo->mPointer); + } else { + JS::GCCellPtr ptr(pinfo->mPointer, js::GCThingTraceKind(pinfo->mPointer)); + zone = JS::GetTenuredGCThingZone(ptr); } + mJSRuntime->AddZoneWaitingForGC(zone); } else { whiteNodes.InfallibleAppend(pinfo); pinfo->mParticipant->Root(pinfo->mPointer); @@ -4147,6 +4172,11 @@ nsCycleCollector_shutdown() data->mCollector->Shutdown(); data->mCollector = nullptr; + if (data->mRuntime) { + // Run any remaining tasks that may have been enqueued via + // RunInStableState during the final cycle collection. + data->mRuntime->ProcessStableStateQueue(); + } if (!data->mRuntime) { delete data; sCollectorData.set(nullptr); diff --git a/xpcom/base/nsIProgrammingLanguage.idl b/xpcom/base/nsIProgrammingLanguage.idl index 17596300b6..57621168b8 100644 --- a/xpcom/base/nsIProgrammingLanguage.idl +++ b/xpcom/base/nsIProgrammingLanguage.idl @@ -7,27 +7,19 @@ #include "nsISupports.idl" /** - * Enumeration of Programming Languages + * Legacy constants for specifying programming languages. + * + * JAVASCRIPT is needed to avoid breaking addons that use it in nsIClassInfo + * to define fields that are no longer needed. + * + * UNKNOWN and JAVASCRIPT are also used in implementations of + * nsIStackFrame::language. */ -[scriptable, uuid(ea604e90-40ba-11d5-90bb-0010a4e73d9a)] +[scriptable, uuid(02ad9f22-3c98-46f3-be4e-2f5c9299e29a)] interface nsIProgrammingLanguage : nsISupports { - /** - * Identifiers for programming languages. - */ const uint32_t UNKNOWN = 0; - const uint32_t CPLUSPLUS = 1; + // 1 is unused. const uint32_t JAVASCRIPT = 2; - const uint32_t PYTHON = 3; - const uint32_t PERL = 4; - const uint32_t JAVA = 5; - const uint32_t ZX81_BASIC = 6; // it could happen :) - const uint32_t JAVASCRIPT2 = 7; - const uint32_t RUBY = 8; - const uint32_t PHP = 9; - const uint32_t TCL = 10; - // This list can grow indefinitely. Just don't ever change an existing item. - const uint32_t MAX = 10; // keep this as the largest index. - }; diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index 7de5db0dcc..37b4a23747 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -24,6 +24,7 @@ #include "mozilla/Attributes.h" #include "mozilla/PodOperations.h" #include "mozilla/Preferences.h" +#include "mozilla/Scoped.h" #include "mozilla/Services.h" #include "mozilla/dom/PMemoryReportRequestParent.h" // for dom::MemoryReport #include "mozilla/dom/ContentParent.h" @@ -151,30 +152,6 @@ ResidentUniqueDistinguishedAmount(int64_t* aN) return GetProcSelfSmapsPrivate(aN); } -class ResidentUniqueReporter final : public nsIMemoryReporter -{ - ~ResidentUniqueReporter() {} - -public: - NS_DECL_ISUPPORTS - - NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport, - nsISupports* aData, bool aAnonymize) override - { - int64_t amount = 0; - nsresult rv = ResidentUniqueDistinguishedAmount(&amount); - NS_ENSURE_SUCCESS(rv, rv); - - return MOZ_COLLECT_REPORT( - "resident-unique", KIND_OTHER, UNITS_BYTES, amount, -"Memory mapped by the process that is present in physical memory and not " -"shared with any other processes. This is also known as the process's unique " -"set size (USS). This is the amount of RAM we'd expect to be freed if we " -"closed this process."); - } -}; -NS_IMPL_ISUPPORTS(ResidentUniqueReporter, nsIMemoryReporter) - #ifdef HAVE_MALLINFO #define HAVE_SYSTEM_HEAP_REPORTER 1 nsresult @@ -421,7 +398,10 @@ ResidentFastDistinguishedAmount(int64_t* aN) #elif defined(XP_MACOSX) #include +#include +#include #include +#include static bool GetTaskBasicInfo(struct task_basic_info* aTi) @@ -485,6 +465,100 @@ ResidentDistinguishedAmount(int64_t* aN) return ResidentDistinguishedAmountHelper(aN, /* doPurge = */ true); } +#define HAVE_RESIDENT_UNIQUE_REPORTER 1 + +static bool +InSharedRegion(mach_vm_address_t aAddr, cpu_type_t aType) +{ + mach_vm_address_t base; + mach_vm_address_t size; + + switch (aType) { + case CPU_TYPE_ARM: + base = SHARED_REGION_BASE_ARM; + size = SHARED_REGION_SIZE_ARM; + break; + case CPU_TYPE_I386: + base = SHARED_REGION_BASE_I386; + size = SHARED_REGION_SIZE_I386; + break; + case CPU_TYPE_X86_64: + base = SHARED_REGION_BASE_X86_64; + size = SHARED_REGION_SIZE_X86_64; + break; + default: + return false; + } + + return base <= aAddr && aAddr < (base + size); +} + +static nsresult +ResidentUniqueDistinguishedAmount(int64_t* aN) +{ + if (!aN) { + return NS_ERROR_FAILURE; + } + + cpu_type_t cpu_type; + size_t len = sizeof(cpu_type); + if (sysctlbyname("sysctl.proc_cputype", &cpu_type, &len, NULL, 0) != 0) { + return NS_ERROR_FAILURE; + } + + // Roughly based on libtop_update_vm_regions in + // http://www.opensource.apple.com/source/top/top-100.1.2/libtop.c + size_t privatePages = 0; + mach_vm_size_t size = 0; + for (mach_vm_address_t addr = MACH_VM_MIN_ADDRESS; ; addr += size) { + vm_region_top_info_data_t info; + mach_msg_type_number_t infoCount = VM_REGION_TOP_INFO_COUNT; + mach_port_t objectName; + + kern_return_t kr = + mach_vm_region(mach_task_self(), &addr, &size, VM_REGION_TOP_INFO, + reinterpret_cast(&info), + &infoCount, &objectName); + if (kr == KERN_INVALID_ADDRESS) { + // Done iterating VM regions. + break; + } else if (kr != KERN_SUCCESS) { + return NS_ERROR_FAILURE; + } + + if (InSharedRegion(addr, cpu_type) && info.share_mode != SM_PRIVATE) { + continue; + } + + switch (info.share_mode) { + case SM_LARGE_PAGE: + // NB: Large pages are not shareable and always resident. + case SM_PRIVATE: + privatePages += info.private_pages_resident; + privatePages += info.shared_pages_resident; + break; + case SM_COW: + privatePages += info.private_pages_resident; + if (info.ref_count == 1) { + // Treat copy-on-write pages as private if they only have one reference. + privatePages += info.shared_pages_resident; + } + break; + case SM_SHARED: + default: + break; + } + } + + vm_size_t pageSize; + if (host_page_size(mach_host_self(), &pageSize) != KERN_SUCCESS) { + pageSize = PAGE_SIZE; + } + + *aN = privatePages * pageSize; + return NS_OK; +} + #elif defined(XP_WIN) #include @@ -526,6 +600,55 @@ ResidentFastDistinguishedAmount(int64_t* aN) return ResidentDistinguishedAmount(aN); } +#define HAVE_RESIDENT_UNIQUE_REPORTER 1 + +static nsresult +ResidentUniqueDistinguishedAmount(int64_t* aN) +{ + // Determine how many entries we need. + PSAPI_WORKING_SET_INFORMATION tmp; + DWORD tmpSize = sizeof(tmp); + memset(&tmp, 0, tmpSize); + + HANDLE proc = GetCurrentProcess(); + QueryWorkingSet(proc, &tmp, tmpSize); + + // Fudge the size in case new entries are added between calls. + size_t entries = tmp.NumberOfEntries * 2; + + if (!entries) { + return NS_ERROR_FAILURE; + } + + DWORD infoArraySize = tmpSize + (entries * sizeof(PSAPI_WORKING_SET_BLOCK)); + mozilla::ScopedFreePtr infoArray( + static_cast(malloc(infoArraySize))); + + if (!infoArray) { + return NS_ERROR_FAILURE; + } + + if (!QueryWorkingSet(proc, infoArray, infoArraySize)) { + return NS_ERROR_FAILURE; + } + + entries = static_cast(infoArray->NumberOfEntries); + size_t privatePages = 0; + for (size_t i = 0; i < entries; i++) { + // Count shared pages that only one process is using as private. + if (!infoArray->WorkingSetInfo[i].Shared || + infoArray->WorkingSetInfo[i].ShareCount <= 1) { + privatePages++; + } + } + + SYSTEM_INFO si; + GetSystemInfo(&si); + + *aN = privatePages * si.dwPageSize; + return NS_OK; +} + #define HAVE_VSIZE_MAX_CONTIGUOUS_REPORTER 1 static nsresult VsizeMaxContiguousDistinguishedAmount(int64_t* aN) @@ -877,6 +1000,33 @@ NS_IMPL_ISUPPORTS(ResidentReporter, nsIMemoryReporter) #endif // HAVE_VSIZE_AND_RESIDENT_REPORTERS +#ifdef HAVE_RESIDENT_UNIQUE_REPORTER +class ResidentUniqueReporter final : public nsIMemoryReporter +{ + ~ResidentUniqueReporter() {} + +public: + NS_DECL_ISUPPORTS + + NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport, + nsISupports* aData, bool aAnonymize) override + { + int64_t amount = 0; + nsresult rv = ResidentUniqueDistinguishedAmount(&amount); + NS_ENSURE_SUCCESS(rv, rv); + + return MOZ_COLLECT_REPORT( + "resident-unique", KIND_OTHER, UNITS_BYTES, amount, +"Memory mapped by the process that is present in physical memory and not " +"shared with any other processes. This is also known as the process's unique " +"set size (USS). This is the amount of RAM we'd expect to be freed if we " +"closed this process."); + } +}; +NS_IMPL_ISUPPORTS(ResidentUniqueReporter, nsIMemoryReporter) + +#endif // HAVE_RESIDENT_UNIQUE_REPORTER + #ifdef HAVE_SYSTEM_HEAP_REPORTER class SystemHeapReporter final : public nsIMemoryReporter diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index 21e80f176d..54bae4cddc 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -31,6 +31,7 @@ #ifdef MOZ_WIDGET_GTK #include +#include #include #include #include "mozilla/Tokenizer.h" @@ -702,13 +703,33 @@ nsSystemInfo::Init() gtk_micro_version); } + nsAutoCString secondaryLibrary; if (gtkver_len > 0) { - rv = SetPropertyAsACString(NS_LITERAL_STRING("secondaryLibrary"), - nsDependentCString(gtkver, gtkver_len)); - if (NS_WARN_IF(NS_FAILED(rv))) { - return rv; + secondaryLibrary.Append(nsDependentCSubstring(gtkver, gtkver_len)); + } + + void* libpulse = dlopen("libpulse.so.0", RTLD_LAZY); + const char* libpulseVersion = "not-available"; + if (libpulse) { + auto pa_get_library_version = reinterpret_cast + (dlsym(libpulse, "pa_get_library_version")); + + if (pa_get_library_version) { + libpulseVersion = pa_get_library_version(); } } + + secondaryLibrary.AppendPrintf(",libpulse %s", libpulseVersion); + + if (libpulse) { + dlclose(libpulse); + } + + rv = SetPropertyAsACString(NS_LITERAL_STRING("secondaryLibrary"), + secondaryLibrary); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } #endif #ifdef MOZ_WIDGET_ANDROID diff --git a/xpcom/base/nsTraceRefcnt.cpp b/xpcom/base/nsTraceRefcnt.cpp index 0e7d972feb..6d88323f4f 100644 --- a/xpcom/base/nsTraceRefcnt.cpp +++ b/xpcom/base/nsTraceRefcnt.cpp @@ -470,14 +470,14 @@ DumpSerialNumbers(PLHashEntry* aHashEntry, int aIndex, void* aClosure) fprintf(outputFile, "%" PRIdPTR " @%p (%d references; %d from COMPtrs)\n", record->serialNumber, - NS_INT32_TO_PTR(aHashEntry->key), + aHashEntry->key, record->refCount, record->COMPtrCount); #else fprintf(outputFile, "%" PRIdPTR " @%p (%d references)\n", record->serialNumber, - NS_INT32_TO_PTR(aHashEntry->key), + aHashEntry->key, record->refCount); #endif #ifdef MOZ_STACKWALKING @@ -706,6 +706,7 @@ InitLog(const char* aEnvVar, const char* aMsg, FILE** aResult) } else { fprintf(stdout, "### %s defined -- unable to log %s to %s\n", aEnvVar, aMsg, fname.get()); + MOZ_ASSERT(false, "Tried and failed to create an XPCOM log"); } return stream != nullptr; } diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index 0ed0256dd7..39bd5efab5 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -248,7 +248,7 @@ #ifdef NS_NO_VTABLE #undef NS_NO_VTABLE #endif -#if defined(_MSC_VER) && !defined(__clang__) +#if defined(_MSC_VER) #define NS_NO_VTABLE __declspec(novtable) #else #define NS_NO_VTABLE diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index ffc4b40868..4c454e1ddf 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -79,6 +79,7 @@ #include "mozilla/Omnijar.h" #include "mozilla/Logging.h" +#include "LogModulePrefWatcher.h" using namespace mozilla; @@ -448,6 +449,20 @@ nsComponentManagerImpl::Init() nsCategoryManager::GetSingleton()->SuppressNotifications(false); RegisterWeakMemoryReporter(this); + + // NB: The logging preference watcher needs to be registered late enough in + // startup that it's okay to use the preference system, but also as soon as + // possible so that log modules enabled via preferences are turned on as + // early as possible. + // + // We can't initialize the preference watcher when the log module manager is + // initialized, as a number of things attempt to start logging before the + // preference system is initialized. + // + // The preference system is registered as a component so at this point during + // component manager initialization we know it is setup and we can register + // for notifications. + LogModulePrefWatcher::RegisterPrefWatcher(); #endif // Unfortunately, we can't register the nsCategoryManager memory reporter diff --git a/xpcom/glue/PLDHashTable.cpp b/xpcom/glue/PLDHashTable.cpp index 5885c994a9..fa121bbacd 100644 --- a/xpcom/glue/PLDHashTable.cpp +++ b/xpcom/glue/PLDHashTable.cpp @@ -274,33 +274,6 @@ PLDHashTable::Hash2(PLDHashNumber aHash, // uses the high order bits of mKeyHash, so this least-significant reservation // should not hurt the hash function's effectiveness much. -/* static */ MOZ_ALWAYS_INLINE bool -PLDHashTable::EntryIsFree(PLDHashEntryHdr* aEntry) -{ - return aEntry->mKeyHash == 0; -} -/* static */ MOZ_ALWAYS_INLINE bool -PLDHashTable::EntryIsRemoved(PLDHashEntryHdr* aEntry) -{ - return aEntry->mKeyHash == 1; -} -/* static */ MOZ_ALWAYS_INLINE bool -PLDHashTable::EntryIsLive(PLDHashEntryHdr* aEntry) -{ - return aEntry->mKeyHash >= 2; -} - -/* static */ MOZ_ALWAYS_INLINE void -PLDHashTable::MarkEntryFree(PLDHashEntryHdr* aEntry) -{ - aEntry->mKeyHash = 0; -} -/* static */ MOZ_ALWAYS_INLINE void -PLDHashTable::MarkEntryRemoved(PLDHashEntryHdr* aEntry) -{ - aEntry->mKeyHash = 1; -} - // Match an entry's mKeyHash against an unstored one computed from a key. /* static */ bool PLDHashTable::MatchEntryKeyhash(PLDHashEntryHdr* aEntry, PLDHashNumber aKeyHash) @@ -363,7 +336,7 @@ PLDHashTable::Clear() // distinction is a bit grotty but this function is hot enough that these // differences are worthwhile. template -PLDHashEntryHdr* PL_DHASH_FASTCALL +PLDHashEntryHdr* NS_FASTCALL PLDHashTable::SearchTable(const void* aKey, PLDHashNumber aKeyHash) { MOZ_ASSERT(mEntryStore.Get()); @@ -432,7 +405,7 @@ PLDHashTable::SearchTable(const void* aKey, PLDHashNumber aKeyHash) // structure. // Avoiding the need for |aKey| means we can avoid needing a way to map entries // to keys, which means callers can use complex key types more easily. -PLDHashEntryHdr* PL_DHASH_FASTCALL +MOZ_ALWAYS_INLINE PLDHashEntryHdr* PLDHashTable::FindFreeEntry(PLDHashNumber aKeyHash) { MOZ_ASSERT(mEntryStore.Get()); @@ -468,7 +441,6 @@ PLDHashTable::FindFreeEntry(PLDHashNumber aKeyHash) } // NOTREACHED - return nullptr; } bool @@ -784,12 +756,6 @@ PLDHashTable::Iterator::~Iterator() } } -bool -PLDHashTable::Iterator::Done() const -{ - return mNexts == mNextsLimit; -} - MOZ_ALWAYS_INLINE bool PLDHashTable::Iterator::IsOnNonLiveEntry() const { @@ -806,16 +772,6 @@ PLDHashTable::Iterator::MoveToNextEntry() } } -PLDHashEntryHdr* -PLDHashTable::Iterator::Get() const -{ - MOZ_ASSERT(!Done()); - - PLDHashEntryHdr* entry = reinterpret_cast(mCurrent); - MOZ_ASSERT(EntryIsLive(entry)); - return entry; -} - void PLDHashTable::Iterator::Next() { @@ -846,4 +802,3 @@ PLDHashTable::MarkImmutable() mChecker.SetNonWritable(); } #endif - diff --git a/xpcom/glue/PLDHashTable.h b/xpcom/glue/PLDHashTable.h index 327877477d..88a9f3ab5f 100644 --- a/xpcom/glue/PLDHashTable.h +++ b/xpcom/glue/PLDHashTable.h @@ -15,14 +15,6 @@ #include "mozilla/Types.h" #include "nscore.h" -#if defined(__GNUC__) && defined(__i386__) -#define PL_DHASH_FASTCALL __attribute__ ((regparm (3),stdcall)) -#elif defined(XP_WIN) -#define PL_DHASH_FASTCALL __fastcall -#else -#define PL_DHASH_FASTCALL -#endif - typedef uint32_t PLDHashNumber; class PLDHashTable; @@ -450,9 +442,21 @@ public: Iterator(Iterator&& aOther); ~Iterator(); - bool Done() const; // Have we finished? - PLDHashEntryHdr* Get() const; // Get the current entry. - void Next(); // Advance to the next entry. + // Have we finished? + bool Done() const { return mNexts == mNextsLimit; } + + // Get the current entry. + PLDHashEntryHdr* Get() const + { + MOZ_ASSERT(!Done()); + + PLDHashEntryHdr* entry = reinterpret_cast(mCurrent); + MOZ_ASSERT(EntryIsLive(entry)); + return entry; + } + + // Advance to the next entry. + void Next(); // Remove the current entry. Must only be called once per entry, and Get() // must not be called on that entry afterwards. @@ -498,11 +502,27 @@ private: static const PLDHashNumber kCollisionFlag = 1; - static bool EntryIsFree(PLDHashEntryHdr* aEntry); - static bool EntryIsRemoved(PLDHashEntryHdr* aEntry); - static bool EntryIsLive(PLDHashEntryHdr* aEntry); - static void MarkEntryFree(PLDHashEntryHdr* aEntry); - static void MarkEntryRemoved(PLDHashEntryHdr* aEntry); + static bool EntryIsFree(PLDHashEntryHdr* aEntry) + { + return aEntry->mKeyHash == 0; + } + static bool EntryIsRemoved(PLDHashEntryHdr* aEntry) + { + return aEntry->mKeyHash == 1; + } + static bool EntryIsLive(PLDHashEntryHdr* aEntry) + { + return aEntry->mKeyHash >= 2; + } + + static void MarkEntryFree(PLDHashEntryHdr* aEntry) + { + aEntry->mKeyHash = 0; + } + static void MarkEntryRemoved(PLDHashEntryHdr* aEntry) + { + aEntry->mKeyHash = 1; + } PLDHashNumber Hash1(PLDHashNumber aHash0); void Hash2(PLDHashNumber aHash, uint32_t& aHash2Out, uint32_t& aSizeMaskOut); @@ -522,10 +542,10 @@ private: enum SearchReason { ForSearchOrRemove, ForAdd }; template - PLDHashEntryHdr* PL_DHASH_FASTCALL + PLDHashEntryHdr* NS_FASTCALL SearchTable(const void* aKey, PLDHashNumber aKeyHash); - PLDHashEntryHdr* PL_DHASH_FASTCALL FindFreeEntry(PLDHashNumber aKeyHash); + PLDHashEntryHdr* FindFreeEntry(PLDHashNumber aKeyHash); bool ChangeTable(int aDeltaLog2); diff --git a/xpcom/glue/nsBaseHashtable.h b/xpcom/glue/nsBaseHashtable.h index 050e48c74e..d4a708b161 100644 --- a/xpcom/glue/nsBaseHashtable.h +++ b/xpcom/glue/nsBaseHashtable.h @@ -233,6 +233,7 @@ public: template nsBaseHashtableET::nsBaseHashtableET(KeyTypePointer aKey) : KeyClass(aKey) + , mData() { } diff --git a/xpcom/glue/standalone/nsXPCOMGlue.cpp b/xpcom/glue/standalone/nsXPCOMGlue.cpp index 65ae4d9622..30289041e2 100644 --- a/xpcom/glue/standalone/nsXPCOMGlue.cpp +++ b/xpcom/glue/standalone/nsXPCOMGlue.cpp @@ -30,7 +30,7 @@ static bool do_preload = false; #endif #if defined(SUNOS4) || defined(NEXTSTEP) || \ - defined(XP_DARWIN) || \ + defined(XP_MACOSX) || \ (defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__) #define LEADING_UNDERSCORE "_" #else @@ -431,6 +431,7 @@ XPCOMGlueEnablePreload() #endif #ifdef MOZ_GSLICE_INIT +#include class GSliceInit { public: @@ -440,10 +441,10 @@ public: // Disable the slice allocator, since jemalloc already uses similar layout // algorithms, and using a sub-allocator tends to increase fragmentation. // This must be done before g_thread_init() is called. - // GLib >= 2.36 initializes g_slice as a side effect of its various static - // initializers, so this needs to happen before GLib is loaded, which is + // glib >= 2.36 initializes g_slice as a side effect of its various static + // initializers, so this needs to happen before glib is loaded, which is // this is hooked in XPCOMGlueStartup before libxul is loaded. This - // relies on the main executable not depending on GLib. + // relies on the main executable not depending on glib. setenv("G_SLICE", "always-malloc", 1); } } @@ -453,7 +454,7 @@ public: if (sTop) { auto XRE_GlibInit = (void (*)(void)) GetSymbol(sTop->libHandle, "XRE_GlibInit"); - // Initialize GLib enough for G_SLICE to have an effect before it is unset. + // Initialize glib enough for G_SLICE to have an effect before it is unset. // unset. XRE_GlibInit(); } diff --git a/xpcom/libxpcomrt/XPCOMRTStubs.cpp b/xpcom/libxpcomrt/XPCOMRTStubs.cpp index 0820c002b3..ea8c95beae 100644 --- a/xpcom/libxpcomrt/XPCOMRTStubs.cpp +++ b/xpcom/libxpcomrt/XPCOMRTStubs.cpp @@ -56,4 +56,10 @@ base::Histogram* GetKeyedHistogramById(ID id, const nsAString&) } } // namespace Telemetry + +namespace detail { + +void log_print(const PRLogModuleInfo* aModule, LogLevel aLevel, const char* aFmt, ...) {} + +} // namespace detail } // namespace mozilla diff --git a/xpcom/tests/TestAutoPtr.cpp b/xpcom/tests/TestAutoPtr.cpp index 59121d8807..0be217a4f4 100644 --- a/xpcom/tests/TestAutoPtr.cpp +++ b/xpcom/tests/TestAutoPtr.cpp @@ -319,8 +319,10 @@ int main() printf("\nTesting casts and equality tests.\n"); - if ((void*)(TestObject*)0x1000 == - (void*)(TestObjectBaseB*)(TestObject*)0x1000) + // This comparison is always false, as it should be. The extra parens + // suppress a -Wunreachable-code warning about printf being unreachable. + if (((void*)(TestObject*)0x1000) == + ((void*)(TestObjectBaseB*)(TestObject*)0x1000)) printf("\n\nAll these tests are meaningless!\n\n\n"); { @@ -395,7 +397,6 @@ int main() printf("Should destroy one |TestRefObject|:\n"); } - printf("\nTesting construction.\n"); { diff --git a/xpcom/tests/TestBlockingProcess.cpp b/xpcom/tests/TestBlockingProcess.cpp index 0dc781eff9..aadcf1d9e2 100644 --- a/xpcom/tests/TestBlockingProcess.cpp +++ b/xpcom/tests/TestBlockingProcess.cpp @@ -1,8 +1,6 @@ #include - + int main() { while(1) PR_Sleep(PR_SecondsToInterval(10)); - return 0; } - diff --git a/xpcom/tests/gtest/TestNSPRLogModulesParser.cpp b/xpcom/tests/gtest/TestNSPRLogModulesParser.cpp new file mode 100644 index 0000000000..e6884cabb6 --- /dev/null +++ b/xpcom/tests/gtest/TestNSPRLogModulesParser.cpp @@ -0,0 +1,89 @@ +#include "NSPRLogModulesParser.h" +#include "gtest/gtest.h" + +using namespace mozilla; + +TEST(NSPRLogModulesParser, Empty) +{ + bool callbackInvoked = false; + auto callback = [&](const char*, mozilla::LogLevel) mutable { callbackInvoked = true; }; + + mozilla::NSPRLogModulesParser(nullptr, callback); + EXPECT_FALSE(callbackInvoked); + + mozilla::NSPRLogModulesParser("", callback); + EXPECT_FALSE(callbackInvoked); +} + +TEST(NSPRLogModulesParser, DefaultLevel) +{ + bool callbackInvoked = false; + auto callback = + [&](const char* aName, mozilla::LogLevel aLevel) { + EXPECT_STREQ("Foo", aName); + EXPECT_EQ(mozilla::LogLevel::Error, aLevel); + callbackInvoked = true; + }; + + mozilla::NSPRLogModulesParser("Foo", callback); + EXPECT_TRUE(callbackInvoked); + + callbackInvoked = false; + mozilla::NSPRLogModulesParser("Foo:", callback); + EXPECT_TRUE(callbackInvoked); +} + +TEST(NSPRLogModulesParser, LevelSpecified) +{ + std::pair expected[] = { + { "Foo:0", mozilla::LogLevel::Disabled }, + { "Foo:1", mozilla::LogLevel::Error }, + { "Foo:2", mozilla::LogLevel::Warning }, + { "Foo:3", mozilla::LogLevel::Info }, + { "Foo:4", mozilla::LogLevel::Debug }, + { "Foo:5", mozilla::LogLevel::Verbose }, + { "Foo:25", mozilla::LogLevel::Verbose }, // too high + { "Foo:-12", mozilla::LogLevel::Disabled } // too low + }; + + auto* currTest = expected; + + for (size_t i = 0; i < MOZ_ARRAY_LENGTH(expected); i++) { + bool callbackInvoked = false; + mozilla::NSPRLogModulesParser(currTest->first, + [&](const char* aName, mozilla::LogLevel aLevel) { + EXPECT_STREQ("Foo", aName); + EXPECT_EQ(currTest->second, aLevel); + callbackInvoked = true; + }); + EXPECT_TRUE(callbackInvoked); + currTest++; + } +} + +TEST(NSPRLogModulesParser, Multiple) +{ + std::pair expected[] = { + { "timestamp", mozilla::LogLevel::Error }, + { "Foo", mozilla::LogLevel::Info }, + { "Bar", mozilla::LogLevel::Error }, + { "Baz", mozilla::LogLevel::Warning }, + { "Qux", mozilla::LogLevel::Verbose }, + }; + + const size_t kExpectedCount = MOZ_ARRAY_LENGTH(expected); + + auto* currTest = expected; + + size_t count = 0; + mozilla::NSPRLogModulesParser("timestamp,Foo:3, Bar,Baz:2, Qux:5", + [&](const char* aName, mozilla::LogLevel aLevel) mutable { + ASSERT_LT(count, kExpectedCount); + EXPECT_STREQ(currTest->first, aName); + EXPECT_EQ(currTest->second, aLevel); + currTest++; + count++; + }); + + EXPECT_EQ(kExpectedCount, count); +} diff --git a/xpcom/tests/gtest/TestThreadPool.cpp b/xpcom/tests/gtest/TestThreadPool.cpp index 45c76f5162..b0ce54c3ab 100644 --- a/xpcom/tests/gtest/TestThreadPool.cpp +++ b/xpcom/tests/gtest/TestThreadPool.cpp @@ -12,10 +12,13 @@ #include "nsComponentManagerUtils.h" #include "nsCOMPtr.h" #include "nsIRunnable.h" +#include "nsThreadUtils.h" #include "mozilla/Atomics.h" #include "mozilla/Monitor.h" #include "gtest/gtest.h" +using namespace mozilla; + class Task final : public nsIRunnable { public: diff --git a/xpcom/tests/gtest/moz.build b/xpcom/tests/gtest/moz.build index 3ac40f7f5f..79cd0b82d6 100644 --- a/xpcom/tests/gtest/moz.build +++ b/xpcom/tests/gtest/moz.build @@ -10,6 +10,7 @@ UNIFIED_SOURCES += [ 'TestCRT.cpp', 'TestEncoding.cpp', 'TestExpirationTracker.cpp', + 'TestNSPRLogModulesParser.cpp', 'TestPipes.cpp', 'TestPLDHash.cpp', 'TestPriorityQueue.cpp', @@ -27,6 +28,10 @@ UNIFIED_SOURCES += [ 'TestXPIDLString.cpp', ] +LOCAL_INCLUDES += [ + '../../base', +] + FINAL_LIBRARY = 'xul-gtest' if CONFIG['GNU_CXX']: