summaryrefslogtreecommitdiffstats
path: root/gfx/layers/d3d11
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/layers/d3d11
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/layers/d3d11')
-rw-r--r--gfx/layers/d3d11/BlendShaderConstants.h59
-rw-r--r--gfx/layers/d3d11/BlendingHelpers.hlslh184
-rw-r--r--gfx/layers/d3d11/CompositorD3D11.cpp1586
-rw-r--r--gfx/layers/d3d11/CompositorD3D11.h208
-rw-r--r--gfx/layers/d3d11/CompositorD3D11.hlsl421
-rwxr-xr-xgfx/layers/d3d11/CompositorD3D11Shaders.h9434
-rw-r--r--gfx/layers/d3d11/ReadbackManagerD3D11.cpp160
-rw-r--r--gfx/layers/d3d11/ReadbackManagerD3D11.h65
-rw-r--r--gfx/layers/d3d11/TextureD3D11.cpp1291
-rw-r--r--gfx/layers/d3d11/TextureD3D11.h455
-rw-r--r--gfx/layers/d3d11/genshaders.sh50
11 files changed, 13913 insertions, 0 deletions
diff --git a/gfx/layers/d3d11/BlendShaderConstants.h b/gfx/layers/d3d11/BlendShaderConstants.h
new file mode 100644
index 000000000..d89240c18
--- /dev/null
+++ b/gfx/layers/d3d11/BlendShaderConstants.h
@@ -0,0 +1,59 @@
+/* -*- 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 1
+
+// 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 == int(mozilla::layers::MaskType::Mask), "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 000000000..57d27b23b
--- /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
new file mode 100644
index 000000000..540d39b33
--- /dev/null
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -0,0 +1,1586 @@
+/* -*- 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/. */
+
+#include "CompositorD3D11.h"
+
+#include "TextureD3D11.h"
+#include "CompositorD3D11Shaders.h"
+
+#include "gfxWindowsPlatform.h"
+#include "nsIWidget.h"
+#include "mozilla/gfx/D3D11Checks.h"
+#include "mozilla/gfx/DeviceManagerDx.h"
+#include "mozilla/gfx/GPUParent.h"
+#include "mozilla/layers/ImageHost.h"
+#include "mozilla/layers/ContentHost.h"
+#include "mozilla/layers/Effects.h"
+#include "nsWindowsHelpers.h"
+#include "gfxPrefs.h"
+#include "gfxConfig.h"
+#include "gfxCrashReporterUtils.h"
+#include "gfxUtils.h"
+#include "mozilla/gfx/StackArray.h"
+#include "mozilla/Services.h"
+#include "mozilla/widget/WinCompositorWidget.h"
+
+#include "mozilla/EnumeratedArray.h"
+#include "mozilla/Telemetry.h"
+#include "BlendShaderConstants.h"
+
+#include "D3D11ShareHandleImage.h"
+#include "D3D9SurfaceImage.h"
+
+#include <dxgi1_2.h>
+
+namespace mozilla {
+
+using namespace gfx;
+
+namespace layers {
+
+static bool CanUsePartialPresents(ID3D11Device* aDevice);
+
+struct Vertex
+{
+ float position[2];
+};
+
+// {1E4D7BEB-D8EC-4A0B-BF0A-63E6DE129425}
+static const GUID sDeviceAttachmentsD3D11 =
+{ 0x1e4d7beb, 0xd8ec, 0x4a0b, { 0xbf, 0xa, 0x63, 0xe6, 0xde, 0x12, 0x94, 0x25 } };
+// {88041664-C835-4AA8-ACB8-7EC832357ED8}
+static const GUID sLayerManagerCount =
+{ 0x88041664, 0xc835, 0x4aa8, { 0xac, 0xb8, 0x7e, 0xc8, 0x32, 0x35, 0x7e, 0xd8 } };
+
+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)
+ : mSyncHandle(0),
+ mDevice(device),
+ mInitOkay(true)
+ {}
+
+ bool CreateShaders();
+ bool InitBlendShaders();
+ bool InitSyncObject();
+
+ typedef EnumeratedArray<MaskType, MaskType::NumMaskTypes, RefPtr<ID3D11VertexShader>>
+ VertexShaderArray;
+ typedef EnumeratedArray<MaskType, MaskType::NumMaskTypes, RefPtr<ID3D11PixelShader>>
+ PixelShaderArray;
+
+ RefPtr<ID3D11InputLayout> mInputLayout;
+ RefPtr<ID3D11Buffer> mVertexBuffer;
+
+ VertexShaderArray mVSQuadShader;
+ VertexShaderArray mVSQuadBlendShader;
+ PixelShaderArray mSolidColorShader;
+ PixelShaderArray mRGBAShader;
+ PixelShaderArray mRGBShader;
+ PixelShaderArray mYCbCrShader;
+ PixelShaderArray mComponentAlphaShader;
+ PixelShaderArray mBlendShader;
+ RefPtr<ID3D11Buffer> mPSConstantBuffer;
+ RefPtr<ID3D11Buffer> mVSConstantBuffer;
+ RefPtr<ID3D11RasterizerState> mRasterizerState;
+ RefPtr<ID3D11SamplerState> mLinearSamplerState;
+ RefPtr<ID3D11SamplerState> mPointSamplerState;
+ RefPtr<ID3D11BlendState> mPremulBlendState;
+ RefPtr<ID3D11BlendState> mNonPremulBlendState;
+ RefPtr<ID3D11BlendState> mComponentBlendState;
+ RefPtr<ID3D11BlendState> mDisabledBlendState;
+ RefPtr<IDXGIResource> mSyncTexture;
+ HANDLE mSyncHandle;
+
+private:
+ void InitVertexShader(const ShaderBytes& aShader, VertexShaderArray& aArray, MaskType aMaskType) {
+ InitVertexShader(aShader, getter_AddRefs(aArray[aMaskType]));
+ }
+ void InitPixelShader(const ShaderBytes& aShader, PixelShaderArray& aArray, MaskType aMaskType) {
+ InitPixelShader(aShader, getter_AddRefs(aArray[aMaskType]));
+ }
+ void InitVertexShader(const ShaderBytes& aShader, ID3D11VertexShader** aOut) {
+ if (!mInitOkay) {
+ return;
+ }
+ if (Failed(mDevice->CreateVertexShader(aShader.mData, aShader.mLength, nullptr, aOut), "create vs")) {
+ mInitOkay = false;
+ }
+ }
+ void InitPixelShader(const ShaderBytes& aShader, ID3D11PixelShader** aOut) {
+ if (!mInitOkay) {
+ return;
+ }
+ if (Failed(mDevice->CreatePixelShader(aShader.mData, aShader.mLength, nullptr, aOut), "create ps")) {
+ mInitOkay = false;
+ }
+ }
+
+ bool Failed(HRESULT hr, const char* aContext) {
+ if (SUCCEEDED(hr))
+ return false;
+
+ gfxCriticalNote << "[D3D11] " << aContext << " failed: " << hexa(hr);
+ return true;
+ }
+
+ // Only used during initialization.
+ RefPtr<ID3D11Device> mDevice;
+ bool mInitOkay;
+};
+
+CompositorD3D11::CompositorD3D11(CompositorBridgeParent* aParent, widget::CompositorWidget* aWidget)
+ : Compositor(aWidget, aParent)
+ , mAttachments(nullptr)
+ , mHwnd(nullptr)
+ , mDisableSequenceForNextFrame(false)
+ , mAllowPartialPresents(false)
+ , mVerifyBuffersFailed(false)
+{
+}
+
+CompositorD3D11::~CompositorD3D11()
+{
+ if (mDevice) {
+ int referenceCount = 0;
+ UINT size = sizeof(referenceCount);
+ HRESULT hr = mDevice->GetPrivateData(sLayerManagerCount, &size, &referenceCount);
+ NS_ASSERTION(SUCCEEDED(hr), "Reference count not found on device.");
+ referenceCount--;
+ mDevice->SetPrivateData(sLayerManagerCount,
+ sizeof(referenceCount),
+ &referenceCount);
+
+ if (!referenceCount) {
+ DeviceAttachmentsD3D11 *attachments;
+ size = sizeof(attachments);
+ mDevice->GetPrivateData(sDeviceAttachmentsD3D11, &size, &attachments);
+ // No LayerManagers left for this device. Clear out interfaces stored
+ // which hold a reference to the device.
+ mDevice->SetPrivateData(sDeviceAttachmentsD3D11, 0, nullptr);
+
+ delete attachments;
+ }
+ }
+}
+
+bool
+CompositorD3D11::Initialize(nsCString* const out_failureReason)
+{
+ ScopedGfxFeatureReporter reporter("D3D11 Layers");
+
+ MOZ_ASSERT(gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING));
+
+ HRESULT hr;
+
+ mDevice = DeviceManagerDx::Get()->GetCompositorDevice();
+ if (!mDevice) {
+ gfxCriticalNote << "[D3D11] failed to get compositor device.";
+ *out_failureReason = "FEATURE_FAILURE_D3D11_NO_DEVICE";
+ return false;
+ }
+
+ mDevice->GetImmediateContext(getter_AddRefs(mContext));
+ if (!mContext) {
+ gfxCriticalNote << "[D3D11] failed to get immediate context";
+ *out_failureReason = "FEATURE_FAILURE_D3D11_CONTEXT";
+ return false;
+ }
+
+ mFeatureLevel = mDevice->GetFeatureLevel();
+
+ mHwnd = mWidget->AsWindows()->GetHwnd();
+
+ memset(&mVSConstants, 0, sizeof(VertexShaderConstants));
+
+ int referenceCount = 0;
+ UINT size = sizeof(referenceCount);
+ // If this isn't there yet it'll fail, count will remain 0, which is correct.
+ mDevice->GetPrivateData(sLayerManagerCount, &size, &referenceCount);
+ referenceCount++;
+ mDevice->SetPrivateData(sLayerManagerCount,
+ sizeof(referenceCount),
+ &referenceCount);
+
+ size = sizeof(DeviceAttachmentsD3D11*);
+ if (FAILED(mDevice->GetPrivateData(sDeviceAttachmentsD3D11,
+ &size,
+ &mAttachments))) {
+ mAttachments = new DeviceAttachmentsD3D11(mDevice);
+ mDevice->SetPrivateData(sDeviceAttachmentsD3D11,
+ sizeof(mAttachments),
+ &mAttachments);
+
+ D3D11_INPUT_ELEMENT_DESC layout[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ };
+
+ hr = mDevice->CreateInputLayout(layout,
+ sizeof(layout) / sizeof(D3D11_INPUT_ELEMENT_DESC),
+ LayerQuadVS,
+ sizeof(LayerQuadVS),
+ getter_AddRefs(mAttachments->mInputLayout));
+
+ if (Failed(hr, "CreateInputLayout")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_INPUT_LAYOUT";
+ return false;
+ }
+
+ Vertex vertices[] = { {{0.0, 0.0}}, {{1.0, 0.0}}, {{0.0, 1.0}}, {{1.0, 1.0}} };
+ CD3D11_BUFFER_DESC bufferDesc(sizeof(vertices), D3D11_BIND_VERTEX_BUFFER);
+ D3D11_SUBRESOURCE_DATA data;
+ data.pSysMem = (void*)vertices;
+
+ hr = mDevice->CreateBuffer(&bufferDesc, &data, getter_AddRefs(mAttachments->mVertexBuffer));
+
+ if (Failed(hr, "create vertex buffer")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_VERTEX_BUFFER";
+ return false;
+ }
+
+ if (!mAttachments->CreateShaders()) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_CREATE_SHADERS";
+ return false;
+ }
+
+ CD3D11_BUFFER_DESC cBufferDesc(sizeof(VertexShaderConstants),
+ D3D11_BIND_CONSTANT_BUFFER,
+ D3D11_USAGE_DYNAMIC,
+ D3D11_CPU_ACCESS_WRITE);
+
+ hr = mDevice->CreateBuffer(&cBufferDesc, nullptr, getter_AddRefs(mAttachments->mVSConstantBuffer));
+ if (Failed(hr, "create vs buffer")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_VS_BUFFER";
+ return false;
+ }
+
+ cBufferDesc.ByteWidth = sizeof(PixelShaderConstants);
+ hr = mDevice->CreateBuffer(&cBufferDesc, nullptr, getter_AddRefs(mAttachments->mPSConstantBuffer));
+ if (Failed(hr, "create ps buffer")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_PS_BUFFER";
+ return false;
+ }
+
+ CD3D11_RASTERIZER_DESC rastDesc(D3D11_DEFAULT);
+ rastDesc.CullMode = D3D11_CULL_NONE;
+ rastDesc.ScissorEnable = TRUE;
+
+ hr = mDevice->CreateRasterizerState(&rastDesc, getter_AddRefs(mAttachments->mRasterizerState));
+ if (Failed(hr, "create rasterizer")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_RASTERIZER";
+ return false;
+ }
+
+ CD3D11_SAMPLER_DESC samplerDesc(D3D11_DEFAULT);
+ hr = mDevice->CreateSamplerState(&samplerDesc, getter_AddRefs(mAttachments->mLinearSamplerState));
+ if (Failed(hr, "create linear sampler")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_LINEAR_SAMPLER";
+ return false;
+ }
+
+ samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
+ hr = mDevice->CreateSamplerState(&samplerDesc, getter_AddRefs(mAttachments->mPointSamplerState));
+ if (Failed(hr, "create point sampler")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_POINT_SAMPLER";
+ return false;
+ }
+
+ CD3D11_BLEND_DESC blendDesc(D3D11_DEFAULT);
+ D3D11_RENDER_TARGET_BLEND_DESC rtBlendPremul = {
+ TRUE,
+ D3D11_BLEND_ONE, D3D11_BLEND_INV_SRC_ALPHA, D3D11_BLEND_OP_ADD,
+ D3D11_BLEND_ONE, D3D11_BLEND_INV_SRC_ALPHA, D3D11_BLEND_OP_ADD,
+ D3D11_COLOR_WRITE_ENABLE_ALL
+ };
+ blendDesc.RenderTarget[0] = rtBlendPremul;
+ hr = mDevice->CreateBlendState(&blendDesc, getter_AddRefs(mAttachments->mPremulBlendState));
+ if (Failed(hr, "create pm blender")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_PM_BLENDER";
+ return false;
+ }
+
+ D3D11_RENDER_TARGET_BLEND_DESC rtBlendNonPremul = {
+ TRUE,
+ D3D11_BLEND_SRC_ALPHA, D3D11_BLEND_INV_SRC_ALPHA, D3D11_BLEND_OP_ADD,
+ D3D11_BLEND_ONE, D3D11_BLEND_INV_SRC_ALPHA, D3D11_BLEND_OP_ADD,
+ D3D11_COLOR_WRITE_ENABLE_ALL
+ };
+ blendDesc.RenderTarget[0] = rtBlendNonPremul;
+ hr = mDevice->CreateBlendState(&blendDesc, getter_AddRefs(mAttachments->mNonPremulBlendState));
+ if (Failed(hr, "create npm blender")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_NPM_BLENDER";
+ return false;
+ }
+
+ if (gfxPrefs::ComponentAlphaEnabled()) {
+ D3D11_RENDER_TARGET_BLEND_DESC rtBlendComponent = {
+ TRUE,
+ D3D11_BLEND_ONE,
+ D3D11_BLEND_INV_SRC1_COLOR,
+ D3D11_BLEND_OP_ADD,
+ D3D11_BLEND_ONE,
+ D3D11_BLEND_INV_SRC_ALPHA,
+ D3D11_BLEND_OP_ADD,
+ D3D11_COLOR_WRITE_ENABLE_ALL
+ };
+ blendDesc.RenderTarget[0] = rtBlendComponent;
+ hr = mDevice->CreateBlendState(&blendDesc, getter_AddRefs(mAttachments->mComponentBlendState));
+ if (Failed(hr, "create component blender")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_COMP_BLENDER";
+ return false;
+ }
+ }
+
+ D3D11_RENDER_TARGET_BLEND_DESC rtBlendDisabled = {
+ FALSE,
+ D3D11_BLEND_SRC_ALPHA, D3D11_BLEND_INV_SRC_ALPHA, D3D11_BLEND_OP_ADD,
+ D3D11_BLEND_ONE, D3D11_BLEND_INV_SRC_ALPHA, D3D11_BLEND_OP_ADD,
+ D3D11_COLOR_WRITE_ENABLE_ALL
+ };
+ blendDesc.RenderTarget[0] = rtBlendDisabled;
+ hr = mDevice->CreateBlendState(&blendDesc, getter_AddRefs(mAttachments->mDisabledBlendState));
+ if (Failed(hr, "create null blender")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_NULL_BLENDER";
+ return false;
+ }
+
+ if (!mAttachments->InitSyncObject()) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_OBJ_SYNC";
+ return false;
+ }
+ }
+
+ RefPtr<IDXGIDevice> dxgiDevice;
+ RefPtr<IDXGIAdapter> dxgiAdapter;
+
+ mDevice->QueryInterface(dxgiDevice.StartAssignment());
+ dxgiDevice->GetAdapter(getter_AddRefs(dxgiAdapter));
+
+ {
+ RefPtr<IDXGIFactory> dxgiFactory;
+ dxgiAdapter->GetParent(IID_PPV_ARGS(dxgiFactory.StartAssignment()));
+
+ DXGI_SWAP_CHAIN_DESC swapDesc;
+ ::ZeroMemory(&swapDesc, sizeof(swapDesc));
+ swapDesc.BufferDesc.Width = 0;
+ swapDesc.BufferDesc.Height = 0;
+ swapDesc.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
+ swapDesc.BufferDesc.RefreshRate.Numerator = 60;
+ swapDesc.BufferDesc.RefreshRate.Denominator = 1;
+ swapDesc.SampleDesc.Count = 1;
+ swapDesc.SampleDesc.Quality = 0;
+ swapDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ swapDesc.BufferCount = 1;
+ swapDesc.OutputWindow = mHwnd;
+ swapDesc.Windowed = TRUE;
+ swapDesc.Flags = 0;
+ swapDesc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
+
+
+ /**
+ * Create a swap chain, this swap chain will contain the backbuffer for
+ * the window we draw to. The front buffer is the full screen front
+ * buffer.
+ */
+ hr = dxgiFactory->CreateSwapChain(dxgiDevice, &swapDesc, getter_AddRefs(mSwapChain));
+ if (Failed(hr, "create swap chain")) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_SWAP_CHAIN";
+ return false;
+ }
+
+ // We need this because we don't want DXGI to respond to Alt+Enter.
+ dxgiFactory->MakeWindowAssociation(swapDesc.OutputWindow,
+ DXGI_MWA_NO_WINDOW_CHANGES);
+ }
+
+ if (!mWidget->InitCompositor(this)) {
+ *out_failureReason = "FEATURE_FAILURE_D3D11_INIT_COMPOSITOR";
+ return false;
+ }
+
+ mAllowPartialPresents = CanUsePartialPresents(mDevice);
+
+ reporter.SetSuccessful();
+ return true;
+}
+
+static bool
+CanUsePartialPresents(ID3D11Device* aDevice)
+{
+ if (gfxPrefs::PartialPresent() > 0) {
+ return true;
+ }
+ if (gfxPrefs::PartialPresent() < 0) {
+ return false;
+ }
+ if (DeviceManagerDx::Get()->IsWARP()) {
+ return true;
+ }
+
+ DXGI_ADAPTER_DESC desc;
+ if (!D3D11Checks::GetDxgiDesc(aDevice, &desc)) {
+ return false;
+ }
+
+ // We have to disable partial presents on NVIDIA (bug 1189940).
+ if (desc.VendorId == 0x10de) {
+ return false;
+ }
+
+ return true;
+}
+
+already_AddRefed<DataTextureSource>
+CompositorD3D11::CreateDataTextureSource(TextureFlags aFlags)
+{
+ RefPtr<DataTextureSource> result = new DataTextureSourceD3D11(gfx::SurfaceFormat::UNKNOWN,
+ this, aFlags);
+ return result.forget();
+}
+
+TextureFactoryIdentifier
+CompositorD3D11::GetTextureFactoryIdentifier()
+{
+ TextureFactoryIdentifier ident;
+ ident.mMaxTextureSize = GetMaxTextureSize();
+ ident.mParentProcessType = XRE_GetProcessType();
+ ident.mParentBackend = LayersBackend::LAYERS_D3D11;
+ ident.mSyncHandle = mAttachments->mSyncHandle;
+ return ident;
+}
+
+bool
+CompositorD3D11::CanUseCanvasLayerForSize(const gfx::IntSize& aSize)
+{
+ int32_t maxTextureSize = GetMaxTextureSize();
+
+ if (aSize.width > maxTextureSize || aSize.height > maxTextureSize) {
+ return false;
+ }
+
+ return true;
+}
+
+int32_t
+CompositorD3D11::GetMaxTextureSize() const
+{
+ return GetMaxTextureSizeForFeatureLevel(mFeatureLevel);
+}
+
+already_AddRefed<CompositingRenderTarget>
+CompositorD3D11::CreateRenderTarget(const gfx::IntRect& aRect,
+ SurfaceInitMode aInit)
+{
+ MOZ_ASSERT(aRect.width != 0 && aRect.height != 0);
+
+ if (aRect.width * aRect.height == 0) {
+ return nullptr;
+ }
+
+ CD3D11_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, aRect.width, aRect.height, 1, 1,
+ D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET);
+
+ RefPtr<ID3D11Texture2D> texture;
+ HRESULT hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture));
+ if (FAILED(hr) || !texture) {
+ gfxCriticalNote << "Failed in CreateRenderTarget " << hexa(hr);
+ return nullptr;
+ }
+
+ RefPtr<CompositingRenderTargetD3D11> rt = new CompositingRenderTargetD3D11(texture, aRect.TopLeft());
+ rt->SetSize(IntSize(aRect.width, aRect.height));
+
+ if (aInit == INIT_MODE_CLEAR) {
+ FLOAT clear[] = { 0, 0, 0, 0 };
+ mContext->ClearRenderTargetView(rt->mRTView, clear);
+ }
+
+ return rt.forget();
+}
+
+RefPtr<ID3D11Texture2D>
+CompositorD3D11::CreateTexture(const gfx::IntRect& aRect,
+ const CompositingRenderTarget* aSource,
+ const gfx::IntPoint& aSourcePoint)
+{
+ MOZ_ASSERT(aRect.width != 0 && aRect.height != 0);
+
+ if (aRect.width * aRect.height == 0) {
+ return nullptr;
+ }
+
+ CD3D11_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM,
+ aRect.width, aRect.height, 1, 1,
+ D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET);
+
+ RefPtr<ID3D11Texture2D> texture;
+ HRESULT hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture));
+
+ if (FAILED(hr) || !texture) {
+ gfxCriticalNote << "Failed in CreateRenderTargetFromSource " << hexa(hr);
+ HandleError(hr);
+ return nullptr;
+ }
+
+ if (aSource) {
+ const CompositingRenderTargetD3D11* sourceD3D11 =
+ static_cast<const CompositingRenderTargetD3D11*>(aSource);
+
+ const IntSize& srcSize = sourceD3D11->GetSize();
+ MOZ_ASSERT(srcSize.width >= 0 && srcSize.height >= 0,
+ "render targets should have nonnegative sizes");
+
+ IntRect srcRect(IntPoint(), srcSize);
+ IntRect copyRect(aSourcePoint, aRect.Size());
+ if (!srcRect.Contains(copyRect)) {
+ NS_WARNING("Could not copy the whole copy rect from the render target");
+ }
+
+ copyRect = copyRect.Intersect(srcRect);
+
+ if (!copyRect.IsEmpty()) {
+ D3D11_BOX copyBox;
+ copyBox.front = 0;
+ copyBox.back = 1;
+ copyBox.left = copyRect.x;
+ copyBox.top = copyRect.y;
+ copyBox.right = copyRect.XMost();
+ copyBox.bottom = copyRect.YMost();
+
+ mContext->CopySubresourceRegion(texture, 0,
+ 0, 0, 0,
+ sourceD3D11->GetD3D11Texture(), 0,
+ &copyBox);
+ }
+ }
+
+ return texture;
+}
+
+already_AddRefed<CompositingRenderTarget>
+CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
+ const CompositingRenderTarget* aSource,
+ const gfx::IntPoint &aSourcePoint)
+{
+ RefPtr<ID3D11Texture2D> texture = CreateTexture(aRect, aSource, aSourcePoint);
+ if (!texture) {
+ return nullptr;
+ }
+
+ RefPtr<CompositingRenderTargetD3D11> rt =
+ new CompositingRenderTargetD3D11(texture, aRect.TopLeft());
+ rt->SetSize(aRect.Size());
+
+ return rt.forget();
+}
+
+bool
+CompositorD3D11::CopyBackdrop(const gfx::IntRect& aRect,
+ RefPtr<ID3D11Texture2D>* aOutTexture,
+ RefPtr<ID3D11ShaderResourceView>* aOutView)
+{
+ RefPtr<ID3D11Texture2D> 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<ID3D11ShaderResourceView> 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)
+{
+ MOZ_ASSERT(aRenderTarget);
+ CompositingRenderTargetD3D11* newRT =
+ static_cast<CompositingRenderTargetD3D11*>(aRenderTarget);
+ if (mCurrentRT != newRT) {
+ mCurrentRT = newRT;
+ mCurrentRT->BindRenderTarget(mContext);
+ }
+
+ if (newRT->HasComplexProjection()) {
+ gfx::Matrix4x4 projection;
+ bool depthEnable;
+ float zNear, zFar;
+ newRT->GetProjection(projection, depthEnable, zNear, zFar);
+ PrepareViewport(newRT->GetSize(), projection, zNear, zFar);
+ } else {
+ PrepareViewport(newRT->GetSize());
+ }
+}
+
+ID3D11PixelShader*
+CompositorD3D11::GetPSForEffect(Effect* aEffect, MaskType aMaskType)
+{
+ switch (aEffect->mType) {
+ case EffectTypes::SOLID_COLOR:
+ return mAttachments->mSolidColorShader[aMaskType];
+ case EffectTypes::RENDER_TARGET:
+ return mAttachments->mRGBAShader[aMaskType];
+ case EffectTypes::RGB: {
+ SurfaceFormat format = static_cast<TexturedEffect*>(aEffect)->mTexture->GetFormat();
+ return (format == SurfaceFormat::B8G8R8A8 || format == SurfaceFormat::R8G8B8A8)
+ ? mAttachments->mRGBAShader[aMaskType]
+ : mAttachments->mRGBShader[aMaskType];
+ }
+ case EffectTypes::YCBCR:
+ return mAttachments->mYCbCrShader[aMaskType];
+ case EffectTypes::COMPONENT_ALPHA:
+ return mAttachments->mComponentAlphaShader[aMaskType];
+ default:
+ NS_WARNING("No shader to load");
+ return nullptr;
+ }
+}
+
+void
+CompositorD3D11::ClearRect(const gfx::Rect& aRect)
+{
+ mContext->OMSetBlendState(mAttachments->mDisabledBlendState, sBlendFactor, 0xFFFFFFFF);
+
+ Matrix4x4 identity;
+ memcpy(&mVSConstants.layerTransform, &identity._11, 64);
+
+ mVSConstants.layerQuad = aRect;
+ mVSConstants.renderTargetOffset[0] = 0;
+ mVSConstants.renderTargetOffset[1] = 0;
+ mPSConstants.layerOpacity[0] = 1.0f;
+
+ D3D11_RECT scissor;
+ scissor.left = aRect.x;
+ scissor.right = aRect.XMost();
+ scissor.top = aRect.y;
+ scissor.bottom = aRect.YMost();
+ mContext->RSSetScissorRects(1, &scissor);
+ mContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
+ mContext->VSSetShader(mAttachments->mVSQuadShader[MaskType::MaskNone], nullptr, 0);
+
+ mContext->PSSetShader(mAttachments->mSolidColorShader[MaskType::MaskNone], nullptr, 0);
+ mPSConstants.layerColor[0] = 0;
+ mPSConstants.layerColor[1] = 0;
+ mPSConstants.layerColor[2] = 0;
+ mPSConstants.layerColor[3] = 0;
+
+ if (!UpdateConstantBuffers()) {
+ NS_WARNING("Failed to update shader constant buffers");
+ return;
+ }
+
+ mContext->Draw(4, 0);
+
+ mContext->OMSetBlendState(mAttachments->mPremulBlendState, sBlendFactor, 0xFFFFFFFF);
+}
+
+static inline bool
+EffectHasPremultipliedAlpha(Effect* aEffect)
+{
+ if (aEffect->mType == EffectTypes::RGB) {
+ return static_cast<TexturedEffect*>(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<TexturedEffect*>(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::IntRect& aClipRect,
+ const EffectChain& aEffectChain,
+ gfx::Float aOpacity,
+ const gfx::Matrix4x4& aTransform,
+ const gfx::Rect& aVisibleRect)
+{
+ if (mCurrentClip.IsEmpty()) {
+ return;
+ }
+
+ MOZ_ASSERT(mCurrentRT, "No render target");
+
+ memcpy(&mVSConstants.layerTransform, &aTransform._11, 64);
+ IntPoint origin = mCurrentRT->GetOrigin();
+ mVSConstants.renderTargetOffset[0] = origin.x;
+ mVSConstants.renderTargetOffset[1] = origin.y;
+
+ mPSConstants.layerOpacity[0] = aOpacity;
+
+ bool restoreBlendMode = false;
+
+ MaskType maskType = MaskType::MaskNone;
+
+ if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) {
+ maskType = MaskType::Mask;
+
+ EffectMask* maskEffect =
+ static_cast<EffectMask*>(aEffectChain.mSecondaryEffects[EffectTypes::MASK].get());
+ TextureSourceD3D11* source = maskEffect->mMaskTexture->AsSourceD3D11();
+
+ if (!source) {
+ NS_WARNING("Missing texture source!");
+ return;
+ }
+
+ ID3D11ShaderResourceView* srView = source->GetShaderResourceView();
+ 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?!");
+ Rect bounds = Rect(Point(), Size(maskEffect->mSize));
+
+ mVSConstants.maskQuad = maskTransform.As2D().TransformBounds(bounds);
+ }
+
+ D3D11_RECT scissor;
+
+ IntRect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
+ if (mCurrentRT == mDefaultRT) {
+ clipRect = clipRect.Intersect(mCurrentClip);
+ }
+
+ if (clipRect.IsEmpty()) {
+ return;
+ }
+
+ scissor.left = clipRect.x;
+ scissor.right = clipRect.XMost();
+ scissor.top = clipRect.y;
+ scissor.bottom = clipRect.YMost();
+
+ RefPtr<ID3D11VertexShader> vertexShader = mAttachments->mVSQuadShader[maskType];
+ RefPtr<ID3D11PixelShader> pixelShader = GetPSForEffect(aEffectChain.mPrimaryEffect, maskType);
+
+ RefPtr<ID3D11Texture2D> mixBlendBackdrop;
+ gfx::CompositionOp blendMode = gfx::CompositionOp::OP_OVER;
+ if (aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE]) {
+ EffectBlendMode *blendEffect =
+ static_cast<EffectBlendMode*>(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<ID3D11ShaderResourceView> srv;
+ if (CopyBackdrop(rect, &mixBlendBackdrop, &srv) &&
+ mAttachments->InitBlendShaders())
+ {
+ 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(vertexShader, nullptr, 0);
+ mContext->PSSetShader(pixelShader, nullptr, 0);
+
+ const Rect* pTexCoordRect = nullptr;
+
+ switch (aEffectChain.mPrimaryEffect->mType) {
+ case EffectTypes::SOLID_COLOR: {
+ Color color =
+ static_cast<EffectSolidColor*>(aEffectChain.mPrimaryEffect.get())->mColor;
+ mPSConstants.layerColor[0] = color.r * color.a * aOpacity;
+ mPSConstants.layerColor[1] = color.g * color.a * aOpacity;
+ mPSConstants.layerColor[2] = color.b * color.a * aOpacity;
+ mPSConstants.layerColor[3] = color.a * aOpacity;
+ }
+ break;
+ case EffectTypes::RGB:
+ case EffectTypes::RENDER_TARGET:
+ {
+ TexturedEffect* texturedEffect =
+ static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());
+
+ pTexCoordRect = &texturedEffect->mTextureCoords;
+
+ TextureSourceD3D11* source = texturedEffect->mTexture->AsSourceD3D11();
+
+ if (!source) {
+ NS_WARNING("Missing texture source!");
+ return;
+ }
+
+ ID3D11ShaderResourceView* srView = source->GetShaderResourceView();
+ mContext->PSSetShaderResources(TexSlot::RGB, 1, &srView);
+
+ if (!texturedEffect->mPremultiplied) {
+ mContext->OMSetBlendState(mAttachments->mNonPremulBlendState, sBlendFactor, 0xFFFFFFFF);
+ restoreBlendMode = true;
+ }
+
+ SetSamplerForSamplingFilter(texturedEffect->mSamplingFilter);
+ }
+ break;
+ case EffectTypes::YCBCR: {
+ EffectYCbCr* ycbcrEffect =
+ static_cast<EffectYCbCr*>(aEffectChain.mPrimaryEffect.get());
+
+ SetSamplerForSamplingFilter(SamplingFilter::LINEAR);
+
+ pTexCoordRect = &ycbcrEffect->mTextureCoords;
+
+ const int Y = 0, Cb = 1, Cr = 2;
+ TextureSource* source = ycbcrEffect->mTexture;
+
+ if (!source) {
+ NS_WARNING("No texture to composite");
+ return;
+ }
+
+ 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).
+ return;
+ }
+
+ float* yuvToRgb = gfxUtils::Get4x3YuvColorMatrix(ycbcrEffect->mYUVColorSpace);
+ memcpy(&mPSConstants.yuvColorMatrix, yuvToRgb, sizeof(mPSConstants.yuvColorMatrix));
+
+ TextureSourceD3D11* sourceY = source->GetSubSource(Y)->AsSourceD3D11();
+ TextureSourceD3D11* sourceCb = source->GetSubSource(Cb)->AsSourceD3D11();
+ TextureSourceD3D11* sourceCr = source->GetSubSource(Cr)->AsSourceD3D11();
+
+ ID3D11ShaderResourceView* srViews[3] = { sourceY->GetShaderResourceView(),
+ sourceCb->GetShaderResourceView(),
+ sourceCr->GetShaderResourceView() };
+ mContext->PSSetShaderResources(TexSlot::Y, 3, srViews);
+ }
+ break;
+ case EffectTypes::COMPONENT_ALPHA:
+ {
+ MOZ_ASSERT(gfxPrefs::ComponentAlphaEnabled());
+ MOZ_ASSERT(mAttachments->mComponentBlendState);
+ EffectComponentAlpha* effectComponentAlpha =
+ static_cast<EffectComponentAlpha*>(aEffectChain.mPrimaryEffect.get());
+
+ TextureSourceD3D11* sourceOnWhite = effectComponentAlpha->mOnWhite->AsSourceD3D11();
+ TextureSourceD3D11* sourceOnBlack = effectComponentAlpha->mOnBlack->AsSourceD3D11();
+
+ if (!sourceOnWhite || !sourceOnBlack) {
+ NS_WARNING("Missing texture source(s)!");
+ return;
+ }
+
+ SetSamplerForSamplingFilter(effectComponentAlpha->mSamplingFilter);
+
+ pTexCoordRect = &effectComponentAlpha->mTextureCoords;
+
+ ID3D11ShaderResourceView* srViews[2] = { sourceOnBlack->GetShaderResourceView(),
+ sourceOnWhite->GetShaderResourceView() };
+ mContext->PSSetShaderResources(TexSlot::RGB, 1, &srViews[0]);
+ mContext->PSSetShaderResources(TexSlot::RGBWhite, 1, &srViews[1]);
+
+ mContext->OMSetBlendState(mAttachments->mComponentBlendState, sBlendFactor, 0xFFFFFFFF);
+ restoreBlendMode = true;
+ }
+ break;
+ default:
+ NS_WARNING("Unknown shader type");
+ return;
+ }
+
+ if (pTexCoordRect) {
+ Rect layerRects[4];
+ Rect textureRects[4];
+ size_t rects = DecomposeIntoNoRepeatRects(aRect,
+ *pTexCoordRect,
+ &layerRects,
+ &textureRects);
+ for (size_t i = 0; i < rects; i++) {
+ mVSConstants.layerQuad = layerRects[i];
+ mVSConstants.textureCoords = textureRects[i];
+
+ if (!UpdateConstantBuffers()) {
+ NS_WARNING("Failed to update shader constant buffers");
+ break;
+ }
+ mContext->Draw(4, 0);
+ }
+ } else {
+ mVSConstants.layerQuad = aRect;
+
+ if (!UpdateConstantBuffers()) {
+ NS_WARNING("Failed to update shader constant buffers");
+ } else {
+ mContext->Draw(4, 0);
+ }
+ }
+
+ if (restoreBlendMode) {
+ mContext->OMSetBlendState(mAttachments->mPremulBlendState, sBlendFactor, 0xFFFFFFFF);
+ }
+}
+
+void
+CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
+ const IntRect* aClipRectIn,
+ const IntRect& aRenderBounds,
+ const nsIntRegion& aOpaqueRegion,
+ IntRect* aClipRectOut,
+ IntRect* aRenderBoundsOut)
+{
+ // Don't composite if we are minimised. Other than for the sake of efficency,
+ // this is important because resizing our buffers when mimised will fail and
+ // cause a crash when we're restored.
+ NS_ASSERTION(mHwnd, "Couldn't find an HWND when initialising?");
+ if (::IsIconic(mHwnd)) {
+ // We are not going to render, and not going to call EndFrame so we have to
+ // read-unlock our textures to prevent them from accumulating.
+ ReadUnlockTextures();
+ *aRenderBoundsOut = IntRect();
+ return;
+ }
+
+ if (mDevice->GetDeviceRemovedReason() != S_OK) {
+ gfxCriticalNote << "GFX: D3D11 skip BeginFrame with device-removed.";
+ ReadUnlockTextures();
+ *aRenderBoundsOut = IntRect();
+
+ // If we are in the GPU process then the main process doesn't
+ // know that a device reset has happened and needs to be informed
+ if (XRE_IsGPUProcess()) {
+ GPUParent::GetSingleton()->NotifyDeviceReset();
+ }
+
+ return;
+ }
+
+ LayoutDeviceIntSize oldSize = mSize;
+
+ // Failed to create a render target or the view.
+ if (!UpdateRenderTarget() || !mDefaultRT || !mDefaultRT->mRTView ||
+ mSize.width <= 0 || mSize.height <= 0) {
+ ReadUnlockTextures();
+ *aRenderBoundsOut = IntRect();
+ return;
+ }
+
+ IntRect intRect = IntRect(IntPoint(0, 0), mSize.ToUnknownSize());
+ // Sometimes the invalid region is larger than we want to draw.
+ nsIntRegion invalidRegionSafe;
+
+ if (mSize != oldSize) {
+ invalidRegionSafe = intRect;
+ } else {
+ invalidRegionSafe.And(aInvalidRegion, intRect);
+ }
+
+ IntRect invalidRect = invalidRegionSafe.GetBounds();
+
+ IntRect clipRect = invalidRect;
+ if (aClipRectIn) {
+ clipRect.IntersectRect(clipRect, IntRect(aClipRectIn->x, aClipRectIn->y, aClipRectIn->width, aClipRectIn->height));
+ }
+
+ if (clipRect.IsEmpty()) {
+ *aRenderBoundsOut = IntRect();
+ return;
+ }
+
+ mContext->IASetInputLayout(mAttachments->mInputLayout);
+
+ ID3D11Buffer* buffer = mAttachments->mVertexBuffer;
+ UINT size = sizeof(Vertex);
+ UINT offset = 0;
+ mContext->IASetVertexBuffers(0, 1, &buffer, &size, &offset);
+
+ mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height);
+ mInvalidRegion = invalidRegionSafe;
+
+ if (aClipRectOut) {
+ *aClipRectOut = IntRect(0, 0, mSize.width, mSize.height);
+ }
+ if (aRenderBoundsOut) {
+ *aRenderBoundsOut = IntRect(0, 0, mSize.width, mSize.height);
+ }
+
+ mCurrentClip = IntRect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
+
+ mContext->RSSetState(mAttachments->mRasterizerState);
+
+ SetRenderTarget(mDefaultRT);
+
+ // ClearRect will set the correct blend state for us.
+ ClearRect(Rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height));
+
+ if (mAttachments->mSyncTexture) {
+ RefPtr<IDXGIKeyedMutex> mutex;
+ mAttachments->mSyncTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
+
+ MOZ_ASSERT(mutex);
+ {
+ HRESULT hr;
+ AutoTextureLock lock(mutex, hr, 10000);
+ if (hr == WAIT_TIMEOUT) {
+ hr = mDevice->GetDeviceRemovedReason();
+ if (hr == S_OK) {
+ // There is no driver-removed event. Crash with this timeout.
+ MOZ_CRASH("GFX: D3D11 normal status timeout");
+ }
+
+ // Since the timeout is related to the driver-removed, clear the
+ // render-bounding size to skip this frame.
+ gfxCriticalNote << "GFX: D3D11 timeout with device-removed:" << gfx::hexa(hr);
+ *aRenderBoundsOut = IntRect();
+ return;
+ } else if (hr == WAIT_ABANDONED) {
+ gfxCriticalNote << "GFX: D3D11 abandoned sync";
+ }
+ }
+ }
+}
+
+void
+CompositorD3D11::EndFrame()
+{
+ if (!mDefaultRT) {
+ Compositor::EndFrame();
+ return;
+ }
+
+ if (mDevice->GetDeviceRemovedReason() != S_OK) {
+ gfxCriticalNote << "GFX: D3D11 skip EndFrame with device-removed.";
+ Compositor::EndFrame();
+ mCurrentRT = nullptr;
+ return;
+ }
+
+ LayoutDeviceIntSize oldSize = mSize;
+ EnsureSize();
+ if (mSize.width <= 0 || mSize.height <= 0) {
+ Compositor::EndFrame();
+ return;
+ }
+
+ RefPtr<ID3D11Query> query;
+ CD3D11_QUERY_DESC desc(D3D11_QUERY_EVENT);
+ mDevice->CreateQuery(&desc, getter_AddRefs(query));
+ if (query) {
+ mContext->End(query);
+ }
+
+ UINT presentInterval = 0;
+
+ bool isWARP = DeviceManagerDx::Get()->IsWARP();
+ if (isWARP) {
+ // When we're using WARP we cannot present immediately as it causes us
+ // to tear when rendering. When not using WARP it appears the DWM takes
+ // care of tearing for us.
+ presentInterval = 1;
+ }
+
+ if (oldSize == mSize) {
+ RefPtr<IDXGISwapChain1> chain;
+ HRESULT hr = mSwapChain->QueryInterface((IDXGISwapChain1**)getter_AddRefs(chain));
+
+ if (SUCCEEDED(hr) && chain && mAllowPartialPresents) {
+ DXGI_PRESENT_PARAMETERS params;
+ PodZero(&params);
+ params.DirtyRectsCount = mInvalidRegion.GetNumRects();
+ StackArray<RECT, 4> rects(params.DirtyRectsCount);
+
+ uint32_t i = 0;
+ for (auto iter = mInvalidRegion.RectIter(); !iter.Done(); iter.Next()) {
+ const IntRect& r = iter.Get();
+ rects[i].left = r.x;
+ rects[i].top = r.y;
+ rects[i].bottom = r.YMost();
+ rects[i].right = r.XMost();
+ i++;
+ }
+
+ params.pDirtyRects = params.DirtyRectsCount ? rects.data() : nullptr;
+ chain->Present1(presentInterval, mDisableSequenceForNextFrame ? DXGI_PRESENT_DO_NOT_SEQUENCE : 0, &params);
+ } else {
+ hr = mSwapChain->Present(presentInterval, mDisableSequenceForNextFrame ? DXGI_PRESENT_DO_NOT_SEQUENCE : 0);
+ if (FAILED(hr)) {
+ gfxCriticalNote << "D3D11 swap chain preset failed " << hexa(hr);
+ HandleError(hr);
+ }
+ }
+ mDisableSequenceForNextFrame = false;
+ if (mTarget) {
+ PaintToTarget();
+ }
+ }
+
+ // Block until the previous frame's work has been completed.
+ if (mQuery) {
+ TimeStamp start = TimeStamp::Now();
+ BOOL result;
+ while (mContext->GetData(mQuery, &result, sizeof(BOOL), 0) != S_OK) {
+ if (mDevice->GetDeviceRemovedReason() != S_OK) {
+ break;
+ }
+ if ((TimeStamp::Now() - start) > TimeDuration::FromSeconds(2)) {
+ break;
+ }
+ Sleep(0);
+ }
+ }
+ // Store the query for this frame so we can flush it next time.
+ mQuery = query;
+
+ Compositor::EndFrame();
+
+ mCurrentRT = nullptr;
+}
+
+void
+CompositorD3D11::PrepareViewport(const gfx::IntSize& aSize)
+{
+ // This view matrix translates coordinates from 0..width and 0..height to
+ // -1..1 on the X axis, and -1..1 on the Y axis (flips the Y coordinate)
+ Matrix viewMatrix = Matrix::Translation(-1.0, 1.0);
+ viewMatrix.PreScale(2.0f / float(aSize.width), 2.0f / float(aSize.height));
+ viewMatrix.PreScale(1.0f, -1.0f);
+
+ Matrix4x4 projection = Matrix4x4::From2D(viewMatrix);
+ projection._33 = 0.0f;
+
+ PrepareViewport(aSize, projection, 0.0f, 1.0f);
+}
+
+void
+CompositorD3D11::ForcePresent()
+{
+ LayoutDeviceIntSize size = mWidget->GetClientSize();
+
+ DXGI_SWAP_CHAIN_DESC desc;
+ mSwapChain->GetDesc(&desc);
+
+ if (desc.BufferDesc.Width == size.width && desc.BufferDesc.Height == size.height) {
+ mSwapChain->Present(0, 0);
+ }
+}
+
+void
+CompositorD3D11::PrepareViewport(const gfx::IntSize& aSize,
+ const gfx::Matrix4x4& aProjection,
+ float aZNear, float aZFar)
+{
+ D3D11_VIEWPORT viewport;
+ viewport.MaxDepth = aZFar;
+ viewport.MinDepth = aZNear;
+ viewport.Width = aSize.width;
+ viewport.Height = aSize.height;
+ viewport.TopLeftX = 0;
+ viewport.TopLeftY = 0;
+
+ mContext->RSSetViewports(1, &viewport);
+
+ memcpy(&mVSConstants.projection, &aProjection._11, sizeof(mVSConstants.projection));
+}
+
+void
+CompositorD3D11::EnsureSize()
+{
+ mSize = mWidget->GetClientSize();
+}
+
+bool
+CompositorD3D11::VerifyBufferSize()
+{
+ DXGI_SWAP_CHAIN_DESC swapDesc;
+ HRESULT hr;
+
+ hr = mSwapChain->GetDesc(&swapDesc);
+ if (FAILED(hr)) {
+ gfxCriticalError() << "Failed to get the description " << hexa(hr) << ", " << mSize << ", " << (int)mVerifyBuffersFailed;
+ HandleError(hr);
+ return false;
+ }
+
+ if (((swapDesc.BufferDesc.Width == mSize.width &&
+ swapDesc.BufferDesc.Height == mSize.height) ||
+ mSize.width <= 0 || mSize.height <= 0) &&
+ !mVerifyBuffersFailed) {
+ return true;
+ }
+
+ ID3D11RenderTargetView* view = nullptr;
+ mContext->OMSetRenderTargets(1, &view, nullptr);
+
+ if (mDefaultRT) {
+ RefPtr<ID3D11RenderTargetView> rtView = mDefaultRT->mRTView;
+ RefPtr<ID3D11ShaderResourceView> srView = mDefaultRT->mSRV;
+
+ // Make sure the texture, which belongs to the swapchain, is destroyed
+ // before resizing the swapchain.
+ if (mCurrentRT == mDefaultRT) {
+ mCurrentRT = nullptr;
+ }
+ MOZ_ASSERT(mDefaultRT->hasOneRef());
+ mDefaultRT = nullptr;
+
+ RefPtr<ID3D11Resource> resource;
+ rtView->GetResource(getter_AddRefs(resource));
+
+ ULONG newRefCnt = rtView.forget().take()->Release();
+
+ if (newRefCnt > 0) {
+ gfxCriticalError() << "mRTView not destroyed on final release! RefCnt: " << newRefCnt;
+ }
+
+ if (srView) {
+ newRefCnt = srView.forget().take()->Release();
+
+ if (newRefCnt > 0) {
+ gfxCriticalError() << "mSRV not destroyed on final release! RefCnt: " << newRefCnt;
+ }
+ }
+
+ newRefCnt = resource.forget().take()->Release();
+
+ if (newRefCnt > 0) {
+ gfxCriticalError() << "Unexpecting lingering references to backbuffer! RefCnt: " << newRefCnt;
+ }
+ }
+
+ hr = mSwapChain->ResizeBuffers(1, mSize.width, mSize.height,
+ DXGI_FORMAT_B8G8R8A8_UNORM,
+ 0);
+
+ mVerifyBuffersFailed = FAILED(hr);
+ if (mVerifyBuffersFailed) {
+ gfxCriticalNote << "D3D11 swap resize buffers failed " << hexa(hr) << " on " << mSize;
+ HandleError(hr);
+ }
+
+ return !mVerifyBuffersFailed;
+}
+
+bool
+CompositorD3D11::UpdateRenderTarget()
+{
+ EnsureSize();
+ if (!VerifyBufferSize()) {
+ gfxCriticalNote << "Failed VerifyBufferSize in UpdateRenderTarget " << mSize;
+ return false;
+ }
+
+ if (mDefaultRT) {
+ return true;
+ }
+
+ if (mSize.width <= 0 || mSize.height <= 0) {
+ gfxCriticalNote << "Invalid size in UpdateRenderTarget " << mSize << ", " << (int)mVerifyBuffersFailed;
+ return false;
+ }
+
+ HRESULT hr;
+
+ RefPtr<ID3D11Texture2D> backBuf;
+
+ hr = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)backBuf.StartAssignment());
+ if (hr == DXGI_ERROR_INVALID_CALL) {
+ // This happens on some GPUs/drivers when there's a TDR.
+ if (mDevice->GetDeviceRemovedReason() != S_OK) {
+ gfxCriticalError() << "GetBuffer returned invalid call! " << mSize << ", " << (int)mVerifyBuffersFailed;
+ return false;
+ }
+ }
+ if (FAILED(hr)) {
+ gfxCriticalNote << "Failed in UpdateRenderTarget " << hexa(hr) << ", " << mSize << ", " << (int)mVerifyBuffersFailed;
+ HandleError(hr);
+ return false;
+ }
+
+ mDefaultRT = new CompositingRenderTargetD3D11(backBuf, IntPoint(0, 0));
+ mDefaultRT->SetSize(mSize.ToUnknownSize());
+
+ return true;
+}
+
+bool
+DeviceAttachmentsD3D11::InitSyncObject()
+{
+ // Sync object is not supported on WARP.
+ if (DeviceManagerDx::Get()->IsWARP()) {
+ return true;
+ }
+
+ // It's okay to do this on Windows 8. But for now we'll just bail
+ // whenever we're using WARP.
+ CD3D11_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, 1, 1, 1, 1,
+ D3D11_BIND_SHADER_RESOURCE |
+ D3D11_BIND_RENDER_TARGET);
+ desc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
+
+ RefPtr<ID3D11Texture2D> texture;
+ HRESULT hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture));
+ if (Failed(hr, "create sync texture")) {
+ return false;
+ }
+
+ hr = texture->QueryInterface((IDXGIResource**)getter_AddRefs(mSyncTexture));
+ if (Failed(hr, "QI sync texture")) {
+ return false;
+ }
+
+ hr = mSyncTexture->GetSharedHandle(&mSyncHandle);
+ if (FAILED(hr) || !mSyncHandle) {
+ gfxCriticalError() << "Failed to get SharedHandle for sync texture. Result: "
+ << hexa(hr);
+ NS_DispatchToMainThread(NS_NewRunnableFunction([] () -> void {
+ Accumulate(Telemetry::D3D11_SYNC_HANDLE_FAILURE, 1);
+ }));
+ return false;
+ }
+
+ return true;
+}
+
+bool
+DeviceAttachmentsD3D11::InitBlendShaders()
+{
+ if (!mVSQuadBlendShader[MaskType::MaskNone]) {
+ InitVertexShader(sLayerQuadBlendVS, mVSQuadBlendShader, MaskType::MaskNone);
+ InitVertexShader(sLayerQuadBlendMaskVS, mVSQuadBlendShader, MaskType::Mask);
+ }
+ if (!mBlendShader[MaskType::MaskNone]) {
+ InitPixelShader(sBlendShader, mBlendShader, MaskType::MaskNone);
+ }
+ return mInitOkay;
+}
+
+bool
+DeviceAttachmentsD3D11::CreateShaders()
+{
+ InitVertexShader(sLayerQuadVS, mVSQuadShader, MaskType::MaskNone);
+ InitVertexShader(sLayerQuadMaskVS, mVSQuadShader, MaskType::Mask);
+
+ InitPixelShader(sSolidColorShader, mSolidColorShader, MaskType::MaskNone);
+ InitPixelShader(sSolidColorShaderMask, mSolidColorShader, MaskType::Mask);
+ InitPixelShader(sRGBShader, mRGBShader, MaskType::MaskNone);
+ InitPixelShader(sRGBShaderMask, mRGBShader, MaskType::Mask);
+ InitPixelShader(sRGBAShader, mRGBAShader, MaskType::MaskNone);
+ InitPixelShader(sRGBAShaderMask, mRGBAShader, MaskType::Mask);
+ InitPixelShader(sYCbCrShader, mYCbCrShader, MaskType::MaskNone);
+ InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask);
+ if (gfxPrefs::ComponentAlphaEnabled()) {
+ InitPixelShader(sComponentAlphaShader, mComponentAlphaShader, MaskType::MaskNone);
+ InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader, MaskType::Mask);
+ }
+
+ return mInitOkay;
+}
+
+bool
+CompositorD3D11::UpdateConstantBuffers()
+{
+ HRESULT hr;
+ D3D11_MAPPED_SUBRESOURCE resource;
+ resource.pData = nullptr;
+
+ hr = mContext->Map(mAttachments->mVSConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &resource);
+ if (FAILED(hr) || !resource.pData) {
+ gfxCriticalError() << "Failed to map VSConstantBuffer. Result: " << hexa(hr) << ", " << (int)mVerifyBuffersFailed;
+ HandleError(hr);
+ return false;
+ }
+ *(VertexShaderConstants*)resource.pData = mVSConstants;
+ mContext->Unmap(mAttachments->mVSConstantBuffer, 0);
+ resource.pData = nullptr;
+
+ hr = mContext->Map(mAttachments->mPSConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &resource);
+ if (FAILED(hr) || !resource.pData) {
+ gfxCriticalError() << "Failed to map PSConstantBuffer. Result: " << hexa(hr) << ", " << (int)mVerifyBuffersFailed;
+ HandleError(hr);
+ return false;
+ }
+ *(PixelShaderConstants*)resource.pData = mPSConstants;
+ mContext->Unmap(mAttachments->mPSConstantBuffer, 0);
+
+ ID3D11Buffer *buffer = mAttachments->mVSConstantBuffer;
+
+ mContext->VSSetConstantBuffers(0, 1, &buffer);
+
+ buffer = mAttachments->mPSConstantBuffer;
+ mContext->PSSetConstantBuffers(0, 1, &buffer);
+ return true;
+}
+
+void
+CompositorD3D11::SetSamplerForSamplingFilter(SamplingFilter aSamplingFilter)
+{
+ ID3D11SamplerState *sampler;
+ switch (aSamplingFilter) {
+ case SamplingFilter::POINT:
+ sampler = mAttachments->mPointSamplerState;
+ break;
+ case SamplingFilter::LINEAR:
+ default:
+ sampler = mAttachments->mLinearSamplerState;
+ break;
+ }
+
+ mContext->PSSetSamplers(0, 1, &sampler);
+}
+
+void
+CompositorD3D11::PaintToTarget()
+{
+ RefPtr<ID3D11Texture2D> backBuf;
+ HRESULT hr;
+
+ hr = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)backBuf.StartAssignment());
+ if (FAILED(hr)) {
+ gfxCriticalErrorOnce(gfxCriticalError::DefaultOptions(false)) << "Failed in PaintToTarget 1";
+ HandleError(hr);
+ return;
+ }
+
+ D3D11_TEXTURE2D_DESC bbDesc;
+ backBuf->GetDesc(&bbDesc);
+
+ CD3D11_TEXTURE2D_DESC softDesc(bbDesc.Format, bbDesc.Width, bbDesc.Height);
+ softDesc.MipLevels = 1;
+ softDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+ softDesc.Usage = D3D11_USAGE_STAGING;
+ softDesc.BindFlags = 0;
+
+ RefPtr<ID3D11Texture2D> readTexture;
+
+ hr = mDevice->CreateTexture2D(&softDesc, nullptr, getter_AddRefs(readTexture));
+ if (FAILED(hr)) {
+ gfxCriticalErrorOnce(gfxCriticalError::DefaultOptions(false)) << "Failed in PaintToTarget 2";
+ HandleError(hr);
+ return;
+ }
+ mContext->CopyResource(readTexture, backBuf);
+
+ D3D11_MAPPED_SUBRESOURCE map;
+ hr = mContext->Map(readTexture, 0, D3D11_MAP_READ, 0, &map);
+ if (FAILED(hr)) {
+ gfxCriticalErrorOnce(gfxCriticalError::DefaultOptions(false)) << "Failed in PaintToTarget 3";
+ HandleError(hr);
+ return;
+ }
+ RefPtr<DataSourceSurface> sourceSurface =
+ Factory::CreateWrappingDataSourceSurface((uint8_t*)map.pData,
+ map.RowPitch,
+ IntSize(bbDesc.Width, bbDesc.Height),
+ SurfaceFormat::B8G8R8A8);
+ mTarget->CopySurface(sourceSurface,
+ IntRect(0, 0, bbDesc.Width, bbDesc.Height),
+ IntPoint(-mTargetBounds.x, -mTargetBounds.y));
+
+ mTarget->Flush();
+ mContext->Unmap(readTexture, 0);
+}
+
+bool
+CompositorD3D11::Failed(HRESULT hr, const char* aContext)
+{
+ if (SUCCEEDED(hr))
+ return false;
+
+ gfxCriticalNote << "[D3D11] " << aContext << " failed: " << hexa(hr) << ", " << (int)mVerifyBuffersFailed;
+ return true;
+}
+
+void
+CompositorD3D11::HandleError(HRESULT hr, Severity aSeverity)
+{
+ if (SUCCEEDED(hr)) {
+ return;
+ }
+
+ if (aSeverity == Critical) {
+ MOZ_CRASH("GFX: Unrecoverable D3D11 error");
+ }
+
+ if (mDevice && DeviceManagerDx::Get()->GetCompositorDevice() != mDevice) {
+ gfxCriticalNote << "Out of sync D3D11 devices in HandleError, " << (int)mVerifyBuffersFailed;
+ }
+
+ HRESULT hrOnReset = S_OK;
+ bool deviceRemoved = hr == DXGI_ERROR_DEVICE_REMOVED;
+
+ if (deviceRemoved && mDevice) {
+ hrOnReset = mDevice->GetDeviceRemovedReason();
+ } else if (hr == DXGI_ERROR_INVALID_CALL && mDevice) {
+ hrOnReset = mDevice->GetDeviceRemovedReason();
+ if (hrOnReset != S_OK) {
+ deviceRemoved = true;
+ }
+ }
+
+ // Device reset may not be an error on our side, but can mess things up so
+ // it's useful to see it in the reports.
+ gfxCriticalError(CriticalLog::DefaultOptions(!deviceRemoved))
+ << (deviceRemoved ? "[CompositorD3D11] device removed with error code: "
+ : "[CompositorD3D11] error code: ")
+ << hexa(hr) << ", " << hexa(hrOnReset) << ", " << (int)mVerifyBuffersFailed;
+
+ // Crash if we are making invalid calls outside of device removal
+ if (hr == DXGI_ERROR_INVALID_CALL) {
+ gfxDevCrash(deviceRemoved ? LogReason::D3D11InvalidCallDeviceRemoved : LogReason::D3D11InvalidCall) << "Invalid D3D11 api call";
+ }
+
+ if (aSeverity == Recoverable) {
+ NS_WARNING("Encountered a recoverable D3D11 error");
+ }
+}
+
+}
+}
diff --git a/gfx/layers/d3d11/CompositorD3D11.h b/gfx/layers/d3d11/CompositorD3D11.h
new file mode 100644
index 000000000..7a1a5cc7d
--- /dev/null
+++ b/gfx/layers/d3d11/CompositorD3D11.h
@@ -0,0 +1,208 @@
+/* -*- 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_COMPOSITORD3D11_H
+#define MOZILLA_GFX_COMPOSITORD3D11_H
+
+#include "mozilla/gfx/2D.h"
+#include "gfx2DGlue.h"
+#include "mozilla/layers/Compositor.h"
+#include "TextureD3D11.h"
+#include <d3d11.h>
+
+class nsWidget;
+
+namespace mozilla {
+namespace layers {
+
+#define LOGD3D11(param)
+
+struct VertexShaderConstants
+{
+ float layerTransform[4][4];
+ float projection[4][4];
+ float renderTargetOffset[4];
+ gfx::Rect textureCoords;
+ gfx::Rect layerQuad;
+ gfx::Rect maskQuad;
+ float backdropTransform[4][4];
+};
+
+struct PixelShaderConstants
+{
+ float layerColor[4];
+ float layerOpacity[4];
+ int blendConfig[4];
+ float yuvColorMatrix[3][4];
+};
+
+struct DeviceAttachmentsD3D11;
+
+class CompositorD3D11 : public Compositor
+{
+public:
+ CompositorD3D11(CompositorBridgeParent* aParent, widget::CompositorWidget* aWidget);
+ ~CompositorD3D11();
+
+ virtual CompositorD3D11* AsCompositorD3D11() override { return this; }
+
+ virtual bool Initialize(nsCString* const out_failureReason) override;
+
+ virtual TextureFactoryIdentifier
+ GetTextureFactoryIdentifier() override;
+
+ virtual already_AddRefed<DataTextureSource>
+ CreateDataTextureSource(TextureFlags aFlags = TextureFlags::NO_FLAGS) override;
+
+ virtual bool CanUseCanvasLayerForSize(const gfx::IntSize& aSize) override;
+ virtual int32_t GetMaxTextureSize() const final;
+
+ virtual void MakeCurrent(MakeCurrentFlags aFlags = 0) override {}
+
+ virtual already_AddRefed<CompositingRenderTarget>
+ CreateRenderTarget(const gfx::IntRect &aRect,
+ SurfaceInitMode aInit) override;
+
+ virtual already_AddRefed<CompositingRenderTarget>
+ CreateRenderTargetFromSource(const gfx::IntRect& aRect,
+ const CompositingRenderTarget* aSource,
+ const gfx::IntPoint& aSourcePoint) override;
+
+ virtual void SetRenderTarget(CompositingRenderTarget* aSurface) override;
+ virtual CompositingRenderTarget* GetCurrentRenderTarget() const override
+ {
+ return mCurrentRT;
+ }
+
+ virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) override {}
+
+ /**
+ * Declare an offset to use when rendering layers. This will be ignored when
+ * rendering to a target instead of the screen.
+ */
+ virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) override
+ {
+ if (aOffset.x || aOffset.y) {
+ NS_RUNTIMEABORT("SetScreenRenderOffset not supported by CompositorD3D11.");
+ }
+ // If the offset is 0, 0 that's okay.
+ }
+
+ virtual void ClearRect(const gfx::Rect& aRect) override;
+
+ virtual void DrawQuad(const gfx::Rect &aRect,
+ const gfx::IntRect &aClipRect,
+ const EffectChain &aEffectChain,
+ gfx::Float aOpacity,
+ const gfx::Matrix4x4& aTransform,
+ const gfx::Rect& aVisibleRect) override;
+
+ /**
+ * Start a new frame. If aClipRectIn is null, sets *aClipRectOut to the
+ * screen dimensions.
+ */
+ virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
+ const gfx::IntRect *aClipRectIn,
+ const gfx::IntRect& aRenderBounds,
+ const nsIntRegion& aOpaqueRegion,
+ gfx::IntRect *aClipRectOut = nullptr,
+ gfx::IntRect *aRenderBoundsOut = nullptr) override;
+
+ /**
+ * Flush the current frame to the screen.
+ */
+ virtual void EndFrame() override;
+
+ /**
+ * Post rendering stuff if the rendering is outside of this Compositor
+ * e.g., by Composer2D
+ */
+ virtual void EndFrameForExternalComposition(const gfx::Matrix& aTransform) override {}
+
+ /**
+ * Setup the viewport and projection matrix for rendering
+ * to a window of the given dimensions.
+ */
+ virtual void PrepareViewport(const gfx::IntSize& aSize);
+ virtual void PrepareViewport(const gfx::IntSize& aSize, const gfx::Matrix4x4& aProjection,
+ float aZNear, float aZFar);
+
+ virtual bool SupportsPartialTextureUpdate() override { return true; }
+
+#ifdef MOZ_DUMP_PAINTING
+ virtual const char* Name() const override { return "Direct3D 11"; }
+#endif
+
+ virtual LayersBackend GetBackendType() const override {
+ return LayersBackend::LAYERS_D3D11;
+ }
+
+ virtual void ForcePresent();
+
+ ID3D11Device* GetDevice() { return mDevice; }
+
+ ID3D11DeviceContext* GetDC() { return mContext; }
+
+private:
+ enum Severity {
+ Recoverable,
+ DebugAssert,
+ Critical,
+ };
+
+ void HandleError(HRESULT hr, Severity aSeverity = DebugAssert);
+
+ // Same as Failed(), except the severity is critical (with no abort) and
+ // a string prefix must be provided.
+ bool Failed(HRESULT hr, const char* aContext);
+
+ // ensure mSize is up to date with respect to mWidget
+ void EnsureSize();
+ bool VerifyBufferSize();
+ bool UpdateRenderTarget();
+ bool UpdateConstantBuffers();
+ void SetSamplerForSamplingFilter(gfx::SamplingFilter aSamplingFilter);
+ ID3D11PixelShader* GetPSForEffect(Effect *aEffect, MaskType aMaskType);
+ void PaintToTarget();
+ RefPtr<ID3D11Texture2D> CreateTexture(const gfx::IntRect& aRect,
+ const CompositingRenderTarget* aSource,
+ const gfx::IntPoint& aSourcePoint);
+ bool CopyBackdrop(const gfx::IntRect& aRect,
+ RefPtr<ID3D11Texture2D>* aOutTexture,
+ RefPtr<ID3D11ShaderResourceView>* aOutView);
+
+ RefPtr<ID3D11DeviceContext> mContext;
+ RefPtr<ID3D11Device> mDevice;
+ RefPtr<IDXGISwapChain> mSwapChain;
+ RefPtr<CompositingRenderTargetD3D11> mDefaultRT;
+ RefPtr<CompositingRenderTargetD3D11> mCurrentRT;
+
+ RefPtr<ID3D11Query> mQuery;
+
+ DeviceAttachmentsD3D11* mAttachments;
+
+ LayoutDeviceIntSize mSize;
+
+ HWND mHwnd;
+
+ D3D_FEATURE_LEVEL mFeatureLevel;
+
+ VertexShaderConstants mVSConstants;
+ PixelShaderConstants mPSConstants;
+ bool mDisableSequenceForNextFrame;
+ bool mAllowPartialPresents;
+
+ gfx::IntRect mInvalidRect;
+ // This is the clip rect applied to the default DrawTarget (i.e. the window)
+ gfx::IntRect mCurrentClip;
+ nsIntRegion mInvalidRegion;
+
+ bool mVerifyBuffersFailed;
+};
+
+}
+}
+
+#endif
diff --git a/gfx/layers/d3d11/CompositorD3D11.hlsl b/gfx/layers/d3d11/CompositorD3D11.hlsl
new file mode 100644
index 000000000..21175704b
--- /dev/null
+++ b/gfx/layers/d3d11/CompositorD3D11.hlsl
@@ -0,0 +1,421 @@
+/* -*- 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/. */
+
+#include "BlendingHelpers.hlslh"
+#include "BlendShaderConstants.h"
+
+typedef float4 rect;
+
+float4x4 mLayerTransform : register(vs, c0);
+float4x4 mProjection : register(vs, c4);
+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);
+
+row_major float3x3 mYuvColorMatrix : register(ps, c3);
+
+sampler sSampler : register(ps, s0);
+
+// 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;
+};
+
+struct VS_OUTPUT {
+ float4 vPosition : SV_Position;
+ float2 vTexCoords : TEXCOORD0;
+};
+
+struct VS_MASK_OUTPUT {
+ float4 vPosition : SV_Position;
+ float2 vTexCoords : TEXCOORD0;
+ 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;
+};
+
+float2 TexCoords(const float2 aPosition)
+{
+ float2 result;
+ const float2 size = vTextureCoords.zw;
+ result.x = vTextureCoords.x + aPosition.x * size.x;
+ result.y = vTextureCoords.y + aPosition.y * size.y;
+
+ return result;
+}
+
+SamplerState LayerTextureSamplerLinear
+{
+ Filter = MIN_MAG_MIP_LINEAR;
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+
+float4 TransformedPosition(float2 aInPosition)
+{
+ // the current vertex's position on the quad
+ // [x,y,0,1] is mandated by the CSS Transforms spec as the point value to transform
+ float4 position = float4(0, 0, 0, 1);
+
+ // We use 4 component floats to uniquely describe a rectangle, by the structure
+ // of x, y, width, height. This allows us to easily generate the 4 corners
+ // of any rectangle from the 4 corners of the 0,0-1,1 quad that we use as the
+ // stream source for our LayerQuad vertex shader. We do this by doing:
+ // Xout = x + Xin * width
+ // Yout = y + Yin * height
+ float2 size = vLayerQuad.zw;
+ position.x = vLayerQuad.x + aInPosition.x * size.x;
+ position.y = vLayerQuad.y + aInPosition.y * size.y;
+
+ position = mul(mLayerTransform, position);
+
+ return position;
+}
+
+float4 VertexPosition(float4 aTransformedPosition)
+{
+ float4 result;
+ result.w = aTransformedPosition.w;
+ result.xyz = aTransformedPosition.xyz / aTransformedPosition.w;
+ result -= vRenderTargetOffset;
+ result.xyz *= result.w;
+
+ result = mul(mProjection, result);
+
+ 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;
+ float4 position = TransformedPosition(aVertex.vPosition);
+
+ outp.vPosition = VertexPosition(position);
+ outp.vTexCoords = TexCoords(aVertex.vPosition.xy);
+
+ return outp;
+}
+
+VS_MASK_OUTPUT LayerQuadMaskVS(const VS_INPUT aVertex)
+{
+ VS_MASK_OUTPUT outp;
+ float4 position = TransformedPosition(aVertex.vPosition);
+
+ outp.vPosition = VertexPosition(position);
+
+ // calculate the position on the mask texture
+ outp.vMaskCoords.x = (position.x - vMaskQuad.x) / vMaskQuad.z;
+ outp.vMaskCoords.y = (position.y - vMaskQuad.y) / vMaskQuad.w;
+ // We use the w coord to do non-perspective correct interpolation:
+ // the quad might be transformed in 3D, in which case it will have some
+ // perspective. The graphics card will do perspective-correct interpolation
+ // of the texture, but our mask is already transformed and so we require
+ // linear interpolation. Therefore, we must correct the interpolation
+ // ourselves, we do this by multiplying all coords by w here, and dividing by
+ // w in the pixel shader (post-interpolation), we pass w in outp.vMaskCoords.z.
+ // See http://en.wikipedia.org/wiki/Texture_mapping#Perspective_correctness
+ outp.vMaskCoords.z = 1;
+ outp.vMaskCoords *= position.w;
+
+ outp.vTexCoords = TexCoords(aVertex.vPosition.xy);
+
+ return outp;
+}
+
+float4 RGBAShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target
+{
+ float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z;
+ float mask = tMask.Sample(sSampler, maskCoords).r;
+ return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity * mask;
+}
+
+float4 RGBShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target
+{
+ float4 result;
+ result = tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity;
+ result.a = fLayerOpacity;
+
+ float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z;
+ float mask = tMask.Sample(sSampler, maskCoords).r;
+ return result * mask;
+}
+
+/* From Rec601:
+[R] [1.1643835616438356, 0.0, 1.5960267857142858] [ Y - 16]
+[G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708] x [Cb - 128]
+[B] [1.1643835616438356, 2.017232142857143, 8.862867620416422e-17] [Cr - 128]
+
+For [0,1] instead of [0,255], and to 5 places:
+[R] [1.16438, 0.00000, 1.59603] [ Y - 0.06275]
+[G] = [1.16438, -0.39176, -0.81297] x [Cb - 0.50196]
+[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196]
+
+From Rec709:
+[R] [1.1643835616438356, 4.2781193979771426e-17, 1.7927410714285714] [ Y - 16]
+[G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444] x [Cb - 128]
+[B] [1.1643835616438356, 2.1124017857142854, 0.0] [Cr - 128]
+
+For [0,1] instead of [0,255], and to 5 places:
+[R] [1.16438, 0.00000, 1.79274] [ Y - 0.06275]
+[G] = [1.16438, -0.21325, -0.53291] x [Cb - 0.50196]
+[B] [1.16438, 2.11240, 0.00000] [Cr - 0.50196]
+*/
+float4 CalculateYCbCrColor(const float2 aTexCoords)
+{
+ float3 yuv;
+ float4 color;
+
+ yuv.x = tY.Sample(sSampler, aTexCoords).r - 0.06275;
+ yuv.y = tCb.Sample(sSampler, aTexCoords).r - 0.50196;
+ yuv.z = tCr.Sample(sSampler, aTexCoords).r - 0.50196;
+
+ color.rgb = mul(mYuvColorMatrix, yuv);
+ color.a = 1.0f;
+
+ return color;
+}
+
+float4 YCbCrShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target
+{
+ float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z;
+ float mask = tMask.Sample(sSampler, maskCoords).r;
+
+ return CalculateYCbCrColor(aVertex.vTexCoords) * fLayerOpacity * mask;
+}
+
+PS_OUTPUT ComponentAlphaShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target
+{
+ PS_OUTPUT result;
+
+ result.vSrc = tRGB.Sample(sSampler, aVertex.vTexCoords);
+ result.vAlpha = 1.0 - tRGBWhite.Sample(sSampler, aVertex.vTexCoords) + result.vSrc;
+ result.vSrc.a = result.vAlpha.g;
+
+ float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z;
+ float mask = tMask.Sample(sSampler, maskCoords).r;
+ result.vSrc *= fLayerOpacity * mask;
+ result.vAlpha *= fLayerOpacity * mask;
+
+ return result;
+}
+
+float4 SolidColorShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target
+{
+ float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z;
+ float mask = tMask.Sample(sSampler, maskCoords).r;
+ return fLayerColor * mask;
+}
+
+/*
+ * Un-masked versions
+ *************************************************************
+ */
+float4 RGBAShader(const VS_OUTPUT aVertex) : SV_Target
+{
+ return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity;
+}
+
+float4 RGBShader(const VS_OUTPUT aVertex) : SV_Target
+{
+ float4 result;
+ result = tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity;
+ result.a = fLayerOpacity;
+ return result;
+}
+
+float4 YCbCrShader(const VS_OUTPUT aVertex) : SV_Target
+{
+ return CalculateYCbCrColor(aVertex.vTexCoords) * fLayerOpacity;
+}
+
+PS_OUTPUT ComponentAlphaShader(const VS_OUTPUT aVertex) : SV_Target
+{
+ PS_OUTPUT result;
+
+ result.vSrc = tRGB.Sample(sSampler, aVertex.vTexCoords);
+ result.vAlpha = 1.0 - tRGBWhite.Sample(sSampler, aVertex.vTexCoords) + result.vSrc;
+ result.vSrc.a = result.vAlpha.g;
+ result.vSrc *= fLayerOpacity;
+ result.vAlpha *= fLayerOpacity;
+ return result;
+}
+
+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 = 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) {
+ VS_MASK_OUTPUT tmp;
+ tmp.vPosition = aVertex.vPosition;
+ tmp.vTexCoords = aVertex.vTexCoords;
+ tmp.vMaskCoords = aVertex.vMaskCoords;
+
+ 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);
+ }
+
+ 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 float4(0, 0, 0, 0);
+ }
+
+ // 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
new file mode 100755
index 000000000..084dc667a
--- /dev/null
+++ b/gfx/layers/d3d11/CompositorD3D11Shaders.h
@@ -0,0 +1,9434 @@
+struct ShaderBytes { const void* mData; size_t mLength; };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// 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 [unused]
+// float4 fLayerColor; // Offset: 256 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 272 Size: 4 [unused]
+// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 304 Size: 44 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// $Globals cbuffer NA NA cb0 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
+//
+//
+// 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)
+//
+//
+// Runtime generated constant mappings:
+//
+// Target Reg Constant Description
+// ---------- --------------------------------------------------
+// c0 Vertex Shader position offset
+//
+//
+// Level9 shader bytecode:
+//
+ vs_2_x
+ 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
+ mad oPos.xy, r0.w, c0, r0
+ mov oPos.zw, r0
+
+// approximately 15 instruction slots used
+vs_4_0
+dcl_constantbuffer CB0[11], immediateIndexed
+dcl_input v0.xy
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xy
+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 o0.xyzw, cb0[7].xyzw, r0.wwww, r1.xyzw
+mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx
+ret
+// Approximately 13 instruction slots used
+#endif
+
+const BYTE LayerQuadVS[] =
+{
+ 68, 88, 66, 67, 250, 65,
+ 94, 205, 254, 155, 52, 90,
+ 43, 147, 203, 201, 141, 74,
+ 80, 143, 1, 0, 0, 0,
+ 68, 7, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 152, 1, 0, 0, 160, 3,
+ 0, 0, 28, 4, 0, 0,
+ 184, 6, 0, 0, 236, 6,
+ 0, 0, 65, 111, 110, 57,
+ 88, 1, 0, 0, 88, 1,
+ 0, 0, 0, 2, 254, 255,
+ 24, 1, 0, 0, 64, 0,
+ 0, 0, 2, 0, 36, 0,
+ 0, 0, 60, 0, 0, 0,
+ 60, 0, 0, 0, 36, 0,
+ 1, 0, 60, 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,
+ 0, 0, 1, 2, 254, 255,
+ 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,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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, 109, 89,
+ 117, 118, 67, 111, 108, 111,
+ 114, 77, 97, 116, 114, 105,
+ 120, 0, 2, 0, 3, 0,
+ 3, 0, 3, 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, 49,
+ 48, 46, 49, 0, 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, 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
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16
+// float fLayerOpacity; // Offset: 16 Size: 4 [unused]
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// $Globals cbuffer NA NA cb0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_Position 0 xyzw 0 POS float
+// TEXCOORD 0 xy 1 NONE float
+//
+//
+// 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 1 ( FLT, FLT, FLT, FLT)
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ mov oC0, c0
+
+// approximately 1 instruction slot used
+ps_4_0
+dcl_constantbuffer CB0[1], immediateIndexed
+dcl_output o0.xyzw
+mov o0.xyzw, cb0[0].xyzw
+ret
+// Approximately 2 instruction slots used
+#endif
+
+const BYTE SolidColorShader[] =
+{
+ 68, 88, 66, 67, 181, 3,
+ 20, 0, 202, 78, 164, 59,
+ 210, 171, 118, 253, 118, 104,
+ 133, 184, 1, 0, 0, 0,
+ 112, 4, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 132, 0, 0, 0, 204, 0,
+ 0, 0, 72, 1, 0, 0,
+ 228, 3, 0, 0, 60, 4,
+ 0, 0, 65, 111, 110, 57,
+ 68, 0, 0, 0, 68, 0,
+ 0, 0, 0, 2, 255, 255,
+ 20, 0, 0, 0, 48, 0,
+ 0, 0, 1, 0, 36, 0,
+ 0, 0, 48, 0, 0, 0,
+ 48, 0, 0, 0, 36, 0,
+ 0, 0, 48, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0,
+ 0, 0, 0, 0, 1, 2,
+ 255, 255, 1, 0, 0, 2,
+ 0, 8, 15, 128, 0, 0,
+ 228, 160, 255, 255, 0, 0,
+ 83, 72, 68, 82, 64, 0,
+ 0, 0, 64, 0, 0, 0,
+ 16, 0, 0, 0, 89, 0,
+ 0, 4, 70, 142, 32, 0,
+ 0, 0, 0, 0, 1, 0,
+ 0, 0, 101, 0, 0, 3,
+ 242, 32, 16, 0, 0, 0,
+ 0, 0, 54, 0, 0, 6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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, 89, 117, 118,
+ 67, 111, 108, 111, 114, 77,
+ 97, 116, 114, 105, 120, 0,
+ 2, 0, 3, 0, 3, 0,
+ 3, 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, 49, 48, 46, 49, 0,
+ 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, 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
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// $Globals cbuffer NA NA cb0 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.xyz, r0, c0.x
+ mov r0.w, c0.x
+ 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 o0.xyz, r0.xyzx, cb0[1].xxxx
+mov o0.w, cb0[1].x
+ret
+// Approximately 4 instruction slots used
+#endif
+
+const BYTE RGBShader[] =
+{
+ 68, 88, 66, 67, 181, 57,
+ 113, 191, 104, 206, 206, 65,
+ 235, 158, 87, 241, 179, 224,
+ 69, 235, 1, 0, 0, 0,
+ 120, 5, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 204, 0, 0, 0, 136, 1,
+ 0, 0, 4, 2, 0, 0,
+ 236, 4, 0, 0, 68, 5,
+ 0, 0, 65, 111, 110, 57,
+ 140, 0, 0, 0, 140, 0,
+ 0, 0, 0, 2, 255, 255,
+ 88, 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, 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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, 89, 117, 118,
+ 67, 111, 108, 111, 114, 77,
+ 97, 116, 114, 105, 120, 0,
+ 2, 0, 3, 0, 3, 0,
+ 3, 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, 49, 48, 46, 49, 0,
+ 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 sRGBShader = { RGBShader, sizeof(RGBShader) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// $Globals cbuffer NA NA cb0 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
+ mov oC0, r0
+
+// approximately 3 instruction slots used (1 texture, 2 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 o0.xyzw, r0.xyzw, cb0[1].xxxx
+ret
+// Approximately 3 instruction slots used
+#endif
+
+const BYTE RGBAShader[] =
+{
+ 68, 88, 66, 67, 0, 64,
+ 93, 222, 73, 216, 128, 20,
+ 42, 69, 82, 179, 209, 122,
+ 136, 190, 1, 0, 0, 0,
+ 84, 5, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 192, 0, 0, 0, 100, 1,
+ 0, 0, 224, 1, 0, 0,
+ 200, 4, 0, 0, 32, 5,
+ 0, 0, 65, 111, 110, 57,
+ 128, 0, 0, 0, 128, 0,
+ 0, 0, 0, 2, 255, 255,
+ 76, 0, 0, 0, 52, 0,
+ 0, 0, 1,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 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, 89, 117, 118,
+ 67, 111, 108, 111, 114, 77,
+ 97, 116, 114, 105, 120, 0,
+ 2, 0, 3, 0, 3, 0,
+ 3, 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, 49, 48, 46, 49, 0,
+ 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 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// tRGBWhite texture float4 2d t4 1
+// $Globals cbuffer NA NA cb0 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
+// SV_Target 1 xyzw 1 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 t4
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ def c1, 1, 0, 0, 0
+ dcl t0.xy
+ dcl_2d s0
+ dcl_2d s1
+ texld r0, t0, s0
+ texld r1, t0, s1
+ add r1, r0, -r1
+ add r1, r1, c1.x
+ mov r0.w, r1.y
+ mul r1, r1, c0.x
+ mov oC1, r1
+ mul r0, r0, c0.x
+ mov oC0, r0
+
+// approximately 9 instruction slots used (2 texture, 7 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) t4
+dcl_input_ps linear v1.xy
+dcl_output o0.xyzw
+dcl_output o1.xyzw
+dcl_temps 2
+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
+mul o1.xyzw, r0.xyzw, cb0[1].xxxx
+mul o0.xyzw, r1.xyzw, cb0[1].xxxx
+ret
+// Approximately 8 instruction slots used
+#endif
+
+const BYTE ComponentAlphaShader[] =
+{
+ 68, 88, 66, 67, 168, 127,
+ 203, 56, 125, 182, 211, 23,
+ 166, 215, 189, 218, 181, 48,
+ 227, 73, 1, 0, 0, 0,
+ 212, 6, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 64, 1, 0, 0, 160, 2,
+ 0, 0, 28, 3, 0, 0,
+ 48, 6, 0, 0, 136, 6,
+ 0, 0, 65, 111, 110, 57,
+ 0, 1, 0, 0, 0, 1,
+ 0, 0, 0, 2, 255, 255,
+ 200, 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, 4, 0, 1, 0,
+ 0, 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 2, 255, 255, 81, 0,
+ 0, 5, 1, 0, 15, 160,
+ 0, 0, 128, 63, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0,
+ 0, 2, 0, 0, 0, 128,
+ 0, 0, 3, 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, 66, 0,
+ 0, 3, 0, 0, 15, 128,
+ 0, 0, 228, 176, 0, 8,
+ 228, 160, 66, 0, 0, 3,
+ 1, 0, 15, 128, 0, 0,
+ 228, 176, 1, 8, 228, 160,
+ 2, 0, 0, 3, 1, 0,
+ 15, 128, 0, 0, 228, 128,
+ 1, 0, 228, 129, 2, 0,
+ 0, 3, 1, 0, 15, 128,
+ 1, 0, 228, 128, 1, 0,
+ 0, 160, 1, 0, 0, 2,
+ 0, 0, 8, 128, 1, 0,
+ 85, 128, 5, 0, 0, 3,
+ 1, 0, 15, 128, 1, 0,
+ 228, 128, 0, 0, 0, 160,
+ 1, 0,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 108, 2,
+ 0, 0, 0, 0, 0, 0,
+ 136, 2, 0, 0, 224, 0,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 236, 1,
+ 0, 0, 0, 0, 0, 0,
+ 156, 2, 0, 0, 240, 0,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 172, 2,
+ 0, 0, 0, 0, 0, 0,
+ 188, 2, 0, 0, 0, 1,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 172, 2,
+ 0, 0, 0, 0, 0, 0,
+ 199, 2, 0, 0, 16, 1,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 172, 2,
+ 0, 0, 0, 0, 0, 0,
+ 209, 2, 0, 0, 32, 1,
+ 0, 0, 64, 0, 0, 0,
+ 0, 0, 0, 0, 108, 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, 89, 117, 118,
+ 67, 111, 108, 111, 114, 77,
+ 97, 116, 114, 105, 120, 0,
+ 2, 0, 3, 0, 3, 0,
+ 3, 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, 49, 48, 46, 49, 0,
+ 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,
+ 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
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tY texture float4 2d t1 1
+// tCb texture float4 2d t2 1
+// tCr texture float4 2d t3 1
+// $Globals cbuffer NA NA cb0 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)
+// c1 cb0 3 3 ( FLT, FLT, FLT, FLT)
+//
+//
+// Sampler/Resource to DX9 shader sampler mappings:
+//
+// Target Sampler Source Sampler Source Resource
+// -------------- --------------- ----------------
+// s0 s0 t1
+// s1 s0 t2
+// s2 s0 t3
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ def c4, -0.0627499968, -0.50195998, 1, 0
+ dcl t0.xy
+ dcl_2d s0
+ dcl_2d s1
+ dcl_2d s2
+ mov r0.w, c4.z
+ texld r1, t0, s1
+ texld r2, t0, s0
+ add r2.x, r2.x, c4.x
+ add r2.y, r1.x, c4.y
+ texld r1, t0, s2
+ add r2.z, r1.x, c4.y
+ dp3 r0.x, c1, r2
+ dp3 r0.y, c2, r2
+ dp3 r0.z, c3, r2
+ mul r0, r0, c0.x
+ mov oC0, r0
+
+// approximately 12 instruction slots used (3 texture, 9 arithmetic)
+ps_4_0
+dcl_constantbuffer CB0[6], immediateIndexed
+dcl_sampler s0, mode_default
+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
+mov r0.w, l(1.000000)
+sample r1.xyzw, v1.xyxx, t1.xyzw, s0
+add r1.x, r1.x, l(-0.062750)
+sample r2.xyzw, v1.xyxx, t2.xyzw, s0
+add r1.y, r2.x, l(-0.501960)
+sample r2.xyzw, v1.xyxx, t3.xyzw, s0
+add r1.z, r2.x, l(-0.501960)
+dp3 r0.x, cb0[3].xyzx, r1.xyzx
+dp3 r0.y, cb0[4].xyzx, r1.xyzx
+dp3 r0.z, cb0[5].xyzx, r1.xyzx
+mul o0.xyzw, r0.xyzw, cb0[1].xxxx
+ret
+// Approximately 12 instruction slots used
+#endif
+
+const BYTE YCbCrShader[] =
+{
+ 68, 88, 66, 67, 56, 199,
+ 91, 5, 215, 233, 204, 14,
+ 193, 166, 163, 11, 246, 123,
+ 165, 88, 1, 0, 0, 0,
+ 156, 7, 0, 0, 6, 0,
+ 0, 0,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, 0, 0, 0, 0, 0,
+ 136, 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, 89,
+ 117, 118, 67, 111, 108, 111,
+ 114, 77, 97, 116, 114, 105,
+ 120, 0, 2, 0, 3, 0,
+ 3, 0, 3, 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, 49, 48, 46,
+ 49, 0, 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 sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// 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 [unused]
+// float4 fLayerColor; // Offset: 256 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 272 Size: 4 [unused]
+// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 304 Size: 44 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// $Globals cbuffer NA NA cb0 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 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 9 ( FLT, FLT, FLT, FLT)
+//
+//
+// Runtime generated constant mappings:
+//
+// Target Reg Constant Description
+// ---------- --------------------------------------------------
+// c0 Vertex Shader position offset
+//
+//
+// Level9 shader bytecode:
+//
+ vs_2_x
+ def c12, 1, 0, 0, 0
+ dcl_texcoord v0
+ mov r0.z, c12.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
+ add r2.xy, r1, -c11
+ mul r0.x, r0.w, r2.x
+ rcp r0.w, c11.w
+ mul r0.y, r0.w, r2.y
+ mul oT1.xyz, r0, r1.w
+ 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
+ mad oPos.xy, r0.w, c0, r0
+ mov oPos.zw, r0
+
+// approximately 22 instruction slots used
+vs_4_0
+dcl_constantbuffer CB0[12], immediateIndexed
+dcl_input v0.xy
+dcl_output_siv o0.xyzw, position
+dcl_output o1.xy
+dcl_output o2.xyz
+dcl_temps 4
+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 r2.xyzw, r1.xyzw, -cb0[8].xyzw
+mul r1.xyz, r2.wwww, r2.xyzx
+mul r3.xyzw, r1.yyyy, cb0[5].xyzw
+mad r3.xyzw, cb0[4].xyzw, r1.xxxx, r3.xyzw
+mad r3.xyzw, cb0[6].xyzw, r1.zzzz, r3.xyzw
+mad o0.xyzw, cb0[7].xyzw, r2.wwww, r3.xyzw
+mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx
+add r0.xy, r0.xyxx, -cb0[11].xyxx
+div r0.xy, r0.xyxx, cb0[11].zwzz
+mov r0.z, l(1.000000)
+mul o2.xyz, r1.wwww, r0.xyzx
+ret
+// Approximately 18 instruction slots used
+#endif
+
+const BYTE LayerQuadMaskVS[] =
+{
+ 68, 88, 66, 67, 47, 28,
+ 196, 228, 98, 79, 27, 152,
+ 192, 25, 215, 128, 59, 234,
+ 245, 240, 1, 0, 0, 0,
+ 108, 8, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 20, 2, 0, 0, 176, 4,
+ 0, 0, 44, 5, 0, 0,
+ 200, 7, 0, 0, 252, 7,
+ 0, 0, 65, 111, 110, 57,
+ 212, 1, 0, 0, 212, 1,
+ 0, 0, 0, 2, 254, 255,
+ 148, 1, 0, 0, 64, 0,
+ 0, 0, 2, 0, 36, 0,
+ 0, 0, 60, 0, 0, 0,
+ 60, 0, 0, 0, 36, 0,
+ 1, 0, 60, 0, 0, 0,
+ 0, 0, 2, 0, 1, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 9, 0, 3, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 1, 2, 254, 255,
+ 81, 0, 0, 5, 12, 0,
+ 15, 160, 0, 0, 128, 63,
+ 0, 0, 0, 0, 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, 12, 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,
+ 2, 0, 0, 3, 2, 0,
+ 3, 128, 1, 0, 228, 128,
+ 11, 0, 228, 161, 5, 0,
+ 0, 3, 0, 0, 1, 128,
+ 0, 0, 255, 128, 2, 0,
+ 0, 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, 85, 128,
+ 5, 0, 0, 3, 1, 0,
+ 7, 224, 0, 0, 228, 128,
+ 1, 0, 255, 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, 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, 148, 2, 0, 0,
+ 64, 0, 1, 0, 165, 0,
+ 0, 0, 89, 0, 0, 4,
+ 70, 142, 32, 0, 0, 0,
+ 0, 0, 12, 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, 114, 32, 16, 0,
+ 2, 0, 0, 0, 104, 0,
+ 0, 2, 4, 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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,
+ 0, 0, 64, 0, 0, 0,
+ 0, 0, 0, 0, 120, 1,
+ 0, 0, 0, 0, 0, 0,
+ 0, 2, 0, 0, 0, 1,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 168, 1,
+ 0, 0, 0, 0, 0, 0,
+ 12, 2, 0, 0, 16, 1,
+ 0, 0, 4, 0, 0, 0,
+ 0, 0, 0, 0, 28, 2,
+ 0, 0, 0, 0, 0, 0,
+ 44, 2, 0, 0, 32, 1,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 60, 2,
+ 0, 0, 0, 0, 0, 0,
+ 76, 2, 0, 0, 48, 1,
+ 0, 0, 44, 0, 0, 0,
+ 0, 0, 0, 0, 92, 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,
+ 109, 89, 117, 118, 67, 111,
+ 108, 111, 114, 77, 97, 116,
+ 114, 105, 120, 0, 2, 0,
+ 3, 0, 3, 0, 3, 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, 49, 48, 46, 49, 0,
+ 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,
+ 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
+};
+ShaderBytes sLayerQuadMaskVS = { LayerQuadMaskVS, sizeof(LayerQuadMaskVS) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16
+// float fLayerOpacity; // Offset: 16 Size: 4 [unused]
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tMask texture float4 2d t5 1
+// $Globals cbuffer NA NA cb0 1
+//
+//
+//
+// Input signature:
+//
+// Name Index Mask Register SysValue Format Used
+// -------------------- ----- ------ -------- -------- ------- ------
+// SV_Position 0 xyzw 0 POS float
+// TEXCOORD 0 xy 1 NONE float
+// 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 1 ( FLT, FLT, FLT, FLT)
+//
+//
+// Sampler/Resource to DX9 shader sampler mappings:
+//
+// Target Sampler Source Sampler Source Resource
+// -------------- --------------- ----------------
+// s0 s0 t5
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ dcl t1.xyz
+ dcl_2d s0
+ rcp r0.w, t1.z
+ mul r0.xy, r0.w, t1
+ texld r0, r0, s0
+ mul r0, r0.x, c0
+ mov oC0, r0
+
+// approximately 5 instruction slots used (1 texture, 4 arithmetic)
+ps_4_0
+dcl_constantbuffer CB0[1], immediateIndexed
+dcl_sampler s0, mode_default
+dcl_resource_texture2d (float,float,float,float) t5
+dcl_input_ps linear v2.xyz
+dcl_output o0.xyzw
+dcl_temps 1
+div r0.xy, v2.xyxx, v2.zzzz
+sample r0.xyzw, r0.xyxx, t5.xyzw, s0
+mul o0.xyzw, r0.xxxx, cb0[0].xyzw
+ret
+// Approximately 4 instruction slots used
+#endif
+
+const BYTE SolidColorShaderMask[] =
+{
+ 68, 88, 66, 67, 11, 0,
+ 43, 127, 123, 42, 253, 228,
+ 4, 220, 7, 130, 11, 94,
+ 213, 177, 1, 0, 0, 0,
+ 164, 5, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 220, 0, 0, 0, 156, 1,
+ 0, 0, 24, 2, 0, 0,
+ 0, 5, 0, 0, 112, 5,
+ 0, 0, 65, 111, 110, 57,
+ 156, 0, 0, 0, 156, 0,
+ 0, 0, 0, 2, 255, 255,
+ 104, 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, 5, 0,
+ 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0,
+ 0, 0, 1, 2, 255, 255,
+ 31, 0, 0, 2, 0, 0,
+ 0, 128, 1, 0, 7, 176,
+ 31, 0, 0, 2, 0, 0,
+ 0, 144, 0, 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, 0,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 171,
+ 1, 0, 19, 0, 1, 0,
+ 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 109, 89,
+ 117, 118, 67, 111, 108, 111,
+ 114, 77, 97, 116, 114, 105,
+ 120, 0, 2, 0, 3, 0,
+ 3, 0, 3, 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, 49, 48, 46,
+ 49, 0, 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, 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 sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorShaderMask) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// tMask texture float4 2d t5 1
+// $Globals cbuffer NA NA cb0 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 s0 t5
+//
+//
+// 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.xyz, r1, c0.x
+ mov r1.w, c0.x
+ mul r0, r0.x, r1
+ 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_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 v2.xyz
+dcl_output o0.xyzw
+dcl_temps 2
+sample r0.xyzw, v1.xyxx, t0.xyzw, s0
+mul r0.xyz, r0.xyzx, cb0[1].xxxx
+div r1.xy, v2.xyxx, v2.zzzz
+sample r1.xyzw, r1.xyxx, t5.xyzw, s0
+mov r0.w, cb0[1].x
+mul o0.xyzw, r0.xyzw, r1.xxxx
+ret
+// Approximately 7 instruction slots used
+#endif
+
+const BYTE RGBShaderMask[] =
+{
+ 68, 88, 66, 67, 89, 221,
+ 15, 22, 232, 140, 114, 122,
+ 200, 15, 217,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2, 0, 0,
+ 32, 1, 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, 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, 89,
+ 117, 118, 67, 111, 108, 111,
+ 114, 77, 97, 116, 114, 105,
+ 120, 0, 2, 0, 3, 0,
+ 3, 0, 3, 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, 49, 48, 46,
+ 49, 0, 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 sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// tMask texture float4 2d t5 1
+// $Globals cbuffer NA NA cb0 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 s0 t5
+//
+//
+// 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
+ 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) 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, t5.xyzw, s0
+sample r1.xyzw, v1.xyxx, t0.xyzw, s0
+mul r1.xyzw, r1.xyzw, cb0[1].xxxx
+mul o0.xyzw, r0.xxxx, r1.xyzw
+ret
+// Approximately 6 instruction slots used
+#endif
+
+const BYTE RGBAShaderMask[] =
+{
+ 68, 88, 66, 67, 195, 236,
+ 129, 118, 244, 48, 247, 117,
+ 155, 208, 5, 31, 9, 224,
+ 75, 19, 1, 0, 0, 0,
+ 100, 6, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 24, 1, 0, 0, 52, 2,
+ 0, 0, 176, 2, 0, 0,
+ 192, 5, 0, 0, 48, 6,
+ 0, 0, 65, 111, 110, 57,
+ 216, 0, 0, 0, 216, 0,
+ 0, 0, 0, 2, 255, 255,
+ 160, 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, 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, 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0, 0, 184, 2, 0, 0,
+ 0, 1, 0, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 168, 2, 0, 0, 0, 0,
+ 0, 0, 195, 2, 0, 0,
+ 16, 1, 0, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0,
+ 168, 2, 0, 0, 0, 0,
+ 0, 0, 205, 2, 0, 0,
+ 32, 1, 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, 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, 89,
+ 117, 118, 67, 111, 108, 111,
+ 114, 77, 97, 116, 114, 105,
+ 120, 0, 2, 0, 3, 0,
+ 3, 0, 3, 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, 49, 48, 46,
+ 49, 0, 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 sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tY texture float4 2d t1 1
+// tCb texture float4 2d t2 1
+// tCr texture float4 2d t3 1
+// tMask texture float4 2d t5 1
+// $Globals cbuffer NA NA cb0 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)
+// c1 cb0 3 3 ( FLT, FLT, FLT, FLT)
+//
+//
+// Sampler/Resource to DX9 shader sampler mappings:
+//
+// Target Sampler Source Sampler Source Resource
+// -------------- --------------- ----------------
+// s0 s0 t1
+// s1 s0 t2
+// s2 s0 t3
+// s3 s0 t5
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ def c4, -0.0627499968, -0.50195998, 1, 0
+ dcl t0.xy
+ dcl t1.xyz
+ dcl_2d s0
+ dcl_2d s1
+ dcl_2d s2
+ dcl_2d s3
+ mov r0.w, c4.z
+ texld r1, t0, s1
+ texld r2, t0, s0
+ add r2.x, r2.x, c4.x
+ add r2.y, r1.x, c4.y
+ rcp r2.w, t1.z
+ mul r1.xy, r2.w, t1
+ texld r3, t0, s2
+ texld r1, r1, s3
+ add r2.z, r3.x, c4.y
+ dp3 r0.x, c1, r2
+ dp3 r0.y, c2, r2
+ dp3 r0.z, c3, r2
+ mul r0, r0, c0.x
+ mul r0, r1.x, r0
+ mov oC0, r0
+
+// approximately 16 instruction slots used (4 texture, 12 arithmetic)
+ps_4_0
+dcl_constantbuffer CB0[6], immediateIndexed
+dcl_sampler s0, mode_default
+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 v2.xyz
+dcl_output o0.xyzw
+dcl_temps 3
+mov r0.w, l(1.000000)
+sample r1.xyzw, v1.xyxx, t1.xyzw, s0
+add r1.x, r1.x, l(-0.062750)
+sample r2.xyzw, v1.xyxx, t2.xyzw, s0
+add r1.y, r2.x, l(-0.501960)
+sample r2.xyzw, v1.xyxx, t3.xyzw, s0
+add r1.z, r2.x, l(-0.501960)
+dp3 r0.x, cb0[3].xyzx, r1.xyzx
+dp3 r0.y, cb0[4].xyzx, r1.xyzx
+dp3 r0.z, cb0[5].xyzx, r1.xyzx
+mul r0.xyzw, r0.xyzw, cb0[1].xxxx
+div r1.xy, v2.xyxx, v2.zzzz
+sample r1.xyzw, r1.xyxx, t5.xyzw, s0
+mul o0.xyzw, r0.xyzw, r1.xxxx
+ret
+// Approximately 15 instruction slots used
+#endif
+
+const BYTE YCbCrShaderMask[] =
+{
+ 68, 88, 66, 67, 239, 174,
+ 189, 163, 31, 16, 244, 108,
+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0,
+ 2, 128, 1, 0, 0, 128,
+ 4, 0, 85, 160, 6, 0,
+ 0, 2, 2, 0, 8, 128,
+ 1, 0, 170, 176, 5, 0,
+ 0, 3, 1, 0, 3, 128,
+ 2, 0, 255, 128, 1, 0,
+ 228, 176, 66, 0, 0, 3,
+ 3, 0, 15, 128, 0, 0,
+ 228, 176, 2, 8, 228, 160,
+ 66, 0, 0, 3, 1, 0,
+ 15, 128, 1, 0, 228, 128,
+ 3, 8, 228, 160, 2, 0,
+ 0, 3, 2, 0, 4, 128,
+ 3, 0, 0, 128, 4, 0,
+ 85, 160, 8, 0, 0, 3,
+ 0, 0, 1, 128, 1, 0,
+ 228, 160, 2, 0, 228, 128,
+ 8, 0, 0, 3, 0, 0,
+ 2, 128, 2, 0, 228, 160,
+ 2, 0, 228, 128, 8, 0,
+ 0, 3, 0, 0, 4, 128,
+ 3, 0, 228, 160, 2, 0,
+ 228, 128, 5, 0, 0, 3,
+ 0, 0, 15, 128, 0, 0,
+ 228, 128, 0, 0, 0, 160,
+ 5, 0, 0, 3, 0, 0,
+ 15, 128, 1, 0, 0, 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,
+ 68, 2, 0, 0, 64, 0,
+ 0, 0, 145, 0, 0, 0,
+ 89, 0, 0, 4, 70, 142,
+ 32, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 90, 0,
+ 0, 3, 0, 96, 16, 0,
+ 0, 0, 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, 98, 16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 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, 89, 117, 118,
+ 67, 111, 108, 111, 114, 77,
+ 97, 116, 114, 105, 120, 0,
+ 2, 0, 3, 0, 3, 0,
+ 3, 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, 49, 48, 46, 49, 0,
+ 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 sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) };
+#if 0
+//
+// Generated by Microsoft (R) HLSL Shader Compiler 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16 [unused]
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused]
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 [unused]
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// tRGBWhite texture float4 2d t4 1
+// tMask texture float4 2d t5 1
+// $Globals cbuffer NA NA cb0 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
+// SV_Target 1 xyzw 1 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 t4
+// s2 s0 t5
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ def c1, 1, 0, 0, 0
+ dcl t0.xy
+ dcl t1.xyz
+ dcl_2d s0
+ dcl_2d s1
+ dcl_2d s2
+ rcp r0.w, t1.z
+ mul r0.xy, r0.w, t1
+ texld r0, r0, s2
+ mul r0.x, r0.x, c0.x
+ texld r1, t0, s0
+ texld r2, t0, s1
+ add r2, r1, -r2
+ add r2, r2, c1.x
+ mov r1.w, r2.y
+ mul r2, r0.x, r2
+ mul r0, r0.x, r1
+ mov oC0, r0
+ mov oC1, r2
+
+// approximately 13 instruction slots used (3 texture, 10 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) t4
+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_output o1.xyzw
+dcl_temps 3
+div r0.xy, v2.xyxx, v2.zzzz
+sample r0.xyzw, r0.xyxx, t5.xyzw, s0
+mul r0.x, r0.x, cb0[1].x
+sample r1.xyzw, v1.xyxx, t4.xyzw, s0
+sample r2.xyzw, v1.xyxx, t0.xyzw, s0
+add r1.xyzw, -r1.xyzw, r2.xyzw
+add r1.xyzw, r1.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
+mov r2.w, r1.y
+mul o1.xyzw, r0.xxxx, r1.xyzw
+mul o0.xyzw, r0.xxxx, r2.xyzw
+ret
+// Approximately 11 instruction slots used
+#endif
+
+const BYTE ComponentAlphaShaderMask[] =
+{
+ 68, 88, 66, 67, 53, 1,
+ 100, 182, 2, 181, 247, 136,
+ 91, 215, 208, 183, 243, 6,
+ 78, 16, 1, 0, 0, 0,
+ 220, 7, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 152, 1, 0, 0, 108, 3,
+ 0, 0, 232, 3, 0, 0,
+ 32, 7, 0, 0, 144, 7,
+ 0, 0, 65, 111, 110, 57,
+ 88, 1, 0, 0, 88, 1,
+ 0, 0, 0, 2, 255, 255,
+ 28, 1, 0, 0, 60, 0,
+ 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, 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,
+ 1, 0, 15, 160, 0, 0,
+ 128, 63, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 0, 0, 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, 31, 0, 0, 2,
+ 0, 0, 0, 144, 2, 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, 0, 0,
+ 15, 128, 0, 0, 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, 0, 8, 228, 160,
+ 66, 0, 0, 3, 2, 0,
+ 15, 128, 0, 0, 228, 176,
+ 1, 8, 228, 160, 2, 0,
+ 0, 3, 2, 0, 15, 128,
+ 1, 0, 228, 128, 2, 0,
+ 228, 129, 2, 0, 0, 3,
+ 2, 0, 15, 128, 2, 0,
+ 228, 128, 1, 0, 0, 160,
+ 1, 0, 0, 2, 1, 0,
+ 8, 128, 2, 0, 85, 128,
+ 5, 0, 0, 3, 2, 0,
+ 15, 128, 0, 0, 0, 128,
+ 2, 0, 228, 128, 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, 1, 0, 0, 2,
+ 1, 8, 15, 128, 2, 0,
+ 228, 128, 255, 255, 0, 0,
+ 83, 72, 68, 82, 204, 1,
+ 0, 0, 64, 0, 0, 0,
+ 115, 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,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111, 108, 111, 114, 77,
+ 97, 116, 114, 105, 120, 0,
+ 2, 0, 3, 0, 3, 0,
+ 3, 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, 49, 48, 46, 49, 0,
+ 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, 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 10.1
+//
+//
+// 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]
+// row_major float3x3 mYuvColorMatrix;// Offset: 304 Size: 44 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// $Globals cbuffer NA NA cb0 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, 36, 1,
+ 251, 17, 122, 90, 56, 20,
+ 13, 210, 38, 20, 162, 170,
+ 120, 203, 1, 0, 0, 0,
+ 56, 9, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 60, 2, 0, 0, 100, 5,
+ 0, 0, 224, 5, 0, 0,
+ 124, 8, 0, 0, 176, 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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 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,
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 0, 0, 44, 0, 0, 0,
+ 0, 0, 0, 0, 92, 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,
+ 109, 89, 117, 118, 67, 111,
+ 108, 111, 114, 77, 97, 116,
+ 114, 105, 120, 0, 2, 0,
+ 3, 0, 3, 0, 3, 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, 49, 48, 46, 49, 0,
+ 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 10.1
+//
+//
+// 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]
+// row_major float3x3 mYuvColorMatrix;// Offset: 304 Size: 44 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// $Globals cbuffer NA NA cb0 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
+ add r2.xy, r1, -c11
+ mul r0.x, r0.w, r2.x
+ rcp r0.w, c11.w
+ mul r0.y, r0.w, r2.y
+ mul oT1.xyz, r0, r1.w
+ 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
+
+// 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 4
+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 r2.xyzw, r1.xyzw, -cb0[8].xyzw
+mul r1.xyz, r2.wwww, r2.xyzx
+mul r3.xyzw, r1.yyyy, cb0[5].xyzw
+mad r3.xyzw, cb0[4].xyzw, r1.xxxx, r3.xyzw
+mad r3.xyzw, cb0[6].xyzw, r1.zzzz, r3.xyzw
+mad r2.xyzw, cb0[7].xyzw, r2.wwww, r3.xyzw
+mov o0.xyzw, r2.xyzw
+add r0.zw, r2.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
+mad r0.w, -r0.w, l(0.500000), l(1.000000)
+mul r0.z, r0.z, l(0.500000)
+mul r1.xy, r0.wwww, cb0[13].xyxx
+mad r0.zw, cb0[12].xxxy, r0.zzzz, r1.xxxy
+add o1.zw, r0.zzzw, cb0[15].xxxy
+mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx
+add r0.xy, r0.xyxx, -cb0[11].xyxx
+div r0.xy, r0.xyxx, cb0[11].zwzz
+mov r0.z, l(1.000000)
+mul o2.xyz, r1.wwww, r0.xyzx
+ret
+// Approximately 25 instruction slots used
+#endif
+
+const BYTE LayerQuadBlendMaskVS[] =
+{
+ 68, 88, 66, 67, 206, 205,
+ 172, 45, 15, 157, 207, 85,
+ 247, 28, 223, 137, 10, 58,
+ 17, 237, 1, 0, 0, 0,
+ 236, 9, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 136, 2, 0, 0, 24, 6,
+ 0, 0, 148, 6, 0, 0,
+ 48, 9, 0, 0, 100, 9,
+ 0, 0, 65, 111, 110, 57,
+ 72, 2, 0, 0, 72, 2,
+ 0, 0, 0, 2, 254, 255,
+ 252, 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,
+ 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,
+ 2, 0, 0, 3, 2, 0,
+ 3, 128, 1, 0, 228, 128,
+ 11, 0, 228, 161, 5, 0,
+ 0, 3, 0, 0, 1, 128,
+ 0, 0, 255, 128, 2, 0,
+ 0, 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, 85, 128,
+ 5, 0, 0, 3, 1, 0,
+ 7, 224, 0, 0, 228, 128,
+ 1, 0, 255, 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,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, 0, 0, 0,
+ 0, 0, 0, 0, 28, 2,
+ 0, 0, 0, 0, 0, 0,
+ 44, 2, 0, 0, 32, 1,
+ 0, 0, 16, 0, 0, 0,
+ 0, 0, 0, 0, 60, 2,
+ 0, 0, 0, 0, 0, 0,
+ 76, 2, 0, 0, 48, 1,
+ 0, 0, 44, 0, 0, 0,
+ 0, 0, 0, 0, 92, 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,
+ 109, 89, 117, 118, 67, 111,
+ 108, 111, 114, 77, 97, 116,
+ 114, 105, 120, 0, 2, 0,
+ 3, 0, 3, 0, 3, 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, 49, 48, 46, 49, 0,
+ 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 10.1
+//
+//
+// Buffer Definitions:
+//
+// cbuffer $Globals
+// {
+//
+// float4 fLayerColor; // Offset: 0 Size: 16
+// float fLayerOpacity; // Offset: 16 Size: 4
+// uint4 iBlendConfig; // Offset: 32 Size: 16
+// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44
+// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused]
+// float4x4 mProjection; // Offset: 160 Size: 64 [unused]
+// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused]
+// float4 vTextureCoords; // Offset: 240 Size: 16 [unused]
+// float4 vLayerQuad; // Offset: 256 Size: 16 [unused]
+// float4 vMaskQuad; // Offset: 272 Size: 16 [unused]
+// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused]
+//
+// }
+//
+//
+// Resource Bindings:
+//
+// Name Type Format Dim HLSL Bind Count
+// ------------------------------ ---------- ------- ----------- -------------- ------
+// sSampler sampler NA NA s0 1
+// tRGB texture float4 2d t0 1
+// tY texture float4 2d t1 1
+// tCb texture float4 2d t2 1
+// tCr texture float4 2d t3 1
+// tMask texture float4 2d t5 1
+// tBackdrop texture float4 2d t6 1
+// $Globals cbuffer NA NA cb0 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)
+// c3 cb0 3 3 ( FLT, FLT, FLT, FLT)
+//
+//
+// 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
+//
+//
+// Level9 shader bytecode:
+//
+ ps_2_x
+ def c6, -1, -2, -0.0627499968, -0.50195998
+ def c7, -2, -3, -4, -5
+ def c8, -6, -7, -8, -9
+ def c9, 0.5, 1, 0.25, -2
+ def c10, 16, -12, -14, 0
+ def c11, -10, -11, -12, -13
+ def c12, 0.300000012, 0.589999974, 0.109999999, 0
+ def c13, -1, -0, 0, 1
+ dcl t0
+ dcl t1.xyz
+ dcl_2d s0
+ dcl_2d s1
+ dcl_2d s2
+ dcl_2d s3
+ dcl_2d s4
+ dcl_2d s5
+ mov r0.x, c13.z
+ mov r1.x, c13.z
+ mov r2.z, c13.z
+ mov r3.w, -c6.x
+ texld r4, t0, s2
+ texld r5, t0, s1
+ add r5.x, r5.x, c6.z
+ add r5.y, r4.x, c6.w
+ rcp r0.w, t1.z
+ mul r4.xy, r0.w, t1
+ texld r6, t0, s3
+ texld r4, r4, s4
+ add r5.z, r6.x, c6.w
+ dp3 r3.x, c3, r5
+ dp3 r3.y, c4, r5
+ dp3 r3.z, c5, r5
+ mul r3, r3, c1.x
+ mul r5, r4.x, r3
+ mov r6.xy, t0.wzzw
+ texld r7, t0, s0
+ texld r6, r6, s5
+ mul r7, r7, c1.x
+ mul r8, r4.x, r7
+ mov r9.xy, c6
+ add r10, r9.xyxx, c2.xxyz
+ mul r10, r10, r10
+ cmp r5, -r10.x, r8, r5
+ cmp r3, -r10.x, r7, r3
+ mov r7.w, c1.x
+ mul r8, r4.x, r7
+ cmp r3, -c2.x, r7, r3
+ mul r4, r4.x, c0
+ cmp r5, -c2.x, r8, r5
+ cmp r7.xy, -r10.yzzw, c13.x, c13.y
+ cmp r0.w, -r10.x, c6.x, r7.x
+ cmp r1.w, -c2.y, r9.x, r7.y
+ cmp r0.w, -c2.x, r9.x, r0.w
+ cmp r4, r0.w, r4, r5
+ cmp r3, r0.w, c0, r3
+ cmp r3, -c2.y, r3, r4
+ cmp r3, r1.w, c13.zzzw, 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 r7.w, r0.w, -r1.w
+ rcp r0.w, r6.w
+ mul r8.xyz, r0.w, r6
+ mad r5.zw, r6.xyzy, r0.w, -r8.xyxz
+ mul r9.xy, r7.w, r5.zwzw
+ mad r11, r6.yxxz, r0.w, -r8.xzyy
+ rcp r1.w, r11.x
+ mul r7.y, r1.w, r9.x
+ cmp r1.yz, r11.z, c13.z, r7.xwyw
+ mul r12, r7.w, r11
+ rcp r1.w, r5.w
+ mul r7.x, r1.w, r12.y
+ cmp r2.xy, r11.w, c13.z, r7.xwzw
+ cmp r1.xyz, r5.z, r1, r2
+ rcp r1.w, r5.z
+ mul r7.z, r1.w, r12.x
+ cmp r0.yz, r11.y, c13.z, r7.xzww
+ cmp r0.xyz, r11.w, r0, r1
+ mov r1.y, c13.z
+ mov r2.y, c13.z
+ mov r10.z, c13.z
+ rcp r1.w, r11.z
+ mul r7.y, r1.w, r12.w
+ cmp r2.xz, r11.x, c13.z, r7.wyyw
+ rcp r1.w, r11.y
+ mul r7.x, r1.w, r9.y
+ cmp r10.xy, r5.z, c13.z, r7.wxzw
+ cmp r2.xyz, r11.w, r2, r10
+ rcp r1.w, r11.w
+ mul r7.z, r1.w, r12.z
+ cmp r1.xz, r5.w, c13.z, r7.zyww
+ cmp r1.xyz, r5.z, r1, r2
+ cmp r0.xyz, r11.x, r0, r1
+ cmp r1.xy, r11.z, r8, r8.yxzw
+ dp3 r4.w, c12, r0
+ dp3 r8.w, c12, 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, c12, 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, -c6.x
+ mul r2.yzw, r1.w, r2
+ add r1.w, -r1.z, r2.x
+ add r4.w, -r2.x, -c6.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.z, r4.w, c10.z
+ mul r1.z, r1.z, r1.z
+ dp3 r1.w, c12, r4
+ add r2.x, -r8.w, r1.w
+ add r1.w, -r1.w, r8.w
+ add r2.yzw, r1.w, r4.xxyz
+ mad r7.xyz, r6, r0.w, r2.x
+ add r1.w, -r7.y, r7.x
+ cmp r5.zw, r1.w, r7.xyyx, r7.xyxy
+ min r1.w, r7.z, r5.z
+ max r2.x, r5.w, r7.z
+ dp3 r7.w, c12, r7
+ add r5.z, -r1.w, r7.w
+ rcp r5.z, r5.z
+ add r9.xyz, -r7.w, r7
+ mul r9.xyz, r7.w, r9
+ mad r9.xyz, r9, r5.z, r7.w
+ cmp r7.xyz, r1.w, r7, r9
+ add r9.xyz, -r7.w, r7
+ add r1.w, -r7.w, -c6.x
+ mul r9.xyz, r1.w, r9
+ add r1.w, r2.x, -r7.w
+ add r9.w, -r2.x, -c6.x
+ rcp r1.w, r1.w
+ mad r9.xyz, r9, r1.w, r7.w
+ cmp r7.xyz, r9.w, r7, r9
+ cmp r7.xyz, -r1.z, r7, c13.z
+ add r7.w, -r2.z, r2.y
+ cmp r1.zw, r7.w, r2.xyzy, r2.xyyz
+ min r7.w, r2.w, r1.z
+ max r5.z, r1.w, r2.w
+ dp3 r5.w, c12, r2.yzww
+ add r1.z, -r7.w, r5.w
+ rcp r1.z, r1.z
+ add r9.xyz, r2.yzww, -r5.w
+ mul r9.xyz, r5.w, r9
+ mad r9.xyz, r9, r1.z, r5.w
+ cmp r2.xyz, r7.w, r2.yzww, r9
+ add r9.xyz, -r5.w, r2
+ add r2.w, -r5.w, -c6.x
+ mul r9.xyz, r2.w, r9
+ add r2.w, -r5.w, r5.z
+ add r7.w, -r5.z, -c6.x
+ rcp r2.w, r2.w
+ mad r9.xyz, r9, r2.w, r5.w
+ cmp r2.xyz, r7.w, r2, r9
+ add r9, r4.w, c11
+ mul r9, r9, r9
+ cmp r2.xyz, -r9.w, r2, r7
+ cmp r0.xyz, -r9.z, r0, r2
+ add r2, -r4.xxzy, r4.yzxz
+ mov r7.y, c13.z
+ mov r10.y, c13.z
+ mov r11.z, c13.z
+ rcp r7.w, r2.z
+ max r11.w, r1.x, r8.z
+ min r5.z, r8.z, r1.y
+ add r1.w, -r5.z, r11.w
+ mul r5.zw, r1.w, r5.xyxy
+ mul r1.x, r7.w, r5.w
+ cmp r11.xy, r2.y, c13.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, c13.z, r1.wyyw
+ cmp r10.xyz, r2.w, r10, r11
+ rcp r5.w, r2.w
+ mul r1.z, r5.w, r5.z
+ cmp r7.xz, r5.y, c13.z, r1.zyww
+ cmp r7.xyz, r2.y, r7, r10
+ mov r10.x, c13.z
+ mov r11.x, c13.z
+ mov r13.z, c13.z
+ rcp r7.w, r2.x
+ mul r1.y, r7.w, r12.y
+ cmp r11.yz, r5.x, c13.z, r1.xwyw
+ rcp r7.w, r5.y
+ mul r1.x, r7.w, r12.z
+ cmp r13.xy, r2.w, c13.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, c13.z, r1.xzww
+ cmp r1.xyz, r2.w, r10, r5
+ cmp r1.xyz, r2.x, r1, r7
+ dp3 r1.w, c12, 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 r8.w, r1.z, r2.x
+ max r5.x, r2.y, r1.z
+ dp3 r1.w, c12, r1
+ add r2.x, -r8.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, r8.w, r1, r2
+ add r2.xyz, -r1.w, r1
+ add r2.w, -r1.w, -c6.x
+ mul r2.xyz, r2.w, r2
+ add r2.w, -r1.w, r5.x
+ add r8.w, -r5.x, -c6.x
+ rcp r2.w, r2.w
+ mad r2.xyz, r2, r2.w, r1.w
+ cmp r1.xyz, r8.w, r1, r2
+ cmp r0.xyz, -r9.y, r1, r0
+ mad r1.xyz, r6, r0.w, r4
+ mul r2.xyz, r4, r8
+ mad r5.xyz, r2, c6.y, r1
+ mad r1.xyz, r8, -r4, r1
+ cmp r0.xyz, -r9.x, r5, r0
+ mad r5.xyz, r6, r0.w, -r4
+ abs r5.xyz, r5
+ add r7, r4.w, c8
+ mul r7, r7, r7
+ cmp r0.xyz, -r7.w, r5, r0
+ add r5.xy, -r4.yzzw, c9.x
+ mad r9.xyz, r4, -c9.w, -c9.y
+ mad r1.w, r6.z, -r0.w, c9.z
+ mad r10.xyz, r8, c10.x, c10.y
+ mad r10.xyz, r10, r8, -c7.z
+ mul r10.xyz, r8, r10
+ rsq r2.w, r8.z
+ rcp r2.w, r2.w
+ cmp r1.w, r1.w, r10.z, r2.w
+ mad r1.w, r6.z, -r0.w, r1.w
+ mad r1.w, r9.z, r1.w, r8.z
+ mad r11.xyz, r4, c6.y, -c6.x
+ mul r11.xyz, r8, r11
+ mad r12, r6.yzxy, -r0.w, c9.yyzz
+ mad r5.zw, r11.xyyz, -r12.xyxy, r8.xyyz
+ cmp r13.z, r5.y, r5.w, r1.w
+ rsq r1.w, r8.y
+ rcp r1.w, r1.w
+ cmp r1.w, r12.w, r10.y, r1.w
+ mad r1.w, r6.y, -r0.w, r1.w
+ mad r1.w, r9.y, r1.w, r8.y
+ cmp r13.y, r5.x, r5.z, r1.w
+ add r14, -r4.xyzx, c9.yyyx
+ rsq r1.w, r8.x
+ rcp r1.w, r1.w
+ cmp r1.w, r12.z, r10.x, r1.w
+ mad r1.w, r6.x, -r0.w, r1.w
+ mad r1.w, r9.x, r1.w, r8.x
+ mad r9, r6.xyzx, -r0.w, c9.xxxy
+ mad r6.xyz, r6, r0.w, c6.x
+ mul r6.xyz, r6, r6
+ mad r0.w, r11.x, -r9.w, r8.x
+ cmp r13.x, r14.w, r0.w, r1.w
+ cmp r0.xyz, -r7.z, r13, r0
+ add r10.xyz, r8, r8
+ mad r11.xyz, r4, -c6.y, r10
+ add r11.xyz, r11, c6.x
+ mad r13.xyz, r4, -r10, r11
+ mul r10.xyz, r4, r10
+ add r15.xyz, r4, r4
+ mul r16.xyz, r8, r15
+ mad r11.xyz, r15, -r8, r11
+ cmp r9.xyz, r9, r10, r11
+ cmp r5.yz, r5.xxyw, r16, r13
+ cmp r5.x, r14.w, r16.x, r13.x
+ cmp r0.xyz, -r7.y, r5, r0
+ rcp r0.w, r4.x
+ mad r0.w, r9.w, -r0.w, -c6.x
+ max r1.w, r0.w, c13.z
+ mul r5.xyz, r4, r4
+ cmp r0.w, -r5.x, c13.z, r1.w
+ cmp r10.x, -r6.x, -c6.x, r0.w
+ rcp r0.w, r4.y
+ mad r0.w, r12.x, -r0.w, -c6.x
+ max r1.w, r0.w, c13.z
+ cmp r0.w, -r5.y, c13.z, r1.w
+ cmp r10.y, -r6.y, -c6.x, r0.w
+ rcp r0.w, r4.z
+ mad r0.w, r12.y, -r0.w, -c6.x
+ max r1.w, r0.w, c13.z
+ cmp r0.w, -r5.z, c13.z, r1.w
+ cmp r10.z, -r6.z, -c6.x, r0.w
+ cmp r0.xyz, -r7.x, r10, r0
+ add r5, r4.w, c7
+ mul r5, r5, r5
+ add r6.xyz, r4, c6.x
+ mul r6.xyz, r6, r6
+ rcp r0.w, r14.x
+ mul r0.w, r0.w, r8.x
+ min r1.w, r0.w, -c6.x
+ cmp r0.w, -r6.x, -c6.x, r1.w
+ mul r7.xyz, r8, r8
+ cmp r10.x, -r7.x, c13.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, -c6.x
+ cmp r1.w, -r6.z, -c6.x, r2.w
+ cmp r10.z, -r7.z, c13.z, r1.w
+ mul r0.w, r0.w, r8.y
+ min r1.w, r0.w, -c6.x
+ cmp r0.w, -r6.y, -c6.x, r1.w
+ cmp r10.y, -r7.y, c13.z, r0.w
+ cmp r0.xyz, -r5.w, r10, r0
+ max r6.xyz, r8, r4
+ min r7.xyz, r4, r8
+ cmp r0.xyz, -r5.z, r6, r0
+ cmp r0.xyz, -r5.y, r7, r0
+ cmp r0.xyz, -r5.x, r9, r0
+ cmp r0.xyz, -r10.w, r1, r0
+ cmp r0.xyz, -c2.z, r2, r0
+ lrp r1.xyz, r6.w, r0, r4
+ mul r1.w, r6.w, r6.w
+ mul r0.xyz, r3.w, r1
+ mul r1.x, r3.w, r3.w
+ mov r0.w, r3.w
+ cmp r0, -r1.x, c13.z, r0
+ cmp r0, -r1.w, r3, r0
+ mov oC0, r0
+
+// approximately 323 instruction slots used (6 texture, 317 arithmetic)
+ps_4_0
+dcl_constantbuffer CB0[6], 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_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, t1.xyzw, s0
+ add r3.x, r3.x, l(-0.062750)
+ sample r4.xyzw, v1.xyxx, t2.xyzw, s0
+ add r3.y, r4.x, l(-0.501960)
+ sample r4.xyzw, v1.xyxx, t3.xyzw, s0
+ add r3.z, r4.x, l(-0.501960)
+ dp3 r4.x, cb0[3].xyzx, r3.xyzx
+ dp3 r4.y, cb0[4].xyzx, r3.xyzx
+ dp3 r4.z, cb0[5].xyzx, r3.xyzx
+ 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.x, l(1), cb0[2].y
+ if_nz r2.x
+ if_z cb0[2].x
+ sample r3.xyzw, v1.xyxx, t0.xyzw, s0
+ mul r3.xyz, r3.xyzx, cb0[1].xxxx
+ div r2.yz, v2.xxyx, v2.zzzz
+ sample r4.xyzw, r2.yzyy, 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
+ div r2.zw, v2.xxxy, v2.zzzz
+ sample r3.xyzw, r2.zwzz, 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
+ div r2.zw, v2.xxxy, v2.zzzz
+ sample r3.xyzw, r2.zwzz, t5.xyzw, s0
+ sample r4.xyzw, v1.xyxx, t1.xyzw, s0
+ add r4.x, r4.x, l(-0.062750)
+ sample r5.xyzw, v1.xyxx, t2.xyzw, s0
+ add r4.y, r5.x, l(-0.501960)
+ sample r5.xyzw, v1.xyxx, t3.xyzw, s0
+ add r4.z, r5.x, l(-0.501960)
+ dp3 r5.x, cb0[3].xyzx, r4.xyzx
+ dp3 r5.y, cb0[4].xyzx, r4.xyzx
+ dp3 r5.z, cb0[5].xyzx, r4.xyzx
+ mov r5.w, l(1.000000)
+ mul r4.xyzw, r5.xyzw, cb0[1].xxxx
+ mul r1.xyzw, r3.xxxx, r4.xyzw
+ endif
+ endif
+ endif
+ if_z r2.y
+ div r2.yz, v2.xxyx, v2.zzzz
+ sample r3.xyzw, r2.yzyy, t5.xyzw, s0
+ mul r1.xyzw, r3.xxxx, cb0[0].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, l(0,0,0,0)
+ 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 333 instruction slots used
+#endif
+
+const BYTE BlendShader[] =
+{
+ 68, 88, 66, 67, 28, 114,
+ 244, 41, 206, 5, 116, 244,
+ 79, 130, 118, 154, 72, 188,
+ 36, 32, 1, 0, 0, 0,
+ 172, 66, 0, 0, 6, 0,
+ 0, 0, 56, 0, 0, 0,
+ 16, 23, 0, 0, 208, 61,
+ 0, 0, 76, 62, 0, 0,
+ 240, 65, 0, 0, 120, 66,
+ 0, 0, 65, 111, 110, 57,
+ 208, 22, 0, 0, 208, 22,
+ 0, 0, 0, 2, 255, 255,
+ 112, 22, 0, 0, 96, 0,
+ 0, 0, 3, 0, 60, 0,
+ 0, 0, 96, 0, 0, 0,
+ 96, 0, 6, 0, 36, 0,
+ 0, 0, 96, 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, 0, 0,
+ 0, 0, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 2, 0, 1, 0, 2, 0,
+ 3, 3, 3, 3, 0, 0,
+ 3, 0, 3, 0, 3, 0,
+ 0, 0, 0, 0, 1, 2,
+ 255, 255, 81, 0, 0, 5,
+ 6, 0, 15, 160, 0, 0,
+ 128, 191, 0, 0, 0, 192,
+ 18, 131, 128, 189, 115, 128,
+ 0, 191, 81, 0, 0, 5,
+ 7, 0, 15, 160, 0, 0,
+ 0, 192, 0, 0, 64, 192,
+ 0, 0, 128, 192, 0, 0,
+ 160, 192, 81, 0, 0, 5,
+ 8, 0, 15, 160, 0, 0,
+ 192, 192, 0, 0, 224, 192,
+ 0, 0, 0, 193, 0, 0,
+ 16, 193, 81, 0, 0, 5,
+ 9, 0, 15, 160, 0, 0,
+ 0, 63, 0, 0, 128, 63,
+ 0, 0, 128, 62, 0, 0,
+ 0, 192, 81, 0, 0, 5,
+ 10, 0, 15, 160, 0, 0,
+ 128, 65, 0, 0, 64, 193,
+ 0, 0, 96, 193, 0, 0,
+ 0, 0, 81, 0, 0, 5,
+ 11, 0, 15, 160, 0, 0,
+ 32, 193, 0, 0, 48, 193,
+ 0, 0, 64, 193, 0, 0,
+ 80, 193, 81, 0, 0, 5,
+ 12, 0, 15, 160, 154, 153,
+ 153, 62, 61, 10, 23, 63,
+ 174, 71, 225, 61, 0, 0,
+ 0, 0, 81, 0, 0, 5,
+ 13, 0, 15, 160, 0, 0,
+ 128, 191, 0, 0, 0, 128,
+ 0, 0, 0, 0, 0, 0,
+ 128, 63, 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, 1, 0, 0, 2,
+ 0, 0, 1, 128, 13, 0,
+ 170, 160, 1, 0, 0, 2,
+ 1, 0, 1, 128, 13, 0,
+ 170, 160, 1, 0, 0, 2,
+ 2, 0, 4, 128, 13, 0,
+ 170, 160, 1, 0, 0, 2,
+ 3, 0, 8, 128, 6, 0,
+ 0, 161, 66, 0, 0, 3,
+ 4, 0, 15, 128, 0, 0,
+ 228, 176, 2, 8, 228, 160,
+ 66, 0, 0, 3, 5, 0,
+ 15, 128, 0, 0, 228, 176,
+ 1, 8, 228, 160, 2, 0,
+ 0, 3, 5, 0, 1, 128,
+ 5, 0, 0, 128, 6, 0,
+ 170, 160, 2, 0, 0, 3,
+ 5, 0, 2, 128, 4, 0,
+ 0, 128, 6, 0, 255, 160,
+ 6, 0, 0, 2, 0, 0,
+ 8, 128, 1, 0, 170, 176,
+ 5, 0, 0, 3, 4, 0,
+ 3, 128, 0, 0, 255, 128,
+ 1, 0, 228, 176, 66, 0,
+ 0, 3, 6, 0, 15, 128,
+ 0, 0, 228, 176, 3, 8,
+ 228, 160, 66, 0, 0, 3,
+ 4, 0, 15, 128, 4, 0,
+ 228, 128, 4, 8, 228, 160,
+ 2, 0, 0, 3, 5, 0,
+ 4, 128, 6, 0, 0, 128,
+ 6, 0, 255, 160, 8, 0,
+ 0, 3, 3, 0, 1, 128,
+ 3, 0, 228, 160, 5, 0,
+ 228, 128, 8, 0, 0, 3,
+ 3, 0, 2, 128, 4, 0,
+ 228, 160, 5, 0, 228, 128,
+ 8, 0, 0, 3, 3, 0,
+ 4, 128, 5, 0, 228, 160,
+ 5, 0, 228, 128, 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,
+ 1, 0, 0, 2, 6, 0,
+ 3, 128, 0, 0, 235, 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, 5, 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,
+ 6, 0, 228, 160, 2, 0,
+ 0, 3, 10, 0, 15, 128,
+ 9, 0, 4, 128, 2, 0,
+ 144, 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, 88, 0, 0, 4,
+ 3, 0, 15, 128, 10, 0,
+ 0, 129, 7, 0, 228, 128,
+ 3, 0, 228, 128, 1, 0,
+ 0, 2, 7, 0, 8, 128,
+ 1, 0, 0, 160, 5, 0,
+ 0, 3, 8, 0, 15, 128,
+ 4, 0, 0, 128, 7, 0,
+ 228, 128, 88, 0, 0, 4,
+ 3, 0, 15, 128, 2, 0,
+ 0, 161, 7, 0, 228, 128,
+ 3, 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, 8, 0, 228, 128,
+ 5, 0, 228, 128, 88, 0,
+ 0, 4, 7, 0, 3, 128,
+ 10, 0, 233, 129, 13, 0,
+ 0, 160, 13, 0, 85, 160,
+ 88, 0, 0, 4, 0, 0,
+ 8, 128, 10, 0, 0, 129,
+ 6, 0, 0, 160, 7, 0,
+ 0, 128, 88, 0, 0, 4,
+ 1, 0, 8, 128, 2, 0,
+ 85, 161, 9, 0, 0, 128,
+ 7, 0, 85, 128, 88, 0,
+ 0, 4, 0, 0, 8, 128,
+ 2, 0, 0, 161, 9, 0,
+ 0, 128, 0, 0, 255, 128,
+ 88, 0, 0, 4, 4, 0,
+ 15, 128, 0, 0, 255, 128,
+ 4, 0, 228, 128, 5, 0,
+ 228, 128, 88, 0, 0, 4,
+ 3, 0, 15, 128, 0, 0,
+ 255, 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, 1, 0, 255, 128,
+ 13, 0, 234, 160, 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, 7, 0, 8, 128,
+ 0, 0, 255, 128, 1, 0,
+ 255, 129, 6, 0, 0, 2,
+ 0, 0, 8, 128, 6, 0,
+ 255, 128, 5, 0, 0, 3,
+ 8, 0, 7, 128, 0, 0,
+ 255, 128, 6, 0, 228, 128,
+ 4, 0, 0, 4, 5, 0,
+ 12, 128, 6, 0, 100, 128,
+ 0, 0, 255, 128, 8, 0,
+ 132, 129, 5, 0, 0, 3,
+ 9, 0, 3, 128, 7, 0,
+ 255, 128, 5, 0, 238, 128,
+ 4, 0, 0, 4, 11, 0,
+ 15, 128, 6, 0, 129, 128,
+ 0, 0, 255, 128, 8, 0,
+ 88, 129, 6, 0, 0, 2,
+ 1, 0, 8, 128, 11, 0,
+ 0, 128, 5, 0, 0, 3,
+ 7, 0, 2, 128, 1, 0,
+ 255, 128, 9, 0, 0, 128,
+ 88, 0, 0, 4, 1, 0,
+ 6, 128, 11, 0, 170, 128,
+ 13, 0, 170, 160, 7, 0,
+ 220, 128, 5, 0, 0, 3,
+ 12, 0, 15, 128, 7, 0,
+ 255, 128, 11, 0, 228, 128,
+ 6, 0, 0, 2, 1, 0,
+ 8, 128, 5, 0, 255, 128,
+ 5, 0, 0, 3, 7, 0,
+ 1, 128, 1, 0, 255, 128,
+ 12, 0, 85, 128, 88, 0,
+ 0, 4, 2, 0, 3, 128,
+ 11, 0, 255, 128, 13, 0,
+ 170, 160, 7, 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,
+ 7, 0, 4, 128, 1, 0,
+ 255, 128, 12, 0, 0, 128,
+ 88, 0, 0, 4, 0, 0,
+ 6, 128, 11, 0, 85, 128,
+ 13, 0, 170, 160, 7, 0,
+ 248, 128, 88, 0, 0, 4,
+ 0, 0, 7, 128, 11, 0,
+ 255, 128, 0, 0, 228, 128,
+ 1, 0, 228, 128, 1, 0,
+ 0, 2, 1, 0, 2, 128,
+ 13, 0, 170, 160, 1, 0,
+ 0, 2, 2, 0, 2, 128,
+ 13, 0, 170, 160, 1, 0,
+ 0, 2, 10, 0, 4, 128,
+ 13, 0, 170, 160, 6, 0,
+ 0, 2, 1, 0, 8, 128,
+ 11, 0, 170, 128, 5, 0,
+ 0, 3, 7, 0, 2, 128,
+ 1, 0, 255, 128, 12, 0,
+ 255, 128, 88, 0, 0, 4,
+ 2, 0, 5, 128, 11, 0,
+ 0, 128, 13, 0, 170, 160,
+ 7, 0, 215, 128, 6, 0,
+ 0, 2, 1, 0, 8, 128,
+ 11, 0, 85, 128, 5, 0,
+ 0, 3, 7, 0, 1, 128,
+ 1, 0, 255, 128, 9, 0,
+ 85, 128, 88, 0, 0, 4,
+ 10, 0, 3, 128, 5, 0,
+ 170, 128, 13, 0, 170, 160,
+ 7, 0, 227, 128, 88, 0,
+ 0, 4, 2, 0, 7, 128,
+ 11, 0, 255, 128, 2, 0,
+ 228, 128, 10, 0, 228, 128,
+ 6, 0, 0, 2, 1, 0,
+ 8, 128, 11, 0, 255, 128,
+ 5, 0, 0, 3, 7, 0,
+ 4, 128, 1, 0, 255, 128,
+ 12, 0, 170, 128, 88, 0,
+ 0, 4, 1, 0, 5, 128,
+ 5, 0, 255, 128, 13, 0,
+ 170, 160, 7, 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, 11, 0,
+ 0, 128, 0, 0, 228, 128,
+ 1, 0, 228, 128, 88, 0,
+ 0, 4, 1, 0, 3, 128,
+ 11, 0, 170, 128, 8, 0,
+ 228, 128, 8, 0, 225, 128,
+ 8, 0, 0, 3, 4, 0,
+ 8, 128, 12, 0, 228, 160,
+ 0, 0, 228, 128, 8, 0,
+ 0, 3, 8, 0, 8, 128,
+ 12, 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, 12, 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,
+ 6, 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,
+ 6, 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, 4, 128, 4, 0,
+ 255, 128, 10, 0, 170, 160,
+ 5, 0, 0, 3, 1, 0,
+ 4, 128, 1, 0, 170, 128,
+ 1, 0, 170, 128, 8, 0,
+ 0, 3, 1, 0, 8, 128,
+ 12, 0, 228, 160, 4, 0,
+ 228, 128, 2, 0, 0, 3,
+ 2, 0, 1, 128, 8, 0,
+ 255, 129, 1, 0, 255, 128,
+ 2, 0, 0, 3, 1, 0,
+ 8, 128, 1, 0, 255, 129,
+ 8, 0, 255, 128, 2, 0,
+ 0, 3, 2, 0, 14, 128,
+ 1, 0, 255, 128, 4, 0,
+ 144, 128, 4, 0, 0, 4,
+ 7, 0, 7, 128, 6, 0,
+ 228, 128, 0, 0, 255, 128,
+ 2, 0, 0, 128, 2, 0,
+ 0, 3, 1, 0, 8, 128,
+ 7, 0, 85, 129, 7, 0,
+ 0, 128, 88, 0, 0, 4,
+ 5, 0, 12, 128, 1, 0,
+ 255, 128, 7, 0, 20, 128,
+ 7, 0, 68, 128, 10, 0,
+ 0, 3, 1, 0, 8, 128,
+ 7, 0, 170, 128, 5, 0,
+ 170, 128, 11, 0, 0, 3,
+ 2, 0, 1, 128, 5, 0,
+ 255, 128, 7, 0, 170, 128,
+ 8, 0, 0, 3, 7, 0,
+ 8, 128, 12, 0, 228, 160,
+ 7, 0, 228, 128, 2, 0,
+ 0, 3, 5, 0, 4, 128,
+ 1, 0, 255, 129, 7, 0,
+ 255, 128, 6, 0, 0, 2,
+ 5, 0, 4, 128, 5, 0,
+ 170, 128, 2, 0, 0, 3,
+ 9, 0, 7, 128, 7, 0,
+ 255, 129, 7, 0, 228, 128,
+ 5, 0, 0, 3, 9, 0,
+ 7, 128, 7, 0, 255, 128,
+ 9, 0, 228, 128, 4, 0,
+ 0, 4, 9, 0, 7, 128,
+ 9, 0, 228, 128, 5, 0,
+ 170, 128, 7, 0, 255, 128,
+ 88, 0, 0, 4, 7, 0,
+ 7, 128, 1, 0, 255, 128,
+ 7, 0, 228, 128, 9, 0,
+ 228, 128, 2, 0, 0, 3,
+ 9, 0, 7, 128, 7, 0,
+ 255, 129, 7, 0, 228, 128,
+ 2, 0, 0, 3, 1, 0,
+ 8, 128, 7, 0, 255, 129,
+ 6, 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,
+ 0, 128, 7, 0, 255, 129,
+ 2, 0, 0, 3, 9, 0,
+ 8, 128, 2, 0, 0, 129,
+ 6, 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, 7, 0, 255, 128,
+ 88, 0, 0, 4, 7, 0,
+ 7, 128, 9, 0, 255, 128,
+ 7, 0, 228, 128, 9, 0,
+ 228, 128, 88, 0, 0, 4,
+ 7, 0, 7, 128, 1, 0,
+ 170, 129, 7, 0, 228, 128,
+ 13, 0, 170, 160, 2, 0,
+ 0, 3, 7, 0, 8, 128,
+ 2, 0, 170, 129, 2, 0,
+ 85, 128, 88, 0, 0, 4,
+ 1, 0, 12, 128, 7, 0,
+ 255, 128, 2, 0, 100, 128,
+ 2, 0, 148, 128, 10, 0,
+ 0, 3, 7, 0, 8, 128,
+ 2, 0, 255, 128, 1, 0,
+ 170, 128, 11, 0, 0, 3,
+ 5, 0, 4, 128, 1, 0,
+ 255, 128, 2, 0, 255, 128,
+ 8, 0, 0, 3, 5, 0,
+ 8, 128, 12, 0, 228, 160,
+ 2, 0, 249, 128, 2, 0,
+ 0, 3, 1, 0, 4, 128,
+ 7, 0, 255, 129, 5, 0,
+ 255, 128, 6, 0, 0, 2,
+ 1, 0, 4, 128, 1, 0,
+ 170, 128, 2, 0, 0, 3,
+ 9, 0, 7, 128, 2, 0,
+ 249, 128, 5, 0, 255, 129,
+ 5, 0, 0, 3, 9, 0,
+ 7, 128, 5, 0, 255, 128,
+ 9, 0, 228, 128, 4, 0,
+ 0, 4, 9, 0, 7, 128,
+ 9, 0, 228, 128, 1, 0,
+ 170, 128, 5, 0, 255, 128,
+ 88, 0, 0, 4, 2, 0,
+ 7, 128, 7, 0, 255, 128,
+ 2, 0, 249, 128, 9, 0,
+ 228, 128, 2, 0, 0, 3,
+ 9, 0, 7, 128, 5, 0,
+ 255, 129, 2, 0, 228, 128,
+ 2, 0, 0, 3, 2, 0,
+ 8, 128, 5, 0, 255, 129,
+ 6, 0, 0, 161, 5, 0,
+ 0, 3, 9, 0, 7, 128,
+ 2, 0, 255, 128, 9, 0,
+ 228, 128, 2, 0, 0, 3,
+ 2, 0, 8, 128, 5, 0,
+ 255, 129, 5, 0, 170, 128,
+ 2, 0, 0, 3, 7, 0,
+ 8, 128, 5, 0, 170, 129,
+ 6, 0, 0, 161, 6, 0,
+ 0, 2, 2, 0, 8, 128,
+ 2, 0, 255, 128, 4, 0,
+ 0, 4, 9, 0, 7, 128,
+ 9, 0, 228, 128, 2, 0,
+ 255, 128, 5, 0, 255, 128,
+ 88, 0, 0, 4, 2, 0,
+ 7, 128, 7, 0, 255, 128,
+ 2, 0, 228, 128, 9, 0,
+ 228, 128, 2, 0, 0, 3,
+ 9, 0, 15, 128, 4, 0,
+ 255, 128, 11, 0, 228, 160,
+ 5, 0, 0, 3, 9, 0,
+ 15, 128, 9, 0, 228, 128,
+ 9, 0, 228, 128, 88, 0,
+ 0, 4, 2, 0, 7, 128,
+ 9, 0, 255, 129, 2, 0,
+ 228, 128, 7, 0, 228, 128,
+ 88, 0, 0, 4, 0, 0,
+ 7, 128, 9, 0, 170, 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, 7, 0,
+ 2, 128, 13, 0, 170, 160,
+ 1, 0, 0, 2, 10, 0,
+ 2, 128, 13, 0, 170, 160,
+ 1, 0, 0, 2, 11, 0,
+ 4, 128, 13, 0, 170, 160,
+ 6, 0, 0, 2, 7, 0,
+ 8, 128, 2, 0, 170, 128,
+ 11, 0, 0, 3, 11, 0,
+ 8, 128, 1, 0, 0, 128,
+ 8, 0, 170, 128, 10, 0,
+ 0, 3, 5, 0, 4, 128,
+ 8, 0, 170, 128, 1, 0,
+ 85, 128, 2, 0, 0, 3,
+ 1, 0, 8, 128, 5, 0,
+ 170, 129, 11, 0, 255, 128,
+ 5, 0, 0, 3, 5, 0,
+ 12, 128, 1, 0, 255, 128,
+ 5, 0, 68, 128, 5, 0,
+ 0, 3, 1, 0, 1, 128,
+ 7, 0, 255, 128, 5, 0,
+ 255, 128, 88, 0, 0, 4,
+ 11, 0, 3, 128, 2, 0,
+ 85, 128, 13, 0, 170, 160,
+ 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,
+ 13, 0, 170, 160, 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,
+ 7, 0, 5, 128, 5, 0,
+ 85, 128, 13, 0, 170, 160,
+ 1, 0, 246, 128, 88, 0,
+ 0, 4, 7, 0, 7, 128,
+ 2, 0, 85, 128, 7, 0,
+ 228, 128, 10, 0, 228, 128,
+ 1, 0, 0, 2, 10, 0,
+ 1, 128, 13, 0, 170, 160,
+ 1, 0, 0, 2, 11, 0,
+ 1, 128, 13, 0, 170, 160,
+ 1, 0, 0, 2, 13, 0,
+ 4, 128, 13, 0, 170, 160,
+ 6, 0, 0, 2, 7, 0,
+ 8, 128, 2, 0, 0, 128,
+ 5, 0, 0, 3, 1, 0,
+ 2, 128, 7, 0, 255, 128,
+ 12, 0, 85, 128, 88, 0,
+ 0, 4, 11, 0, 6, 128,
+ 5, 0, 0, 128, 13, 0,
+ 170, 160, 1, 0, 220, 128,
+ 6, 0, 0, 2, 7, 0,
+ 8, 128, 5, 0, 85, 128,
+ 5, 0, 0, 3, 1, 0,
+ 1, 128, 7, 0, 255, 128,
+ 12, 0, 170, 128, 88, 0,
+ 0, 4, 13, 0, 3, 128,
+ 2, 0, 255, 128, 13, 0,
+ 170, 160, 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,
+ 13, 0, 170, 160, 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, 7, 0, 228, 128,
+ 8, 0, 0, 3, 1, 0,
+ 8, 128, 12, 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, 8, 0,
+ 8, 128, 1, 0, 170, 128,
+ 2, 0, 0, 128, 11, 0,
+ 0, 3, 5, 0, 1, 128,
+ 2, 0, 85, 128, 1, 0,
+ 170, 128, 8, 0, 0, 3,
+ 1, 0, 8, 128, 12, 0,
+ 228, 160, 1, 0, 228, 128,
+ 2, 0, 0, 3, 2, 0,
+ 1, 128, 8, 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, 8, 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, 6, 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, 5, 0,
+ 0, 128, 2, 0, 0, 3,
+ 8, 0, 8, 128, 5, 0,
+ 0, 129, 6, 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, 8, 0,
+ 255, 128, 1, 0, 228, 128,
+ 2, 0, 228, 128, 88, 0,
+ 0, 4, 0, 0, 7, 128,
+ 9, 0, 85, 129, 1, 0,
+ 228, 128, 0, 0, 228, 128,
+ 4, 0, 0, 4, 1, 0,
+ 7, 128, 6, 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,
+ 6, 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,
+ 9, 0, 0, 129, 5, 0,
+ 228, 128, 0, 0, 228, 128,
+ 4, 0, 0, 4, 5, 0,
+ 7, 128, 6, 0, 228, 128,
+ 0, 0, 255, 128, 4, 0,
+ 228, 129, 35, 0, 0, 2,
+ 5, 0, 7, 128, 5, 0,
+ 228, 128, 2, 0, 0, 3,
+ 7, 0, 15, 128, 4, 0,
+ 255, 128, 8, 0, 228, 160,
+ 5, 0, 0, 3, 7, 0,
+ 15, 128, 7, 0, 228, 128,
+ 7, 0, 228, 128, 88, 0,
+ 0, 4, 0, 0, 7, 128,
+ 7, 0, 255, 129, 5, 0,
+ 228, 128, 0, 0, 228, 128,
+ 2, 0, 0, 3, 5, 0,
+ 3, 128, 4, 0, 233, 129,
+ 9, 0, 0, 160, 4, 0,
+ 0, 4, 9, 0, 7, 128,
+ 4, 0, 228, 128, 9, 0,
+ 255, 161, 9, 0, 85, 161,
+ 4, 0, 0, 4, 1, 0,
+ 8, 128, 6, 0, 170, 128,
+ 0, 0, 255, 129, 9, 0,
+ 170, 160, 4, 0, 0, 4,
+ 10, 0, 7, 128, 8, 0,
+ 228, 128, 10, 0, 0, 160,
+ 10, 0, 85, 160, 4, 0,
+ 0, 4, 10, 0, 7, 128,
+ 10, 0, 228, 128, 8, 0,
+ 228, 128, 7, 0, 170, 161,
+ 5, 0, 0, 3, 10, 0,
+ 7, 128, 8, 0, 228, 128,
+ 10, 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, 10, 0,
+ 170, 128, 2, 0, 255, 128,
+ 4, 0, 0, 4, 1, 0,
+ 8, 128, 6, 0, 170, 128,
+ 0, 0, 255, 129, 1, 0,
+ 255, 128, 4, 0, 0, 4,
+ 1, 0, 8, 128, 9, 0,
+ 170, 128, 1, 0, 255, 128,
+ 8, 0, 170, 128, 4, 0,
+ 0, 4, 11, 0, 7, 128,
+ 4, 0, 228, 128, 6, 0,
+ 85, 160, 6, 0, 0, 161,
+ 5, 0, 0, 3, 11, 0,
+ 7, 128, 8, 0, 228, 128,
+ 11, 0, 228, 128, 4, 0,
+ 0, 4, 12, 0, 15, 128,
+ 6, 0, 73, 128, 0, 0,
+ 255, 129, 9, 0, 165, 160,
+ 4, 0, 0, 4, 5, 0,
+ 12, 128, 11, 0, 148, 128,
+ 12, 0, 68, 129, 8, 0,
+ 148, 128, 88, 0, 0, 4,
+ 13, 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,
+ 12, 0, 255, 128, 10, 0,
+ 85, 128, 1, 0, 255, 128,
+ 4, 0, 0, 4, 1, 0,
+ 8, 128, 6, 0, 85, 128,
+ 0, 0, 255, 129, 1, 0,
+ 255, 128, 4, 0, 0, 4,
+ 1, 0, 8, 128, 9, 0,
+ 85, 128, 1, 0, 255, 128,
+ 8, 0, 85, 128, 88, 0,
+ 0, 4, 13, 0, 2, 128,
+ 5, 0, 0, 128, 5, 0,
+ 170, 128, 1, 0, 255, 128,
+ 2, 0, 0, 3, 14, 0,
+ 15, 128, 4, 0, 36, 129,
+ 9, 0, 21, 160, 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,
+ 12, 0, 170, 128, 10, 0,
+ 0, 128, 1, 0, 255, 128,
+ 4, 0, 0, 4, 1, 0,
+ 8, 128, 6, 0, 0, 128,
+ 0, 0, 255, 129, 1, 0,
+ 255, 128, 4, 0, 0, 4,
+ 1, 0, 8, 128, 9, 0,
+ 0, 128, 1, 0, 255, 128,
+ 8, 0, 0, 128, 4, 0,
+ 0, 4, 9, 0, 15, 128,
+ 6, 0, 36, 128, 0, 0,
+ 255, 129, 9, 0, 64, 160,
+ 4, 0, 0, 4, 6, 0,
+ 7, 128, 6, 0, 228, 128,
+ 0, 0, 255, 128, 6, 0,
+ 0, 160, 5, 0, 0, 3,
+ 6, 0, 7, 128, 6, 0,
+ 228, 128, 6, 0, 228, 128,
+ 4, 0, 0, 4, 0, 0,
+ 8, 128, 11, 0, 0, 128,
+ 9, 0, 255, 129, 8, 0,
+ 0, 128, 88, 0, 0, 4,
+ 13, 0, 1, 128, 14, 0,
+ 255, 128, 0, 0, 255, 128,
+ 1, 0, 255, 128, 88, 0,
+ 0, 4, 0, 0, 7, 128,
+ 7, 0, 170, 129, 13, 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, 11, 0, 7, 128,
+ 4, 0, 228, 128, 6, 0,
+ 85, 161, 10, 0, 228, 128,
+ 2, 0, 0, 3, 11, 0,
+ 7, 128, 11, 0, 228, 128,
+ 6, 0, 0, 160, 4, 0,
+ 0, 4, 13, 0, 7, 128,
+ 4, 0, 228, 128, 10, 0,
+ 228, 129, 11, 0, 228, 128,
+ 5, 0, 0, 3, 10, 0,
+ 7, 128, 4, 0, 228, 128,
+ 10, 0, 228, 128, 2, 0,
+ 0, 3, 15, 0, 7, 128,
+ 4, 0, 228, 128, 4, 0,
+ 228, 128, 5, 0, 0, 3,
+ 16, 0, 7, 128, 8, 0,
+ 228, 128, 15, 0, 228, 128,
+ 4, 0, 0, 4, 11, 0,
+ 7, 128, 15, 0, 228, 128,
+ 8, 0, 228, 129, 11, 0,
+ 228, 128, 88, 0, 0, 4,
+ 9, 0, 7, 128, 9, 0,
+ 228, 128, 10, 0, 228, 128,
+ 11, 0, 228, 128, 88, 0,
+ 0, 4, 5, 0, 6, 128,
+ 5, 0, 208, 128, 16, 0,
+ 228, 128, 13, 0, 228, 128,
+ 88, 0, 0, 4, 5, 0,
+ 1, 128, 14, 0, 255, 128,
+ 16, 0, 0, 128, 13, 0,
+ 0, 128, 88, 0, 0, 4,
+ 0, 0, 7, 128, 7, 0,
+ 85, 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,
+ 9, 0, 255, 128, 0, 0,
+ 255, 129, 6, 0, 0, 161,
+ 11, 0, 0, 3, 1, 0,
+ 8, 128, 0, 0, 255, 128,
+ 13, 0, 170, 160, 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, 13, 0, 170, 160,
+ 1, 0, 255, 128, 88, 0,
+ 0, 4, 10, 0, 1, 128,
+ 6, 0, 0, 129, 6, 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, 12, 0, 0, 128,
+ 0, 0, 255, 129, 6, 0,
+ 0, 161, 11, 0, 0, 3,
+ 1, 0, 8, 128, 0, 0,
+ 255, 128, 13, 0, 170, 160,
+ 88, 0, 0, 4, 0, 0,
+ 8, 128, 5, 0, 85, 129,
+ 13, 0, 170, 160, 1, 0,
+ 255, 128, 88, 0, 0, 4,
+ 10, 0, 2, 128, 6, 0,
+ 85, 129, 6, 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,
+ 12, 0, 85, 128, 0, 0,
+ 255, 129, 6, 0, 0, 161,
+ 11, 0, 0, 3, 1, 0,
+ 8, 128, 0, 0, 255, 128,
+ 13, 0, 170, 160, 88, 0,
+ 0, 4, 0, 0, 8, 128,
+ 5, 0, 170, 129, 13, 0,
+ 170, 160, 1, 0, 255, 128,
+ 88, 0, 0, 4, 10, 0,
+ 4, 128, 6, 0, 170, 129,
+ 6, 0, 0, 161, 0, 0,
+ 255, 128, 88, 0, 0, 4,
+ 0, 0, 7, 128, 7, 0,
+ 0, 129, 10, 0, 228, 128,
+ 0, 0, 228, 128, 2, 0,
+ 0, 3, 5, 0, 15, 128,
+ 4, 0, 255, 128, 7, 0,
+ 228, 160, 5, 0, 0, 3,
+ 5, 0, 15, 128, 5, 0,
+ 228, 128, 5, 0, 228, 128,
+ 2, 0, 0, 3, 6, 0,
+ 7, 128, 4, 0, 228, 128,
+ 6, 0, 0, 160, 5, 0,
+ 0, 3, 6, 0, 7, 128,
+ 6, 0, 228, 128, 6, 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,
+ 6, 0, 0, 161, 88, 0,
+ 0, 4, 0, 0, 8, 128,
+ 6, 0, 0, 129, 6, 0,
+ 0, 161, 1, 0, 255, 128,
+ 5, 0, 0, 3, 7, 0,
+ 7, 128, 8, 0, 228, 128,
+ 8, 0, 228, 128, 88, 0,
+ 0, 4, 10, 0, 1, 128,
+ 7, 0, 0, 129, 13, 0,
+ 170, 160, 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, 6, 0,
+ 0, 161, 88, 0, 0, 4,
+ 1, 0, 8, 128, 6, 0,
+ 170, 129, 6, 0, 0, 161,
+ 2, 0, 255, 128, 88, 0,
+ 0, 4, 10, 0, 4, 128,
+ 7, 0, 170, 129, 13, 0,
+ 170, 160, 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, 6, 0,
+ 0, 161, 88, 0, 0, 4,
+ 0, 0, 8, 128, 6, 0,
+ 85, 129, 6, 0, 0, 161,
+ 1, 0, 255, 128, 88, 0,
+ 0, 4, 10, 0, 2, 128,
+ 7, 0, 85, 129, 13, 0,
+ 170, 160, 0, 0, 255, 128,
+ 88, 0, 0, 4, 0, 0,
+ 7, 128, 5, 0, 255, 129,
+ 10, 0, 228, 128, 0, 0,
+ 228, 128, 11, 0, 0, 3,
+ 6, 0, 7, 128, 8, 0,
+ 228, 128, 4, 0, 228, 128,
+ 10, 0, 0, 3, 7, 0,
+ 7, 128, 4, 0, 228, 128,
+ 8, 0, 228, 128, 88, 0,
+ 0, 4, 0, 0, 7, 128,
+ 5, 0, 170, 129, 6, 0,
+ 228, 128, 0, 0, 228, 128,
+ 88, 0, 0, 4, 0, 0,
+ 7, 128, 5, 0, 85, 129,
+ 7, 0, 228, 128, 0, 0,
+ 228, 128, 88, 0, 0, 4,
+ 0, 0, 7, 128, 5, 0,
+ 0, 129, 9, 0, 228, 128,
+ 0, 0, 228, 128, 88, 0,
+ 0, 4, 0, 0, 7, 128,
+ 10, 0, 255, 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, 6, 0,
+ 255, 128, 0, 0, 228, 128,
+ 4, 0, 228, 128, 5, 0,
+ 0, 3, 1, 0, 8, 128,
+ 6, 0, 255, 128, 6, 0,
+ 255, 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, 13, 0,
+ 170, 160, 0, 0, 228, 128,
+ 88, 0, 0, 4, 0, 0,
+ 15, 128, 1, 0, 255, 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, 184, 38,
+ 0, 0, 64, 0, 0, 0,
+ 174, 9, 0, 0, 89, 0,
+ 0, 4, 70, 142, 32, 0,
+ 0, 0, 0, 0, 6, 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, 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, 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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, 89,
+ 117, 118, 67, 111, 108, 111,
+ 114, 77, 97, 116, 114, 105,
+ 120, 0, 2, 0, 3, 0,
+ 3, 0, 3, 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, 49, 48, 46,
+ 49, 0, 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,
+ 116, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 1, 0,
+ 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 sBlendShader = { BlendShader, sizeof(BlendShader) };
diff --git a/gfx/layers/d3d11/ReadbackManagerD3D11.cpp b/gfx/layers/d3d11/ReadbackManagerD3D11.cpp
new file mode 100644
index 000000000..88d75869d
--- /dev/null
+++ b/gfx/layers/d3d11/ReadbackManagerD3D11.cpp
@@ -0,0 +1,160 @@
+/* -*- 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/. */
+
+#include "ReadbackManagerD3D11.h"
+#include "ReadbackProcessor.h"
+#include "ReadbackLayer.h"
+#include "mozilla/layers/TextureClient.h"
+#include "mozilla/gfx/2D.h"
+
+#include "nsIThread.h"
+#include "nsThreadUtils.h"
+
+namespace mozilla {
+
+using namespace gfx;
+
+namespace layers {
+
+// Structure that contains the information required to execute a readback task,
+// the only member accessed off the main thread here is mReadbackTexture. Since
+// mSink may be released only on the main thread this object should always be
+// destroyed on the main thread!
+struct ReadbackTask {
+ // The texture that we copied the contents of the paintedlayer to.
+ RefPtr<ID3D10Texture2D> mReadbackTexture;
+ // The sink that we're trying to read back to.
+ RefPtr<TextureReadbackSink> mSink;
+};
+
+// This class is created and dispatched from the Readback thread but it must be
+// destroyed by the main thread.
+class ReadbackResultWriterD3D11 final : public nsIRunnable
+{
+ ~ReadbackResultWriterD3D11() {}
+ NS_DECL_THREADSAFE_ISUPPORTS
+public:
+ ReadbackResultWriterD3D11(ReadbackTask *aTask) : mTask(aTask) {}
+
+ NS_IMETHOD Run() override
+ {
+ D3D10_TEXTURE2D_DESC desc;
+ mTask->mReadbackTexture->GetDesc(&desc);
+
+ D3D10_MAPPED_TEXTURE2D mappedTex;
+ // Unless there is an error this map should succeed immediately, as we've
+ // recently mapped (and unmapped) this copied data on our task thread.
+ HRESULT hr = mTask->mReadbackTexture->Map(0, D3D10_MAP_READ, 0, &mappedTex);
+
+ if (FAILED(hr)) {
+ mTask->mSink->ProcessReadback(nullptr);
+ return NS_OK;
+ }
+
+ {
+ RefPtr<DataSourceSurface> surf =
+ Factory::CreateWrappingDataSourceSurface((uint8_t*)mappedTex.pData, mappedTex.RowPitch,
+ IntSize(desc.Width, desc.Height),
+ SurfaceFormat::B8G8R8A8);
+
+ mTask->mSink->ProcessReadback(surf);
+
+ MOZ_ASSERT(surf->hasOneRef());
+ }
+
+ mTask->mReadbackTexture->Unmap(0);
+
+ return NS_OK;
+ }
+
+private:
+ nsAutoPtr<ReadbackTask> mTask;
+};
+
+NS_IMPL_ISUPPORTS(ReadbackResultWriterD3D11, nsIRunnable)
+
+DWORD WINAPI ReadbackManagerD3D11::StartTaskThread(void *aManager)
+{
+ static_cast<ReadbackManagerD3D11*>(aManager)->ProcessTasks();
+
+ return 0;
+}
+
+ReadbackManagerD3D11::ReadbackManagerD3D11()
+ : mRefCnt(0)
+{
+ ::InitializeCriticalSection(&mTaskMutex);
+ mShutdownEvent = ::CreateEventA(nullptr, FALSE, FALSE, nullptr);
+ mTaskSemaphore = ::CreateSemaphoreA(nullptr, 0, 1000000, nullptr);
+ mTaskThread = ::CreateThread(nullptr, 0, StartTaskThread, this, 0, 0);
+}
+
+ReadbackManagerD3D11::~ReadbackManagerD3D11()
+{
+ ::SetEvent(mShutdownEvent);
+
+ // This shouldn't take longer than 5 seconds, if it does we're going to choose
+ // to leak the thread and its synchronisation in favor of crashing or freezing
+ DWORD result = ::WaitForSingleObject(mTaskThread, 5000);
+ if (result != WAIT_TIMEOUT) {
+ ::DeleteCriticalSection(&mTaskMutex);
+ ::CloseHandle(mShutdownEvent);
+ ::CloseHandle(mTaskSemaphore);
+ ::CloseHandle(mTaskThread);
+ } else {
+ NS_RUNTIMEABORT("ReadbackManager: Task thread did not shutdown in 5 seconds.");
+ }
+}
+
+void
+ReadbackManagerD3D11::PostTask(ID3D10Texture2D *aTexture, TextureReadbackSink* aSink)
+{
+ ReadbackTask *task = new ReadbackTask;
+ task->mReadbackTexture = aTexture;
+ task->mSink = aSink;
+
+ ::EnterCriticalSection(&mTaskMutex);
+ mPendingReadbackTasks.AppendElement(task);
+ ::LeaveCriticalSection(&mTaskMutex);
+
+ ::ReleaseSemaphore(mTaskSemaphore, 1, nullptr);
+}
+
+void
+ReadbackManagerD3D11::ProcessTasks()
+{
+ HANDLE handles[] = { mTaskSemaphore, mShutdownEvent };
+
+ while (true) {
+ DWORD result = ::WaitForMultipleObjects(2, handles, FALSE, INFINITE);
+ if (result != WAIT_OBJECT_0) {
+ return;
+ }
+
+ ::EnterCriticalSection(&mTaskMutex);
+ if (mPendingReadbackTasks.Length() == 0) {
+ NS_RUNTIMEABORT("Trying to read from an empty array, bad bad bad");
+ }
+ ReadbackTask *nextReadbackTask = mPendingReadbackTasks[0].forget();
+ mPendingReadbackTasks.RemoveElementAt(0);
+ ::LeaveCriticalSection(&mTaskMutex);
+
+ // We want to block here until the texture contents are available, the
+ // easiest thing is to simply map and unmap.
+ D3D10_MAPPED_TEXTURE2D mappedTex;
+ nextReadbackTask->mReadbackTexture->Map(0, D3D10_MAP_READ, 0, &mappedTex);
+ nextReadbackTask->mReadbackTexture->Unmap(0);
+
+ // We can only send the update to the sink on the main thread, so post an
+ // event there to do so. Ownership of the task is passed from
+ // mPendingReadbackTasks to ReadbackResultWriter here.
+ nsCOMPtr<nsIThread> thread = do_GetMainThread();
+ thread->Dispatch(new ReadbackResultWriterD3D11(nextReadbackTask),
+ nsIEventTarget::DISPATCH_NORMAL);
+ }
+}
+
+}
+}
diff --git a/gfx/layers/d3d11/ReadbackManagerD3D11.h b/gfx/layers/d3d11/ReadbackManagerD3D11.h
new file mode 100644
index 000000000..d15346fd8
--- /dev/null
+++ b/gfx/layers/d3d11/ReadbackManagerD3D11.h
@@ -0,0 +1,65 @@
+/* -*- 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/. */
+
+#ifndef GFX_READBACKMANAGERD3D11_H
+#define GFX_READBACKMANAGERD3D11_H
+
+#include <windows.h>
+#include <d3d10_1.h>
+
+#include "nsTArray.h"
+#include "nsAutoPtr.h"
+
+namespace mozilla {
+namespace layers {
+
+class TextureReadbackSink;
+struct ReadbackTask;
+
+class ReadbackManagerD3D11 final
+{
+ NS_INLINE_DECL_REFCOUNTING(ReadbackManagerD3D11)
+public:
+ ReadbackManagerD3D11();
+
+ /**
+ * Tell the readback manager to post a readback task.
+ *
+ * @param aTexture D3D10_USAGE_STAGING texture that will contain the data that
+ * was readback.
+ * @param aSink TextureReadbackSink that the resulting DataSourceSurface
+ * should be dispatched to.
+ */
+ void PostTask(ID3D10Texture2D* aTexture, TextureReadbackSink* aSink);
+
+private:
+ ~ReadbackManagerD3D11();
+
+ static DWORD WINAPI StartTaskThread(void *aManager);
+
+ void ProcessTasks();
+
+ // The invariant maintained by |mTaskSemaphore| is that the readback thread
+ // will awaken from WaitForMultipleObjects() at least once per readback
+ // task enqueued by the main thread. Since the readback thread processes
+ // exactly one task per wakeup (with one exception), no tasks are lost. The
+ // exception is when the readback thread is shut down, which orphans the
+ // remaining tasks, on purpose.
+ HANDLE mTaskSemaphore;
+ // Event signaled when the task thread should shutdown
+ HANDLE mShutdownEvent;
+ // Handle to the task thread
+ HANDLE mTaskThread;
+
+ // FiFo list of readback tasks that are to be executed. Access is synchronized
+ // by mTaskMutex.
+ CRITICAL_SECTION mTaskMutex;
+ nsTArray<nsAutoPtr<ReadbackTask>> mPendingReadbackTasks;
+};
+
+}
+}
+
+#endif /* GFX_READBACKMANAGERD3D11_H */
diff --git a/gfx/layers/d3d11/TextureD3D11.cpp b/gfx/layers/d3d11/TextureD3D11.cpp
new file mode 100644
index 000000000..8fbcfd234
--- /dev/null
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -0,0 +1,1291 @@
+/* -*- 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/. */
+
+#include "TextureD3D11.h"
+#include "CompositorD3D11.h"
+#include "gfxContext.h"
+#include "Effects.h"
+#include "gfxWindowsPlatform.h"
+#include "gfx2DGlue.h"
+#include "gfxPrefs.h"
+#include "ReadbackManagerD3D11.h"
+#include "mozilla/gfx/DeviceManagerDx.h"
+#include "mozilla/gfx/Logging.h"
+
+namespace mozilla {
+
+using namespace gfx;
+
+namespace layers {
+
+static const GUID sD3D11TextureUsage =
+{ 0xd89275b0, 0x6c7d, 0x4038, { 0xb5, 0xfa, 0x4d, 0x87, 0x16, 0xd5, 0xcc, 0x4e } };
+
+/* This class gets its lifetime tied to a D3D texture
+ * and increments memory usage on construction and decrements
+ * on destruction */
+class TextureMemoryMeasurer : public IUnknown
+{
+public:
+ TextureMemoryMeasurer(size_t aMemoryUsed)
+ {
+ mMemoryUsed = aMemoryUsed;
+ gfxWindowsPlatform::sD3D11SharedTextures += mMemoryUsed;
+ mRefCnt = 0;
+ }
+ STDMETHODIMP_(ULONG) AddRef() {
+ mRefCnt++;
+ return mRefCnt;
+ }
+ STDMETHODIMP QueryInterface(REFIID riid,
+ void **ppvObject)
+ {
+ IUnknown *punk = nullptr;
+ if (riid == IID_IUnknown) {
+ punk = this;
+ }
+ *ppvObject = punk;
+ if (punk) {
+ punk->AddRef();
+ return S_OK;
+ } else {
+ return E_NOINTERFACE;
+ }
+ }
+
+ STDMETHODIMP_(ULONG) Release() {
+ int refCnt = --mRefCnt;
+ if (refCnt == 0) {
+ gfxWindowsPlatform::sD3D11SharedTextures -= mMemoryUsed;
+ delete this;
+ }
+ return refCnt;
+ }
+private:
+ int mRefCnt;
+ int mMemoryUsed;
+};
+
+static DXGI_FORMAT
+SurfaceFormatToDXGIFormat(gfx::SurfaceFormat aFormat)
+{
+ switch (aFormat) {
+ case SurfaceFormat::B8G8R8A8:
+ return DXGI_FORMAT_B8G8R8A8_UNORM;
+ case SurfaceFormat::B8G8R8X8:
+ return DXGI_FORMAT_B8G8R8A8_UNORM;
+ case SurfaceFormat::R8G8B8A8:
+ return DXGI_FORMAT_R8G8B8A8_UNORM;
+ case SurfaceFormat::R8G8B8X8:
+ return DXGI_FORMAT_R8G8B8A8_UNORM;
+ case SurfaceFormat::A8:
+ return DXGI_FORMAT_R8_UNORM;
+ default:
+ MOZ_ASSERT(false, "unsupported format");
+ return DXGI_FORMAT_UNKNOWN;
+ }
+}
+
+static uint32_t
+GetRequiredTilesD3D11(uint32_t aSize, uint32_t aMaxSize)
+{
+ uint32_t requiredTiles = aSize / aMaxSize;
+ if (aSize % aMaxSize) {
+ requiredTiles++;
+ }
+ return requiredTiles;
+}
+
+static IntRect
+GetTileRectD3D11(uint32_t aID, IntSize aSize, uint32_t aMaxSize)
+{
+ uint32_t horizontalTiles = GetRequiredTilesD3D11(aSize.width, aMaxSize);
+ uint32_t verticalTiles = GetRequiredTilesD3D11(aSize.height, aMaxSize);
+
+ uint32_t verticalTile = aID / horizontalTiles;
+ uint32_t horizontalTile = aID % horizontalTiles;
+
+ return IntRect(horizontalTile * aMaxSize,
+ verticalTile * aMaxSize,
+ horizontalTile < (horizontalTiles - 1) ? aMaxSize : aSize.width % aMaxSize,
+ verticalTile < (verticalTiles - 1) ? aMaxSize : aSize.height % aMaxSize);
+}
+
+AutoTextureLock::AutoTextureLock(IDXGIKeyedMutex* aMutex,
+ HRESULT& aResult,
+ uint32_t aTimeout)
+{
+ mMutex = aMutex;
+ mResult = mMutex->AcquireSync(0, aTimeout);
+ aResult = mResult;
+}
+
+AutoTextureLock::~AutoTextureLock()
+{
+ if (!FAILED(mResult) && mResult != WAIT_TIMEOUT &&
+ mResult != WAIT_ABANDONED) {
+ mMutex->ReleaseSync(0);
+ }
+}
+
+ID3D11ShaderResourceView*
+TextureSourceD3D11::GetShaderResourceView()
+{
+ MOZ_ASSERT(mTexture == GetD3D11Texture(), "You need to override GetShaderResourceView if you're overriding GetD3D11Texture!");
+
+ if (!mSRV && mTexture) {
+ RefPtr<ID3D11Device> device;
+ mTexture->GetDevice(getter_AddRefs(device));
+
+ // see comment in CompositingRenderTargetD3D11 constructor
+ CD3D11_SHADER_RESOURCE_VIEW_DESC srvDesc(D3D11_SRV_DIMENSION_TEXTURE2D, mFormatOverride);
+ D3D11_SHADER_RESOURCE_VIEW_DESC *desc = mFormatOverride == DXGI_FORMAT_UNKNOWN ? nullptr : &srvDesc;
+
+ HRESULT hr = device->CreateShaderResourceView(mTexture, desc, getter_AddRefs(mSRV));
+ if (FAILED(hr)) {
+ gfxCriticalNote << "[D3D11] TextureSourceD3D11:GetShaderResourceView CreateSRV failure " << gfx::hexa(hr);
+ return nullptr;
+ }
+ }
+ return mSRV;
+}
+
+DataTextureSourceD3D11::DataTextureSourceD3D11(SurfaceFormat aFormat,
+ CompositorD3D11* aCompositor,
+ TextureFlags aFlags)
+ : mCompositor(aCompositor)
+ , mFormat(aFormat)
+ , mFlags(aFlags)
+ , mCurrentTile(0)
+ , mIsTiled(false)
+ , mIterating(false)
+ , mAllowTextureUploads(true)
+{
+ MOZ_COUNT_CTOR(DataTextureSourceD3D11);
+}
+
+DataTextureSourceD3D11::DataTextureSourceD3D11(SurfaceFormat aFormat,
+ CompositorD3D11* aCompositor,
+ ID3D11Texture2D* aTexture)
+: mCompositor(aCompositor)
+, mFormat(aFormat)
+, mFlags(TextureFlags::NO_FLAGS)
+, mCurrentTile(0)
+, mIsTiled(false)
+, mIterating(false)
+, mAllowTextureUploads(false)
+{
+ MOZ_COUNT_CTOR(DataTextureSourceD3D11);
+
+ mTexture = aTexture;
+ D3D11_TEXTURE2D_DESC desc;
+ aTexture->GetDesc(&desc);
+
+ mSize = IntSize(desc.Width, desc.Height);
+}
+
+
+
+DataTextureSourceD3D11::~DataTextureSourceD3D11()
+{
+ MOZ_COUNT_DTOR(DataTextureSourceD3D11);
+}
+
+
+template<typename T> // ID3D10Texture2D or ID3D11Texture2D
+static bool LockD3DTexture(T* aTexture)
+{
+ MOZ_ASSERT(aTexture);
+ RefPtr<IDXGIKeyedMutex> mutex;
+ aTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
+ // Textures created by the DXVA decoders don't have a mutex for synchronization
+ if (mutex) {
+ HRESULT hr = mutex->AcquireSync(0, 10000);
+ if (hr == WAIT_TIMEOUT) {
+ gfxDevCrash(LogReason::D3DLockTimeout) << "D3D lock mutex timeout";
+ } else if (hr == WAIT_ABANDONED) {
+ gfxCriticalNote << "GFX: D3D11 lock mutex abandoned";
+ }
+
+ if (FAILED(hr)) {
+ NS_WARNING("Failed to lock the texture");
+ return false;
+ }
+ }
+ return true;
+}
+
+template<typename T>
+static bool HasKeyedMutex(T* aTexture)
+{
+ RefPtr<IDXGIKeyedMutex> mutex;
+ aTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
+ return !!mutex;
+}
+
+template<typename T> // ID3D10Texture2D or ID3D11Texture2D
+static void UnlockD3DTexture(T* aTexture)
+{
+ MOZ_ASSERT(aTexture);
+ RefPtr<IDXGIKeyedMutex> mutex;
+ aTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
+ if (mutex) {
+ HRESULT hr = mutex->ReleaseSync(0);
+ if (FAILED(hr)) {
+ NS_WARNING("Failed to unlock the texture");
+ }
+ }
+}
+
+DXGITextureData::DXGITextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ bool aNeedsClear, bool aNeedsClearWhite,
+ bool aIsForOutOfBandContent)
+: mSize(aSize)
+, mFormat(aFormat)
+, mNeedsClear(aNeedsClear)
+, mNeedsClearWhite(aNeedsClearWhite)
+, mHasSynchronization(false)
+, mIsForOutOfBandContent(aIsForOutOfBandContent)
+{}
+
+D3D11TextureData::D3D11TextureData(ID3D11Texture2D* aTexture,
+ gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ bool aNeedsClear, bool aNeedsClearWhite,
+ bool aIsForOutOfBandContent)
+: DXGITextureData(aSize, aFormat, aNeedsClear, aNeedsClearWhite, aIsForOutOfBandContent)
+, mTexture(aTexture)
+{
+ MOZ_ASSERT(aTexture);
+ mHasSynchronization = HasKeyedMutex(aTexture);
+}
+
+D3D11TextureData::~D3D11TextureData()
+{
+#ifdef DEBUG
+ // An Azure DrawTarget needs to be locked when it gets nullptr'ed as this is
+ // when it calls EndDraw. This EndDraw should not execute anything so it
+ // shouldn't -really- need the lock but the debug layer chokes on this.
+ if (mDrawTarget) {
+ Lock(OpenMode::OPEN_NONE);
+ mDrawTarget = nullptr;
+ Unlock();
+ }
+#endif
+}
+
+bool
+D3D11TextureData::Lock(OpenMode aMode)
+{
+ if (!LockD3DTexture(mTexture.get())) {
+ return false;
+ }
+
+ if (NS_IsMainThread() && !mIsForOutOfBandContent) {
+ if (!PrepareDrawTargetInLock(aMode)) {
+ Unlock();
+ return false;
+ }
+ }
+
+ return true;
+}
+
+bool
+DXGITextureData::PrepareDrawTargetInLock(OpenMode aMode)
+{
+ // Make sure that successful write-lock means we will have a DrawTarget to
+ // write into.
+ if (!mDrawTarget && (aMode & OpenMode::OPEN_WRITE || mNeedsClear || mNeedsClearWhite)) {
+ mDrawTarget = BorrowDrawTarget();
+ if (!mDrawTarget) {
+ return false;
+ }
+ }
+
+ if (mNeedsClear) {
+ mDrawTarget->ClearRect(Rect(0, 0, mSize.width, mSize.height));
+ mNeedsClear = false;
+ }
+ if (mNeedsClearWhite) {
+ mDrawTarget->FillRect(Rect(0, 0, mSize.width, mSize.height), ColorPattern(Color(1.0, 1.0, 1.0, 1.0)));
+ mNeedsClearWhite = false;
+ }
+
+ return true;
+}
+
+void
+D3D11TextureData::Unlock()
+{
+ UnlockD3DTexture(mTexture.get());
+}
+
+
+void
+DXGITextureData::FillInfo(TextureData::Info& aInfo) const
+{
+ aInfo.size = mSize;
+ aInfo.format = mFormat;
+ aInfo.supportsMoz2D = true;
+ aInfo.hasIntermediateBuffer = false;
+ aInfo.hasSynchronization = mHasSynchronization;
+}
+
+void
+D3D11TextureData::SyncWithObject(SyncObject* aSyncObject)
+{
+ if (!aSyncObject || !NS_IsMainThread() || mIsForOutOfBandContent) {
+ // When off the main thread we sync using a keyed mutex per texture.
+ return;
+ }
+
+ MOZ_ASSERT(aSyncObject->GetSyncType() == SyncObject::SyncType::D3D11);
+ SyncObjectD3D11* sync = static_cast<SyncObjectD3D11*>(aSyncObject);
+ sync->RegisterTexture(mTexture);
+}
+
+bool
+DXGITextureData::Serialize(SurfaceDescriptor& aOutDescriptor)
+{
+ RefPtr<IDXGIResource> resource;
+ GetDXGIResource((IDXGIResource**)getter_AddRefs(resource));
+ if (!resource) {
+ return false;
+ }
+ HANDLE sharedHandle;
+ HRESULT hr = resource->GetSharedHandle(&sharedHandle);
+ if (FAILED(hr)) {
+ LOGD3D11("Error getting shared handle for texture.");
+ return false;
+ }
+
+ aOutDescriptor = SurfaceDescriptorD3D10((WindowsHandle)sharedHandle, mFormat, mSize);
+ return true;
+}
+
+DXGITextureData*
+DXGITextureData::Create(IntSize aSize, SurfaceFormat aFormat, TextureAllocationFlags aFlags)
+{
+ if (aFormat == SurfaceFormat::A8) {
+ // Currently we don't support A8 surfaces. Fallback.
+ return nullptr;
+ }
+
+ return D3D11TextureData::Create(aSize, aFormat, aFlags);
+}
+
+DXGITextureData*
+D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aSurface,
+ TextureAllocationFlags aFlags, ID3D11Device* aDevice)
+{
+ // Just grab any device. We never use the immediate context, so the devices are fine
+ // to use from any thread.
+ RefPtr<ID3D11Device> device = aDevice;
+ if (!device) {
+ device = DeviceManagerDx::Get()->GetContentDevice();
+ if (!device) {
+ return nullptr;
+ }
+ }
+
+ CD3D11_TEXTURE2D_DESC newDesc(DXGI_FORMAT_B8G8R8A8_UNORM,
+ aSize.width, aSize.height, 1, 1,
+ D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE);
+
+ newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED;
+ if (!NS_IsMainThread() || !!(aFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT)) {
+ // On the main thread we use the syncobject to handle synchronization.
+ if (!(aFlags & ALLOC_MANUAL_SYNCHRONIZATION)) {
+ newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
+ }
+ }
+
+ if (aSurface && newDesc.MiscFlags == D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX &&
+ !DeviceManagerDx::Get()->CanInitializeKeyedMutexTextures()) {
+ return nullptr;
+ }
+
+ D3D11_SUBRESOURCE_DATA uploadData;
+ D3D11_SUBRESOURCE_DATA* uploadDataPtr = nullptr;
+ RefPtr<DataSourceSurface> srcSurf;
+ if (aSurface) {
+ srcSurf = aSurface->GetDataSurface();
+
+ if (!srcSurf) {
+ gfxCriticalError() << "Failed to GetDataSurface in D3D11TextureData::Create";
+ return nullptr;
+ }
+
+ DataSourceSurface::MappedSurface sourceMap;
+ if (!srcSurf->Map(DataSourceSurface::READ, &sourceMap)) {
+ gfxCriticalError() << "Failed to map source surface for D3D11TextureData::Create";
+ return nullptr;
+ }
+
+ uploadData.pSysMem = sourceMap.mData;
+ uploadData.SysMemPitch = sourceMap.mStride;
+ uploadData.SysMemSlicePitch = 0; // unused
+
+ uploadDataPtr = &uploadData;
+ }
+
+ RefPtr<ID3D11Texture2D> texture11;
+ HRESULT hr = device->CreateTexture2D(&newDesc, uploadDataPtr, getter_AddRefs(texture11));
+ if (srcSurf) {
+ srcSurf->Unmap();
+ }
+ if (FAILED(hr)) {
+ gfxCriticalError(CriticalLog::DefaultOptions(Factory::ReasonableSurfaceSize(aSize)))
+ << "[D3D11] 2 CreateTexture2D failure " << aSize << " Code: " << gfx::hexa(hr);
+ return nullptr;
+ }
+
+ // If we created the texture with a keyed mutex, then we expect all operations
+ // on it to be synchronized using it. If we did an initial upload using aSurface
+ // then bizarely this isn't covered, so we insert a manual lock/unlock pair
+ // to force this.
+ if (aSurface && newDesc.MiscFlags == D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX) {
+ if (!LockD3DTexture(texture11.get())) {
+ return nullptr;
+ }
+ UnlockD3DTexture(texture11.get());
+ }
+ texture11->SetPrivateDataInterface(sD3D11TextureUsage,
+ new TextureMemoryMeasurer(newDesc.Width * newDesc.Height * 4));
+ return new D3D11TextureData(texture11, aSize, aFormat,
+ aFlags & ALLOC_CLEAR_BUFFER,
+ aFlags & ALLOC_CLEAR_BUFFER_WHITE,
+ aFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT);
+}
+
+DXGITextureData*
+D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat,
+ TextureAllocationFlags aFlags, ID3D11Device* aDevice)
+{
+ return D3D11TextureData::Create(aSize, aFormat, nullptr, aFlags, aDevice);
+}
+
+DXGITextureData*
+D3D11TextureData::Create(SourceSurface* aSurface,
+ TextureAllocationFlags aFlags, ID3D11Device* aDevice)
+{
+ if (aSurface->GetFormat() == SurfaceFormat::A8) {
+ // Currently we don't support A8 surfaces. Fallback.
+ return nullptr;
+ }
+
+ return D3D11TextureData::Create(aSurface->GetSize(), aSurface->GetFormat(),
+ aSurface, aFlags, aDevice);
+}
+
+void
+D3D11TextureData::Deallocate(LayersIPCChannel* aAllocator)
+{
+ mDrawTarget = nullptr;
+ mTexture = nullptr;
+}
+
+already_AddRefed<TextureClient>
+CreateD3D11TextureClientWithDevice(IntSize aSize, SurfaceFormat aFormat,
+ TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags,
+ ID3D11Device* aDevice,
+ LayersIPCChannel* aAllocator)
+{
+ TextureData* data = D3D11TextureData::Create(aSize, aFormat, aAllocFlags, aDevice);
+ if (!data) {
+ return nullptr;
+ }
+ return MakeAndAddRef<TextureClient>(data, aTextureFlags, aAllocator);
+}
+
+TextureData*
+D3D11TextureData::CreateSimilar(LayersIPCChannel* aAllocator,
+ LayersBackend aLayersBackend,
+ TextureFlags aFlags,
+ TextureAllocationFlags aAllocFlags) const
+{
+ return D3D11TextureData::Create(mSize, mFormat, aAllocFlags);
+}
+
+void
+D3D11TextureData::GetDXGIResource(IDXGIResource** aOutResource)
+{
+ mTexture->QueryInterface(aOutResource);
+}
+
+DXGIYCbCrTextureData*
+DXGIYCbCrTextureData::Create(TextureFlags aFlags,
+ IUnknown* aTextureY,
+ IUnknown* aTextureCb,
+ IUnknown* aTextureCr,
+ HANDLE aHandleY,
+ HANDLE aHandleCb,
+ HANDLE aHandleCr,
+ const gfx::IntSize& aSize,
+ const gfx::IntSize& aSizeY,
+ const gfx::IntSize& aSizeCbCr)
+{
+ if (!aHandleY || !aHandleCb || !aHandleCr ||
+ !aTextureY || !aTextureCb || !aTextureCr) {
+ return nullptr;
+ }
+
+ DXGIYCbCrTextureData* texture = new DXGIYCbCrTextureData();
+ texture->mHandles[0] = aHandleY;
+ texture->mHandles[1] = aHandleCb;
+ texture->mHandles[2] = aHandleCr;
+ texture->mHoldRefs[0] = aTextureY;
+ texture->mHoldRefs[1] = aTextureCb;
+ texture->mHoldRefs[2] = aTextureCr;
+ texture->mSize = aSize;
+ texture->mSizeY = aSizeY;
+ texture->mSizeCbCr = aSizeCbCr;
+
+ return texture;
+}
+
+DXGIYCbCrTextureData*
+DXGIYCbCrTextureData::Create(TextureFlags aFlags,
+ ID3D11Texture2D* aTextureY,
+ ID3D11Texture2D* aTextureCb,
+ ID3D11Texture2D* aTextureCr,
+ const gfx::IntSize& aSize,
+ const gfx::IntSize& aSizeY,
+ const gfx::IntSize& aSizeCbCr)
+{
+ if (!aTextureY || !aTextureCb || !aTextureCr) {
+ return nullptr;
+ }
+
+ aTextureY->SetPrivateDataInterface(sD3D11TextureUsage,
+ new TextureMemoryMeasurer(aSize.width * aSize.height));
+ aTextureCb->SetPrivateDataInterface(sD3D11TextureUsage,
+ new TextureMemoryMeasurer(aSizeCbCr.width * aSizeCbCr.height));
+ aTextureCr->SetPrivateDataInterface(sD3D11TextureUsage,
+ new TextureMemoryMeasurer(aSizeCbCr.width * aSizeCbCr.height));
+
+ RefPtr<IDXGIResource> resource;
+
+ aTextureY->QueryInterface((IDXGIResource**)getter_AddRefs(resource));
+
+ HANDLE handleY;
+ HRESULT hr = resource->GetSharedHandle(&handleY);
+ if (FAILED(hr)) {
+ return nullptr;
+ }
+
+ aTextureCb->QueryInterface((IDXGIResource**)getter_AddRefs(resource));
+
+ HANDLE handleCb;
+ hr = resource->GetSharedHandle(&handleCb);
+ if (FAILED(hr)) {
+ return nullptr;
+ }
+
+ aTextureCr->QueryInterface((IDXGIResource**)getter_AddRefs(resource));
+ HANDLE handleCr;
+ hr = resource->GetSharedHandle(&handleCr);
+ if (FAILED(hr)) {
+ return nullptr;
+ }
+
+ return DXGIYCbCrTextureData::Create(aFlags,
+ aTextureY, aTextureCb, aTextureCr,
+ handleY, handleCb, handleCr,
+ aSize, aSizeY, aSizeCbCr);
+}
+
+void
+DXGIYCbCrTextureData::FillInfo(TextureData::Info& aInfo) const
+{
+ aInfo.size = mSize;
+ aInfo.format = gfx::SurfaceFormat::YUV;
+ aInfo.supportsMoz2D = false;
+ aInfo.hasIntermediateBuffer = false;
+ aInfo.hasSynchronization = false;
+}
+
+bool
+DXGIYCbCrTextureData::Serialize(SurfaceDescriptor& aOutDescriptor)
+{
+ aOutDescriptor = SurfaceDescriptorDXGIYCbCr(
+ (WindowsHandle)mHandles[0], (WindowsHandle)mHandles[1], (WindowsHandle)mHandles[2],
+ mSize, mSizeY, mSizeCbCr
+ );
+ return true;
+}
+
+void
+DXGIYCbCrTextureData::Deallocate(LayersIPCChannel*)
+{
+ mHoldRefs[0] = nullptr;
+ mHoldRefs[1] = nullptr;
+ mHoldRefs[2] = nullptr;
+}
+
+already_AddRefed<TextureHost>
+CreateTextureHostD3D11(const SurfaceDescriptor& aDesc,
+ ISurfaceAllocator* aDeallocator,
+ TextureFlags aFlags)
+{
+ RefPtr<TextureHost> result;
+ switch (aDesc.type()) {
+ case SurfaceDescriptor::TSurfaceDescriptorBuffer: {
+ result = CreateBackendIndependentTextureHost(aDesc, aDeallocator, aFlags);
+ break;
+ }
+ case SurfaceDescriptor::TSurfaceDescriptorD3D10: {
+ result = new DXGITextureHostD3D11(aFlags,
+ aDesc.get_SurfaceDescriptorD3D10());
+ break;
+ }
+ case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: {
+ result = new DXGIYCbCrTextureHostD3D11(aFlags,
+ aDesc.get_SurfaceDescriptorDXGIYCbCr());
+ break;
+ }
+ default: {
+ NS_WARNING("Unsupported SurfaceDescriptor type");
+ }
+ }
+ return result.forget();
+}
+
+
+already_AddRefed<DrawTarget>
+D3D11TextureData::BorrowDrawTarget()
+{
+ MOZ_ASSERT(NS_IsMainThread());
+
+ if (!mDrawTarget && mTexture) {
+ // This may return a null DrawTarget
+ mDrawTarget = Factory::CreateDrawTargetForD3D11Texture(mTexture, mFormat);
+ if (!mDrawTarget) {
+ gfxCriticalNote << "Could not borrow DrawTarget (D3D11) " << (int)mFormat;
+ }
+ }
+
+ RefPtr<DrawTarget> result = mDrawTarget;
+ return result.forget();
+}
+
+bool
+D3D11TextureData::UpdateFromSurface(gfx::SourceSurface* aSurface)
+{
+ // Supporting texture updates after creation requires an ID3D11DeviceContext and those
+ // aren't threadsafe. We'd need to either lock, or have a device for whatever thread
+ // this runs on and we're trying to avoid extra devices (bug 1284672).
+ MOZ_ASSERT(false, "UpdateFromSurface not supported for D3D11! Use CreateFromSurface instead");
+ return false;
+}
+
+DXGITextureHostD3D11::DXGITextureHostD3D11(TextureFlags aFlags,
+ const SurfaceDescriptorD3D10& aDescriptor)
+ : TextureHost(aFlags)
+ , mSize(aDescriptor.size())
+ , mHandle(aDescriptor.handle())
+ , mFormat(aDescriptor.format())
+ , mIsLocked(false)
+{
+}
+
+bool
+DXGITextureHostD3D11::OpenSharedHandle()
+{
+ if (!GetDevice()) {
+ return false;
+ }
+
+ HRESULT hr = GetDevice()->OpenSharedResource((HANDLE)mHandle,
+ __uuidof(ID3D11Texture2D),
+ (void**)(ID3D11Texture2D**)getter_AddRefs(mTexture));
+ if (FAILED(hr)) {
+ NS_WARNING("Failed to open shared texture");
+ return false;
+ }
+
+ D3D11_TEXTURE2D_DESC desc;
+ mTexture->GetDesc(&desc);
+ mSize = IntSize(desc.Width, desc.Height);
+ return true;
+}
+
+RefPtr<ID3D11Device>
+DXGITextureHostD3D11::GetDevice()
+{
+ if (mFlags & TextureFlags::INVALID_COMPOSITOR) {
+ return nullptr;
+ }
+
+ return DeviceManagerDx::Get()->GetCompositorDevice();
+}
+
+static CompositorD3D11* AssertD3D11Compositor(Compositor* aCompositor)
+{
+ CompositorD3D11* compositor = aCompositor ? aCompositor->AsCompositorD3D11()
+ : nullptr;
+ if (!compositor) {
+ gfxCriticalNote << "[D3D11] Attempt to set an incompatible compositor";
+ }
+ return compositor;
+}
+
+void
+DXGITextureHostD3D11::SetCompositor(Compositor* aCompositor)
+{
+ CompositorD3D11* d3dCompositor = AssertD3D11Compositor(aCompositor);
+ if (!d3dCompositor) {
+ mCompositor = nullptr;
+ mTextureSource = nullptr;
+ return;
+ }
+ mCompositor = d3dCompositor;
+ if (mTextureSource) {
+ mTextureSource->SetCompositor(aCompositor);
+ }
+}
+
+Compositor*
+DXGITextureHostD3D11::GetCompositor()
+{
+ return mCompositor;
+}
+
+bool
+DXGITextureHostD3D11::Lock()
+{
+ if (!mCompositor) {
+ // Make an early return here if we call SetCompositor() with an incompatible
+ // compositor. This check tries to prevent the problem where we use that
+ // incompatible compositor to compose this texture.
+ return false;
+ }
+
+ return LockInternal();
+}
+
+bool
+DXGITextureHostD3D11::LockWithoutCompositor()
+{
+ // Unlike the normal Lock() function, this function may be called when
+ // mCompositor is nullptr such as during WebVR frame submission. So, there is
+ // no 'mCompositor' checking here.
+ return LockInternal();
+}
+
+void
+DXGITextureHostD3D11::Unlock()
+{
+ UnlockInternal();
+}
+
+void
+DXGITextureHostD3D11::UnlockWithoutCompositor()
+{
+ UnlockInternal();
+}
+
+bool
+DXGITextureHostD3D11::LockInternal()
+{
+ if (!GetDevice()) {
+ NS_WARNING("trying to lock a TextureHost without a D3D device");
+ return false;
+ }
+
+ if (!mTextureSource) {
+ if (!mTexture && !OpenSharedHandle()) {
+ DeviceManagerDx::Get()->ForceDeviceReset(ForcedDeviceResetReason::OPENSHAREDHANDLE);
+ return false;
+ }
+
+ mTextureSource = new DataTextureSourceD3D11(mFormat, mCompositor, mTexture);
+ }
+
+ mIsLocked = LockD3DTexture(mTextureSource->GetD3D11Texture());
+
+ return mIsLocked;
+}
+
+void
+DXGITextureHostD3D11::UnlockInternal()
+{
+ UnlockD3DTexture(mTextureSource->GetD3D11Texture());
+}
+
+bool
+DXGITextureHostD3D11::BindTextureSource(CompositableTextureSourceRef& aTexture)
+{
+ MOZ_ASSERT(mIsLocked);
+ // If Lock was successful we must have a valid TextureSource.
+ MOZ_ASSERT(mTextureSource);
+ aTexture = mTextureSource;
+ return !!aTexture;
+}
+
+DXGIYCbCrTextureHostD3D11::DXGIYCbCrTextureHostD3D11(TextureFlags aFlags,
+ const SurfaceDescriptorDXGIYCbCr& aDescriptor)
+ : TextureHost(aFlags)
+ , mSize(aDescriptor.size())
+ , mIsLocked(false)
+{
+ mHandles[0] = aDescriptor.handleY();
+ mHandles[1] = aDescriptor.handleCb();
+ mHandles[2] = aDescriptor.handleCr();
+}
+
+bool
+DXGIYCbCrTextureHostD3D11::OpenSharedHandle()
+{
+ RefPtr<ID3D11Device> device = GetDevice();
+ if (!device) {
+ return false;
+ }
+
+ RefPtr<ID3D11Texture2D> textures[3];
+
+ HRESULT hr = device->OpenSharedResource((HANDLE)mHandles[0],
+ __uuidof(ID3D11Texture2D),
+ (void**)(ID3D11Texture2D**)getter_AddRefs(textures[0]));
+ if (FAILED(hr)) {
+ NS_WARNING("Failed to open shared texture for Y Plane");
+ return false;
+ }
+
+ hr = device->OpenSharedResource((HANDLE)mHandles[1],
+ __uuidof(ID3D11Texture2D),
+ (void**)(ID3D11Texture2D**)getter_AddRefs(textures[1]));
+ if (FAILED(hr)) {
+ NS_WARNING("Failed to open shared texture for Cb Plane");
+ return false;
+ }
+
+ hr = device->OpenSharedResource((HANDLE)mHandles[2],
+ __uuidof(ID3D11Texture2D),
+ (void**)(ID3D11Texture2D**)getter_AddRefs(textures[2]));
+ if (FAILED(hr)) {
+ NS_WARNING("Failed to open shared texture for Cr Plane");
+ return false;
+ }
+
+ mTextures[0] = textures[0].forget();
+ mTextures[1] = textures[1].forget();
+ mTextures[2] = textures[2].forget();
+
+ return true;
+}
+
+RefPtr<ID3D11Device>
+DXGIYCbCrTextureHostD3D11::GetDevice()
+{
+ if (mFlags & TextureFlags::INVALID_COMPOSITOR) {
+ return nullptr;
+ }
+
+ return DeviceManagerDx::Get()->GetCompositorDevice();
+}
+
+void
+DXGIYCbCrTextureHostD3D11::SetCompositor(Compositor* aCompositor)
+{
+ mCompositor = AssertD3D11Compositor(aCompositor);
+ if (!mCompositor) {
+ mTextureSources[0] = nullptr;
+ mTextureSources[1] = nullptr;
+ mTextureSources[2] = nullptr;
+ return;
+ }
+
+ if (mTextureSources[0]) {
+ mTextureSources[0]->SetCompositor(aCompositor);
+ }
+}
+
+Compositor*
+DXGIYCbCrTextureHostD3D11::GetCompositor()
+{
+ return mCompositor;
+}
+
+bool
+DXGIYCbCrTextureHostD3D11::Lock()
+{
+ if (!mCompositor) {
+ NS_WARNING("no suitable compositor");
+ return false;
+ }
+
+ if (!GetDevice()) {
+ NS_WARNING("trying to lock a TextureHost without a D3D device");
+ return false;
+ }
+ if (!mTextureSources[0]) {
+ if (!mTextures[0] && !OpenSharedHandle()) {
+ return false;
+ }
+
+ MOZ_ASSERT(mTextures[1] && mTextures[2]);
+
+ mTextureSources[0] = new DataTextureSourceD3D11(SurfaceFormat::A8, mCompositor, mTextures[0]);
+ mTextureSources[1] = new DataTextureSourceD3D11(SurfaceFormat::A8, mCompositor, mTextures[1]);
+ mTextureSources[2] = new DataTextureSourceD3D11(SurfaceFormat::A8, mCompositor, mTextures[2]);
+ mTextureSources[0]->SetNextSibling(mTextureSources[1]);
+ mTextureSources[1]->SetNextSibling(mTextureSources[2]);
+ }
+
+ mIsLocked = LockD3DTexture(mTextureSources[0]->GetD3D11Texture()) &&
+ LockD3DTexture(mTextureSources[1]->GetD3D11Texture()) &&
+ LockD3DTexture(mTextureSources[2]->GetD3D11Texture());
+
+ return mIsLocked;
+}
+
+void
+DXGIYCbCrTextureHostD3D11::Unlock()
+{
+ MOZ_ASSERT(mIsLocked);
+ UnlockD3DTexture(mTextureSources[0]->GetD3D11Texture());
+ UnlockD3DTexture(mTextureSources[1]->GetD3D11Texture());
+ UnlockD3DTexture(mTextureSources[2]->GetD3D11Texture());
+ mIsLocked = false;
+}
+
+bool
+DXGIYCbCrTextureHostD3D11::BindTextureSource(CompositableTextureSourceRef& aTexture)
+{
+ MOZ_ASSERT(mIsLocked);
+ // If Lock was successful we must have a valid TextureSource.
+ MOZ_ASSERT(mTextureSources[0] && mTextureSources[1] && mTextureSources[2]);
+ aTexture = mTextureSources[0].get();
+ return !!aTexture;
+}
+
+bool
+DataTextureSourceD3D11::Update(DataSourceSurface* aSurface,
+ nsIntRegion* aDestRegion,
+ IntPoint* aSrcOffset)
+{
+ // Incremental update with a source offset is only used on Mac so it is not
+ // clear that we ever will need to support it for D3D.
+ MOZ_ASSERT(!aSrcOffset);
+ MOZ_ASSERT(aSurface);
+
+ MOZ_ASSERT(mAllowTextureUploads);
+ if (!mAllowTextureUploads) {
+ return false;
+ }
+
+ HRESULT hr;
+
+ if (!mCompositor || !mCompositor->GetDevice()) {
+ return false;
+ }
+
+ uint32_t bpp = BytesPerPixel(aSurface->GetFormat());
+ DXGI_FORMAT dxgiFormat = SurfaceFormatToDXGIFormat(aSurface->GetFormat());
+
+ mSize = aSurface->GetSize();
+ mFormat = aSurface->GetFormat();
+
+ CD3D11_TEXTURE2D_DESC desc(dxgiFormat, mSize.width, mSize.height, 1, 1);
+
+ int32_t maxSize = mCompositor->GetMaxTextureSize();
+ if ((mSize.width <= maxSize && mSize.height <= maxSize) ||
+ (mFlags & TextureFlags::DISALLOW_BIGIMAGE)) {
+
+ if (mTexture) {
+ D3D11_TEXTURE2D_DESC currentDesc;
+ mTexture->GetDesc(&currentDesc);
+
+ // Make sure there's no size mismatch, if there is, recreate.
+ if (currentDesc.Width != mSize.width || currentDesc.Height != mSize.height ||
+ currentDesc.Format != dxgiFormat) {
+ mTexture = nullptr;
+ // Make sure we upload the whole surface.
+ aDestRegion = nullptr;
+ }
+ }
+
+ nsIntRegion *regionToUpdate = aDestRegion;
+ if (!mTexture) {
+ hr = mCompositor->GetDevice()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTexture));
+ mIsTiled = false;
+ if (FAILED(hr) || !mTexture) {
+ Reset();
+ return false;
+ }
+
+ if (mFlags & TextureFlags::COMPONENT_ALPHA) {
+ regionToUpdate = nullptr;
+ }
+ }
+
+ DataSourceSurface::MappedSurface map;
+ if (!aSurface->Map(DataSourceSurface::MapType::READ, &map)) {
+ gfxCriticalError() << "Failed to map surface.";
+ Reset();
+ return false;
+ }
+
+ if (regionToUpdate) {
+ for (auto iter = regionToUpdate->RectIter(); !iter.Done(); iter.Next()) {
+ const IntRect& rect = iter.Get();
+ D3D11_BOX box;
+ box.front = 0;
+ box.back = 1;
+ box.left = rect.x;
+ box.top = rect.y;
+ box.right = rect.XMost();
+ box.bottom = rect.YMost();
+
+ void* data = map.mData + map.mStride * rect.y + BytesPerPixel(aSurface->GetFormat()) * rect.x;
+
+ mCompositor->GetDC()->UpdateSubresource(mTexture, 0, &box, data, map.mStride, map.mStride * rect.height);
+ }
+ } else {
+ mCompositor->GetDC()->UpdateSubresource(mTexture, 0, nullptr, aSurface->GetData(),
+ aSurface->Stride(), aSurface->Stride() * mSize.height);
+ }
+
+ aSurface->Unmap();
+ } else {
+ mIsTiled = true;
+ uint32_t tileCount = GetRequiredTilesD3D11(mSize.width, maxSize) *
+ GetRequiredTilesD3D11(mSize.height, maxSize);
+
+ mTileTextures.resize(tileCount);
+ mTileSRVs.resize(tileCount);
+ mTexture = nullptr;
+
+ for (uint32_t i = 0; i < tileCount; i++) {
+ IntRect tileRect = GetTileRect(i);
+
+ desc.Width = tileRect.width;
+ desc.Height = tileRect.height;
+ desc.Usage = D3D11_USAGE_IMMUTABLE;
+
+ D3D11_SUBRESOURCE_DATA initData;
+ initData.pSysMem = aSurface->GetData() +
+ tileRect.y * aSurface->Stride() +
+ tileRect.x * bpp;
+ initData.SysMemPitch = aSurface->Stride();
+
+ hr = mCompositor->GetDevice()->CreateTexture2D(&desc, &initData, getter_AddRefs(mTileTextures[i]));
+ if (FAILED(hr) || !mTileTextures[i]) {
+ Reset();
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+ID3D11Texture2D*
+DataTextureSourceD3D11::GetD3D11Texture() const
+{
+ return mIterating ? mTileTextures[mCurrentTile]
+ : mTexture;
+}
+
+ID3D11ShaderResourceView*
+DataTextureSourceD3D11::GetShaderResourceView()
+{
+ if (mIterating) {
+ if (!mTileSRVs[mCurrentTile]) {
+ if (!mTileTextures[mCurrentTile]) {
+ return nullptr;
+ }
+
+ RefPtr<ID3D11Device> device;
+ mTileTextures[mCurrentTile]->GetDevice(getter_AddRefs(device));
+ HRESULT hr = device->CreateShaderResourceView(mTileTextures[mCurrentTile], nullptr, getter_AddRefs(mTileSRVs[mCurrentTile]));
+ if (FAILED(hr)) {
+ gfxCriticalNote << "[D3D11] DataTextureSourceD3D11:GetShaderResourceView CreateSRV failure " << gfx::hexa(hr);
+ return nullptr;
+ }
+ }
+ return mTileSRVs[mCurrentTile];
+ }
+
+ return TextureSourceD3D11::GetShaderResourceView();
+}
+
+void
+DataTextureSourceD3D11::Reset()
+{
+ mTexture = nullptr;
+ mTileSRVs.resize(0);
+ mTileTextures.resize(0);
+ mIsTiled = false;
+ mSize.width = 0;
+ mSize.height = 0;
+}
+
+IntRect
+DataTextureSourceD3D11::GetTileRect(uint32_t aIndex) const
+{
+ return GetTileRectD3D11(aIndex, mSize, mCompositor->GetMaxTextureSize());
+}
+
+IntRect
+DataTextureSourceD3D11::GetTileRect()
+{
+ IntRect rect = GetTileRect(mCurrentTile);
+ return IntRect(rect.x, rect.y, rect.width, rect.height);
+}
+
+void
+DataTextureSourceD3D11::SetCompositor(Compositor* aCompositor)
+{
+ CompositorD3D11* d3dCompositor = AssertD3D11Compositor(aCompositor);
+ if (!d3dCompositor) {
+ return;
+ }
+ mCompositor = d3dCompositor;
+ if (mNextSibling) {
+ mNextSibling->SetCompositor(aCompositor);
+ }
+}
+
+CompositingRenderTargetD3D11::CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture,
+ const gfx::IntPoint& aOrigin,
+ DXGI_FORMAT aFormatOverride)
+ : CompositingRenderTarget(aOrigin)
+{
+ MOZ_ASSERT(aTexture);
+
+ mTexture = aTexture;
+
+ RefPtr<ID3D11Device> device;
+ mTexture->GetDevice(getter_AddRefs(device));
+
+ mFormatOverride = aFormatOverride;
+
+ // If we happen to have a typeless underlying DXGI surface, we need to be explicit
+ // about the format here. (Such a surface could come from an external source, such
+ // as the Oculus compositor)
+ CD3D11_RENDER_TARGET_VIEW_DESC rtvDesc(D3D11_RTV_DIMENSION_TEXTURE2D, mFormatOverride);
+ D3D11_RENDER_TARGET_VIEW_DESC *desc = aFormatOverride == DXGI_FORMAT_UNKNOWN ? nullptr : &rtvDesc;
+
+ HRESULT hr = device->CreateRenderTargetView(mTexture, desc, getter_AddRefs(mRTView));
+
+ if (FAILED(hr)) {
+ LOGD3D11("Failed to create RenderTargetView.");
+ }
+}
+
+void
+CompositingRenderTargetD3D11::BindRenderTarget(ID3D11DeviceContext* aContext)
+{
+ if (mClearOnBind) {
+ FLOAT clear[] = { 0, 0, 0, 0 };
+ aContext->ClearRenderTargetView(mRTView, clear);
+ mClearOnBind = false;
+ }
+ ID3D11RenderTargetView* view = mRTView;
+ aContext->OMSetRenderTargets(1, &view, nullptr);
+}
+
+IntSize
+CompositingRenderTargetD3D11::GetSize() const
+{
+ return TextureSourceD3D11::GetSize();
+}
+
+SyncObjectD3D11::SyncObjectD3D11(SyncHandle aHandle)
+{
+ MOZ_ASSERT(aHandle);
+ mD3D11Device = DeviceManagerDx::Get()->GetContentDevice();
+ mHandle = aHandle;
+}
+
+void
+SyncObjectD3D11::RegisterTexture(ID3D11Texture2D* aTexture)
+{
+ mD3D11SyncedTextures.push_back(aTexture);
+}
+
+bool
+SyncObjectD3D11::IsSyncObjectValid()
+{
+ RefPtr<ID3D11Device> dev = DeviceManagerDx::Get()->GetContentDevice();
+ if (!dev || (dev != mD3D11Device)) {
+ return false;
+ }
+ return true;
+}
+
+void
+SyncObjectD3D11::FinalizeFrame()
+{
+ HRESULT hr;
+
+ if (!mD3D11Texture && mD3D11SyncedTextures.size()) {
+ RefPtr<ID3D11Device> device = DeviceManagerDx::Get()->GetContentDevice();
+
+ hr = device->OpenSharedResource(mHandle, __uuidof(ID3D11Texture2D), (void**)(ID3D11Texture2D**)getter_AddRefs(mD3D11Texture));
+
+ if (FAILED(hr) || !mD3D11Texture) {
+ gfxCriticalError() << "Failed to D3D11 OpenSharedResource for frame finalization: " << hexa(hr);
+
+ if (DeviceManagerDx::Get()->HasDeviceReset()) {
+ return;
+ }
+
+ gfxDevCrash(LogReason::D3D11FinalizeFrame) << "Without device reset: " << hexa(hr);
+ }
+
+ // test QI
+ RefPtr<IDXGIKeyedMutex> mutex;
+ hr = mD3D11Texture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
+
+ if (FAILED(hr) || !mutex) {
+ // Leave both the critical error and MOZ_CRASH for now; the critical error lets
+ // us "save" the hr value. We will probably eventuall replace this with gfxDevCrash.
+ gfxCriticalError() << "Failed to get KeyedMutex (2): " << hexa(hr);
+ MOZ_CRASH("GFX: Cannot get D3D11 KeyedMutex");
+ }
+ }
+
+ if (mD3D11SyncedTextures.size()) {
+ RefPtr<IDXGIKeyedMutex> mutex;
+ hr = mD3D11Texture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex));
+ {
+ AutoTextureLock lock(mutex, hr, 20000);
+
+ if (hr == WAIT_TIMEOUT) {
+ if (DeviceManagerDx::Get()->HasDeviceReset()) {
+ gfxWarning() << "AcquireSync timed out because of device reset.";
+ return;
+ }
+ gfxDevCrash(LogReason::D3D11SyncLock) << "Timeout on the D3D11 sync lock";
+ }
+
+ D3D11_BOX box;
+ box.front = box.top = box.left = 0;
+ box.back = box.bottom = box.right = 1;
+
+ RefPtr<ID3D11Device> dev = DeviceManagerDx::Get()->GetContentDevice();
+ if (!dev) {
+ if (DeviceManagerDx::Get()->HasDeviceReset()) {
+ return;
+ }
+ MOZ_CRASH("GFX: Invalid D3D11 content device");
+ }
+
+ RefPtr<ID3D11DeviceContext> ctx;
+ dev->GetImmediateContext(getter_AddRefs(ctx));
+
+ for (auto iter = mD3D11SyncedTextures.begin(); iter != mD3D11SyncedTextures.end(); iter++) {
+ ctx->CopySubresourceRegion(mD3D11Texture, 0, 0, 0, 0, *iter, 0, &box);
+ }
+ }
+
+ mD3D11SyncedTextures.clear();
+ }
+}
+
+}
+}
diff --git a/gfx/layers/d3d11/TextureD3D11.h b/gfx/layers/d3d11/TextureD3D11.h
new file mode 100644
index 000000000..831342aa2
--- /dev/null
+++ b/gfx/layers/d3d11/TextureD3D11.h
@@ -0,0 +1,455 @@
+/* -*- 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_TEXTURED3D11_H
+#define MOZILLA_GFX_TEXTURED3D11_H
+
+#include "mozilla/gfx/2D.h"
+#include "mozilla/layers/Compositor.h"
+#include "mozilla/layers/TextureClient.h"
+#include "mozilla/layers/TextureHost.h"
+#include "gfxWindowsPlatform.h"
+#include "mozilla/GfxMessageUtils.h"
+#include <d3d11.h>
+#include "d3d9.h"
+#include <vector>
+
+namespace mozilla {
+namespace layers {
+
+class MOZ_RAII AutoTextureLock
+{
+public:
+ AutoTextureLock(IDXGIKeyedMutex* aMutex, HRESULT& aResult,
+ uint32_t aTimeout = 0);
+ ~AutoTextureLock();
+
+private:
+ RefPtr<IDXGIKeyedMutex> mMutex;
+ HRESULT mResult;
+};
+
+class CompositorD3D11;
+
+class DXGITextureData : public TextureData
+{
+public:
+ virtual void FillInfo(TextureData::Info& aInfo) const override;
+
+ virtual bool Serialize(SurfaceDescriptor& aOutDescrptor) override;
+
+ static DXGITextureData*
+ Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, TextureAllocationFlags aFlags);
+
+protected:
+ bool PrepareDrawTargetInLock(OpenMode aMode);
+
+ DXGITextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ bool aNeedsClear, bool aNeedsClearWhite,
+ bool aIsForOutOfBandContent);
+
+ virtual void GetDXGIResource(IDXGIResource** aOutResource) = 0;
+
+ // Hold on to the DrawTarget because it is expensive to create one each ::Lock.
+ RefPtr<gfx::DrawTarget> mDrawTarget;
+ gfx::IntSize mSize;
+ gfx::SurfaceFormat mFormat;
+ bool mNeedsClear;
+ bool mNeedsClearWhite;
+ bool mHasSynchronization;
+ bool mIsForOutOfBandContent;
+};
+
+class D3D11TextureData : public DXGITextureData
+{
+public:
+ // If aDevice is null, use one provided by gfxWindowsPlatform.
+ static DXGITextureData*
+ Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ TextureAllocationFlags aAllocFlags,
+ ID3D11Device* aDevice = nullptr);
+ static DXGITextureData*
+ Create(gfx::SourceSurface* aSurface,
+ TextureAllocationFlags aAllocFlags,
+ ID3D11Device* aDevice = nullptr);
+
+ virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override;
+
+ virtual bool Lock(OpenMode aMode) override;
+
+ virtual void Unlock() override;
+
+ virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
+
+ virtual TextureData*
+ CreateSimilar(LayersIPCChannel* aAllocator,
+ LayersBackend aLayersBackend,
+ TextureFlags aFlags,
+ TextureAllocationFlags aAllocFlags) const override;
+
+ virtual void SyncWithObject(SyncObject* aSync) override;
+
+ ID3D11Texture2D* GetD3D11Texture() { return mTexture; }
+
+ virtual void Deallocate(LayersIPCChannel* aAllocator) override;
+
+ D3D11TextureData* AsD3D11TextureData() override {
+ return this;
+ }
+
+ ~D3D11TextureData();
+protected:
+ D3D11TextureData(ID3D11Texture2D* aTexture,
+ gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ bool aNeedsClear, bool aNeedsClearWhite,
+ bool aIsForOutOfBandContent);
+
+ virtual void GetDXGIResource(IDXGIResource** aOutResource) override;
+
+ static DXGITextureData*
+ Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ gfx::SourceSurface* aSurface,
+ TextureAllocationFlags aAllocFlags,
+ ID3D11Device* aDevice = nullptr);
+
+ RefPtr<ID3D11Texture2D> mTexture;
+};
+
+already_AddRefed<TextureClient>
+CreateD3D11extureClientWithDevice(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags,
+ ID3D11Device* aDevice,
+ LayersIPCChannel* aAllocator);
+
+class DXGIYCbCrTextureData : public TextureData
+{
+public:
+ static DXGIYCbCrTextureData*
+ Create(TextureFlags aFlags,
+ IUnknown* aTextureY,
+ IUnknown* aTextureCb,
+ IUnknown* aTextureCr,
+ HANDLE aHandleY,
+ HANDLE aHandleCb,
+ HANDLE aHandleCr,
+ const gfx::IntSize& aSize,
+ const gfx::IntSize& aSizeY,
+ const gfx::IntSize& aSizeCbCr);
+
+ static DXGIYCbCrTextureData*
+ Create(TextureFlags aFlags,
+ ID3D11Texture2D* aTextureCb,
+ ID3D11Texture2D* aTextureY,
+ ID3D11Texture2D* aTextureCr,
+ const gfx::IntSize& aSize,
+ const gfx::IntSize& aSizeY,
+ const gfx::IntSize& aSizeCbCr);
+
+ virtual bool Lock(OpenMode) override { return true; }
+
+ virtual void Unlock() override {}
+
+ virtual void FillInfo(TextureData::Info& aInfo) const override;
+
+ virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
+
+ virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override { return nullptr; }
+
+ virtual void Deallocate(LayersIPCChannel* aAllocator) override;
+
+ virtual bool UpdateFromSurface(gfx::SourceSurface*) override { return false; }
+
+ virtual TextureFlags GetTextureFlags() const override
+ {
+ return TextureFlags::DEALLOCATE_MAIN_THREAD;
+ }
+
+protected:
+ RefPtr<IUnknown> mHoldRefs[3];
+ HANDLE mHandles[3];
+ gfx::IntSize mSize;
+ gfx::IntSize mSizeY;
+ gfx::IntSize mSizeCbCr;
+};
+
+/**
+ * TextureSource that provides with the necessary APIs to be composited by a
+ * CompositorD3D11.
+ */
+class TextureSourceD3D11
+{
+public:
+ TextureSourceD3D11() : mFormatOverride(DXGI_FORMAT_UNKNOWN) {}
+ virtual ~TextureSourceD3D11() {}
+
+ virtual ID3D11Texture2D* GetD3D11Texture() const { return mTexture; }
+ virtual ID3D11ShaderResourceView* GetShaderResourceView();
+protected:
+ virtual gfx::IntSize GetSize() const { return mSize; }
+
+ gfx::IntSize mSize;
+ RefPtr<ID3D11Texture2D> mTexture;
+ RefPtr<ID3D11ShaderResourceView> mSRV;
+ DXGI_FORMAT mFormatOverride;
+};
+
+/**
+ * A TextureSource that implements the DataTextureSource interface.
+ * it can be used without a TextureHost and is able to upload texture data
+ * from a gfx::DataSourceSurface.
+ */
+class DataTextureSourceD3D11 : public DataTextureSource
+ , public TextureSourceD3D11
+ , public BigImageIterator
+{
+public:
+ /// Constructor allowing the texture to perform texture uploads.
+ ///
+ /// The texture can be used as an actual DataTextureSource.
+ DataTextureSourceD3D11(gfx::SurfaceFormat aFormat, CompositorD3D11* aCompositor,
+ TextureFlags aFlags);
+
+ /// Constructor for textures created around DXGI shared handles, disallowing
+ /// texture uploads.
+ ///
+ /// The texture CANNOT be used as a DataTextureSource.
+ DataTextureSourceD3D11(gfx::SurfaceFormat aFormat, CompositorD3D11* aCompositor,
+ ID3D11Texture2D* aTexture);
+
+ virtual ~DataTextureSourceD3D11();
+
+ virtual const char* Name() const override { return "DataTextureSourceD3D11"; }
+
+ // DataTextureSource
+
+ virtual bool Update(gfx::DataSourceSurface* aSurface,
+ nsIntRegion* aDestRegion = nullptr,
+ gfx::IntPoint* aSrcOffset = nullptr) override;
+
+ // TextureSource
+
+ virtual TextureSourceD3D11* AsSourceD3D11() override { return this; }
+
+ virtual ID3D11Texture2D* GetD3D11Texture() const override;
+
+ virtual ID3D11ShaderResourceView* GetShaderResourceView() override;
+
+ // Returns nullptr if this texture was created by a DXGI TextureHost.
+ virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : false; }
+
+ virtual void DeallocateDeviceData() override { mTexture = nullptr; }
+
+ virtual gfx::IntSize GetSize() const override { return mSize; }
+
+ virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
+
+ virtual void SetCompositor(Compositor* aCompositor) override;
+
+ // BigImageIterator
+
+ virtual BigImageIterator* AsBigImageIterator() override { return mIsTiled ? this : nullptr; }
+
+ virtual size_t GetTileCount() override { return mTileTextures.size(); }
+
+ virtual bool NextTile() override { return (++mCurrentTile < mTileTextures.size()); }
+
+ virtual gfx::IntRect GetTileRect() override;
+
+ virtual void EndBigImageIteration() override { mIterating = false; }
+
+ virtual void BeginBigImageIteration() override
+ {
+ mIterating = true;
+ mCurrentTile = 0;
+ }
+
+protected:
+ gfx::IntRect GetTileRect(uint32_t aIndex) const;
+
+ void Reset();
+
+ std::vector< RefPtr<ID3D11Texture2D> > mTileTextures;
+ std::vector< RefPtr<ID3D11ShaderResourceView> > mTileSRVs;
+ RefPtr<CompositorD3D11> mCompositor;
+ gfx::SurfaceFormat mFormat;
+ TextureFlags mFlags;
+ uint32_t mCurrentTile;
+ bool mIsTiled;
+ bool mIterating;
+ // Sadly, the code was originally organized so that this class is used both in
+ // the cases where we want to perform texture uploads through the DataTextureSource
+ // interface, and the cases where we wrap the texture around an existing DXGI
+ // handle in which case we should not use it as a DataTextureSource.
+ // This member differentiates the two scenarios. When it is false the texture
+ // "pretends" to not be a DataTextureSource.
+ bool mAllowTextureUploads;
+};
+
+already_AddRefed<TextureClient>
+CreateD3D11TextureClientWithDevice(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
+ TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags,
+ ID3D11Device* aDevice,
+ LayersIPCChannel* aAllocator);
+
+
+/**
+ * A TextureHost for shared D3D11 textures.
+ */
+class DXGITextureHostD3D11 : public TextureHost
+{
+public:
+ DXGITextureHostD3D11(TextureFlags aFlags,
+ const SurfaceDescriptorD3D10& aDescriptor);
+
+ virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override;
+
+ virtual void DeallocateDeviceData() override {}
+
+ virtual void SetCompositor(Compositor* aCompositor) override;
+
+ virtual Compositor* GetCompositor() override;
+
+ virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
+
+ virtual bool Lock() override;
+ virtual void Unlock() override;
+
+ virtual bool LockWithoutCompositor() override;
+ virtual void UnlockWithoutCompositor() override;
+
+ virtual gfx::IntSize GetSize() const override { return mSize; }
+
+ virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override
+ {
+ return nullptr;
+ }
+
+protected:
+ bool LockInternal();
+ void UnlockInternal();
+
+ RefPtr<ID3D11Device> GetDevice();
+
+ bool OpenSharedHandle();
+
+ RefPtr<ID3D11Texture2D> mTexture;
+ RefPtr<DataTextureSourceD3D11> mTextureSource;
+ RefPtr<CompositorD3D11> mCompositor;
+ gfx::IntSize mSize;
+ WindowsHandle mHandle;
+ gfx::SurfaceFormat mFormat;
+ bool mIsLocked;
+};
+
+class DXGIYCbCrTextureHostD3D11 : public TextureHost
+{
+public:
+ DXGIYCbCrTextureHostD3D11(TextureFlags aFlags,
+ const SurfaceDescriptorDXGIYCbCr& aDescriptor);
+
+ virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override;
+
+ virtual void DeallocateDeviceData() override{}
+
+ virtual void SetCompositor(Compositor* aCompositor) override;
+
+ virtual Compositor* GetCompositor() override;
+
+ virtual gfx::SurfaceFormat GetFormat() const override{ return gfx::SurfaceFormat::YUV; }
+
+ // Bug 1305906 fixes YUVColorSpace handling
+ virtual YUVColorSpace GetYUVColorSpace() const override { return YUVColorSpace::BT601; }
+
+ virtual bool Lock() override;
+
+ virtual void Unlock() override;
+
+ virtual gfx::IntSize GetSize() const override { return mSize; }
+
+ virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override
+ {
+ return nullptr;
+ }
+
+protected:
+ RefPtr<ID3D11Device> GetDevice();
+
+ bool OpenSharedHandle();
+
+ RefPtr<ID3D11Texture2D> mTextures[3];
+ RefPtr<DataTextureSourceD3D11> mTextureSources[3];
+
+ RefPtr<CompositorD3D11> mCompositor;
+ gfx::IntSize mSize;
+ WindowsHandle mHandles[3];
+ bool mIsLocked;
+};
+
+class CompositingRenderTargetD3D11 : public CompositingRenderTarget,
+ public TextureSourceD3D11
+{
+public:
+ CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture,
+ const gfx::IntPoint& aOrigin,
+ DXGI_FORMAT aFormatOverride = DXGI_FORMAT_UNKNOWN);
+
+ virtual const char* Name() const override { return "CompositingRenderTargetD3D11"; }
+
+ virtual TextureSourceD3D11* AsSourceD3D11() override { return this; }
+
+ void BindRenderTarget(ID3D11DeviceContext* aContext);
+
+ virtual gfx::IntSize GetSize() const override;
+
+ void SetSize(const gfx::IntSize& aSize) { mSize = aSize; }
+
+private:
+ friend class CompositorD3D11;
+ RefPtr<ID3D11RenderTargetView> mRTView;
+};
+
+class SyncObjectD3D11 : public SyncObject
+{
+public:
+ SyncObjectD3D11(SyncHandle aSyncHandle);
+ virtual void FinalizeFrame();
+ virtual bool IsSyncObjectValid();
+
+ virtual SyncType GetSyncType() { return SyncType::D3D11; }
+
+ void RegisterTexture(ID3D11Texture2D* aTexture);
+
+private:
+ RefPtr<ID3D11Texture2D> mD3D11Texture;
+ RefPtr<ID3D11Device> mD3D11Device;
+ std::vector<ID3D11Texture2D*> mD3D11SyncedTextures;
+ SyncHandle mHandle;
+};
+
+inline uint32_t GetMaxTextureSizeForFeatureLevel(D3D_FEATURE_LEVEL aFeatureLevel)
+{
+ int32_t maxTextureSize;
+ switch (aFeatureLevel) {
+ case D3D_FEATURE_LEVEL_11_1:
+ case D3D_FEATURE_LEVEL_11_0:
+ maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+ break;
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0:
+ maxTextureSize = D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+ break;
+ case D3D_FEATURE_LEVEL_9_3:
+ maxTextureSize = D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+ break;
+ default:
+ maxTextureSize = D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+ }
+ return maxTextureSize;
+}
+
+}
+}
+
+#endif /* MOZILLA_GFX_TEXTURED3D11_H */
diff --git a/gfx/layers/d3d11/genshaders.sh b/gfx/layers/d3d11/genshaders.sh
new file mode 100644
index 000000000..0928e3f49
--- /dev/null
+++ b/gfx/layers/d3d11/genshaders.sh
@@ -0,0 +1,50 @@
+# 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/.
+
+tempfile=tmpShaderHeader
+
+FXC_DEBUG_FLAGS="-Zi -Fd shaders.pdb"
+FXC_FLAGS=""
+
+# If DEBUG is in the environment, then rebuild with debug info
+if [ "$DEBUG" != "" ] ; then
+ FXC_FLAGS="$FXC_DEBUG_FLAGS"
+fi
+
+makeShaderVS() {
+ fxc -nologo $FXC_FLAGS -Tvs_4_0_level_9_3 $SRC -E$1 -Vn$1 -Fh$tempfile
+ echo "ShaderBytes s$1 = { $1, sizeof($1) };" >> $tempfile;
+ cat $tempfile >> $DEST
+}
+
+makeShaderPS() {
+ fxc -nologo $FXC_FLAGS -Tps_4_0_level_9_3 $SRC -E$1 -Vn$1 -Fh$tempfile
+ echo "ShaderBytes s$1 = { $1, sizeof($1) };" >> $tempfile;
+ cat $tempfile >> $DEST
+}
+
+SRC=CompositorD3D11.hlsl
+DEST=CompositorD3D11Shaders.h
+
+rm -f $DEST
+echo "struct ShaderBytes { const void* mData; size_t mLength; };" >> $DEST;
+makeShaderVS LayerQuadVS
+makeShaderPS SolidColorShader
+makeShaderPS RGBShader
+makeShaderPS RGBAShader
+makeShaderPS ComponentAlphaShader
+makeShaderPS YCbCrShader
+makeShaderVS LayerQuadMaskVS
+makeShaderPS SolidColorShaderMask
+makeShaderPS RGBShaderMask
+makeShaderPS RGBAShaderMask
+makeShaderPS YCbCrShaderMask
+makeShaderPS ComponentAlphaShaderMask
+
+# Mix-blend shaders
+makeShaderVS LayerQuadBlendVS
+makeShaderVS LayerQuadBlendMaskVS
+makeShaderPS BlendShader
+
+rm $tempfile