2013-05-03 21:34:29 +04:00
|
|
|
/* -*- 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 MOZILLA_GFX_TEXTURED3D11_H
|
|
|
|
#define MOZILLA_GFX_TEXTURED3D11_H
|
|
|
|
|
|
|
|
#include "mozilla/layers/Compositor.h"
|
|
|
|
#include "mozilla/layers/TextureClient.h"
|
2013-07-30 13:59:51 +04:00
|
|
|
#include "mozilla/layers/TextureHost.h"
|
2013-05-09 19:32:50 +04:00
|
|
|
#include "gfxWindowsPlatform.h"
|
2013-07-26 23:28:31 +04:00
|
|
|
#include "mozilla/GfxMessageUtils.h"
|
2013-05-03 21:34:29 +04:00
|
|
|
#include <d3d11.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class gfxD2DSurface;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
class CompositorD3D11;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A TextureClient to share a D3D10 texture with the compositor thread.
|
|
|
|
* The corresponding TextureHost is DXGITextureHostD3D11
|
|
|
|
*/
|
|
|
|
class TextureClientD3D11 : public TextureClient
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual bool IsAllocated() const MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool Lock(OpenMode aOpenMode) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void Unlock() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
|
|
|
protected:
|
|
|
|
RefPtr<ID3D10Texture2D> mTexture;
|
|
|
|
bool mIsLocked;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TextureSource that provides with the necessary APIs to be composited by a
|
|
|
|
* CompositorD3D11.
|
|
|
|
*/
|
2013-05-03 21:34:29 +04:00
|
|
|
class TextureSourceD3D11
|
|
|
|
{
|
|
|
|
public:
|
2013-07-23 03:05:04 +04:00
|
|
|
TextureSourceD3D11() {}
|
|
|
|
virtual ~TextureSourceD3D11() {}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
virtual ID3D11Texture2D* GetD3D11Texture() const { return mTexture; }
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
protected:
|
|
|
|
virtual gfx::IntSize GetSize() const { return mSize; }
|
|
|
|
|
|
|
|
gfx::IntSize mSize;
|
|
|
|
RefPtr<ID3D11Texture2D> mTexture;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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 TileIterator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DataTextureSourceD3D11(gfx::SurfaceFormat aFormat, CompositorD3D11* aCompositor);
|
|
|
|
|
|
|
|
DataTextureSourceD3D11(ID3D11Texture2D* aTexture,
|
|
|
|
gfx::SurfaceFormat aFormat);
|
2013-07-23 03:05:04 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
virtual ~DataTextureSourceD3D11();
|
|
|
|
|
|
|
|
void SetCompositor(Compositor* aCompositor);
|
|
|
|
|
|
|
|
// DataTextureSource
|
|
|
|
|
|
|
|
virtual bool Update(gfx::DataSourceSurface* aSurface,
|
|
|
|
TextureFlags aFlags,
|
|
|
|
nsIntRegion* aDestRegion = nullptr,
|
|
|
|
gfx::IntPoint* aSrcOffset = nullptr) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
// TextureSource
|
|
|
|
|
|
|
|
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE { return this; }
|
|
|
|
|
|
|
|
virtual DataTextureSource* AsDataTextureSource() MOZ_OVERRIDE { return this; }
|
|
|
|
|
|
|
|
virtual void DeallocateDeviceData() MOZ_OVERRIDE { mTexture = nullptr; }
|
|
|
|
|
|
|
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
|
|
|
|
|
|
|
virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE { return mFormat; }
|
|
|
|
|
|
|
|
// TileIterator
|
|
|
|
|
|
|
|
virtual TileIterator* AsTileIterator() MOZ_OVERRIDE { return mIsTiled ? this : nullptr; }
|
|
|
|
|
|
|
|
virtual size_t GetTileCount() MOZ_OVERRIDE { return mTileTextures.size(); }
|
|
|
|
|
|
|
|
virtual bool NextTile() MOZ_OVERRIDE { return (++mCurrentTile < mTileTextures.size()); }
|
|
|
|
|
|
|
|
virtual nsIntRect GetTileRect() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void EndTileIteration() MOZ_OVERRIDE { mIterating = false; }
|
|
|
|
|
|
|
|
virtual void BeginTileIteration() MOZ_OVERRIDE
|
2013-07-23 03:05:04 +04:00
|
|
|
{
|
2014-01-07 20:19:52 +04:00
|
|
|
mIterating = true;
|
|
|
|
mCurrentTile = 0;
|
2013-05-03 21:34:29 +04:00
|
|
|
}
|
2013-07-23 03:05:04 +04:00
|
|
|
|
2013-05-03 21:34:29 +04:00
|
|
|
protected:
|
2014-01-07 20:19:52 +04:00
|
|
|
gfx::IntRect GetTileRect(uint32_t aIndex) const;
|
|
|
|
|
|
|
|
std::vector< RefPtr<ID3D11Texture2D> > mTileTextures;
|
|
|
|
RefPtr<CompositorD3D11> mCompositor;
|
|
|
|
gfx::SurfaceFormat mFormat;
|
|
|
|
TextureFlags mFlags;
|
|
|
|
uint32_t mCurrentTile;
|
|
|
|
bool mIsTiled;
|
|
|
|
bool mIterating;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A TextureHost for shared D3D11 textures.
|
|
|
|
*/
|
|
|
|
class DXGITextureHostD3D11 : public TextureHost
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DXGITextureHostD3D11(TextureFlags aFlags,
|
|
|
|
const SurfaceDescriptorD3D10& aDescriptor);
|
|
|
|
|
|
|
|
virtual NewTextureSource* GetTextureSources() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void DeallocateDeviceData() MOZ_OVERRIDE {}
|
|
|
|
|
|
|
|
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE { return mFormat; }
|
|
|
|
|
|
|
|
virtual bool Lock() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void Unlock() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
RefPtr<DataTextureSourceD3D11> mTextureSource;
|
|
|
|
RefPtr<ID3D11Device> mDevice;
|
2013-05-03 21:34:29 +04:00
|
|
|
gfx::IntSize mSize;
|
2014-01-07 20:19:52 +04:00
|
|
|
WindowsHandle mHandle;
|
|
|
|
gfx::SurfaceFormat mFormat;
|
|
|
|
bool mIsLocked;
|
2013-05-03 21:34:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class CompositingRenderTargetD3D11 : public CompositingRenderTarget,
|
|
|
|
public TextureSourceD3D11
|
|
|
|
{
|
|
|
|
public:
|
2013-11-07 13:53:08 +04:00
|
|
|
CompositingRenderTargetD3D11(ID3D11Texture2D* aTexture,
|
|
|
|
const gfx::IntPoint& aOrigin);
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE { return this; }
|
|
|
|
|
|
|
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
void SetSize(const gfx::IntSize& aSize) { mSize = aSize; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class CompositorD3D11;
|
|
|
|
|
|
|
|
RefPtr<ID3D11RenderTargetView> mRTView;
|
|
|
|
};
|
|
|
|
|
2013-07-09 01:30:44 +04:00
|
|
|
class DeprecatedTextureClientD3D11 : public DeprecatedTextureClient
|
2013-05-03 21:34:29 +04:00
|
|
|
{
|
|
|
|
public:
|
2013-07-23 03:05:04 +04:00
|
|
|
DeprecatedTextureClientD3D11(CompositableForwarder* aCompositableForwarder,
|
|
|
|
const TextureInfo& aTextureInfo);
|
|
|
|
virtual ~DeprecatedTextureClientD3D11();
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual bool SupportsType(DeprecatedTextureClientType aType) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return aType == TEXTURE_CONTENT;
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2013-08-04 11:46:17 +04:00
|
|
|
virtual bool EnsureAllocated(gfx::IntSize aSize,
|
2013-09-25 00:45:13 +04:00
|
|
|
gfxContentType aType) MOZ_OVERRIDE;
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
virtual gfxASurface* LockSurface() MOZ_OVERRIDE;
|
|
|
|
virtual gfx::DrawTarget* LockDrawTarget() MOZ_OVERRIDE;
|
2013-08-09 03:32:19 +04:00
|
|
|
virtual gfx::BackendType BackendType() MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return gfx::BACKEND_DIRECT2D;
|
|
|
|
}
|
|
|
|
|
2013-05-03 21:34:29 +04:00
|
|
|
virtual void Unlock() MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual void SetDescriptor(const SurfaceDescriptor& aDescriptor) MOZ_OVERRIDE;
|
2013-09-25 00:45:13 +04:00
|
|
|
virtual gfxContentType GetContentType() MOZ_OVERRIDE
|
2013-07-23 03:05:04 +04:00
|
|
|
{
|
|
|
|
return mContentType;
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void EnsureSurface();
|
|
|
|
void EnsureDrawTarget();
|
|
|
|
void LockTexture();
|
|
|
|
void ReleaseTexture();
|
|
|
|
void ClearDT();
|
|
|
|
|
|
|
|
RefPtr<ID3D10Texture2D> mTexture;
|
|
|
|
nsRefPtr<gfxD2DSurface> mSurface;
|
|
|
|
RefPtr<gfx::DrawTarget> mDrawTarget;
|
|
|
|
gfx::IntSize mSize;
|
|
|
|
bool mIsLocked;
|
|
|
|
gfxContentType mContentType;
|
|
|
|
};
|
|
|
|
|
2013-07-09 01:30:44 +04:00
|
|
|
class DeprecatedTextureHostShmemD3D11 : public DeprecatedTextureHost
|
2013-07-23 03:05:04 +04:00
|
|
|
, public TextureSourceD3D11
|
|
|
|
, public TileIterator
|
2013-05-03 21:34:29 +04:00
|
|
|
{
|
|
|
|
public:
|
2013-07-09 01:30:44 +04:00
|
|
|
DeprecatedTextureHostShmemD3D11()
|
2013-05-03 21:34:29 +04:00
|
|
|
: mDevice(nullptr)
|
|
|
|
, mIsTiled(false)
|
|
|
|
, mCurrentTile(0)
|
|
|
|
, mIterating(false)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE { return this; }
|
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual ID3D11Texture2D* GetD3D11Texture() const MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return mIsTiled ? mTileTextures[mCurrentTile].get()
|
|
|
|
: TextureSourceD3D11::GetD3D11Texture();
|
2013-05-03 21:34:29 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE;
|
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual LayerRenderState GetRenderState() MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return LayerRenderState();
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
virtual bool Lock() MOZ_OVERRIDE { return true; }
|
|
|
|
|
2013-11-27 13:59:01 +04:00
|
|
|
virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE
|
2013-05-26 06:43:43 +04:00
|
|
|
{
|
2014-01-07 20:19:52 +04:00
|
|
|
return nullptr;
|
2013-05-26 06:43:43 +04:00
|
|
|
}
|
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual const char* Name() MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return "DeprecatedTextureHostShmemD3D11";
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual void BeginTileIteration() MOZ_OVERRIDE
|
|
|
|
{
|
2013-05-03 21:34:29 +04:00
|
|
|
mIterating = true;
|
|
|
|
mCurrentTile = 0;
|
|
|
|
}
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual void EndTileIteration() MOZ_OVERRIDE
|
|
|
|
{
|
2013-05-03 21:34:29 +04:00
|
|
|
mIterating = false;
|
|
|
|
}
|
|
|
|
virtual nsIntRect GetTileRect() MOZ_OVERRIDE;
|
|
|
|
virtual size_t GetTileCount() MOZ_OVERRIDE { return mTileTextures.size(); }
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual bool NextTile() MOZ_OVERRIDE
|
|
|
|
{
|
2013-05-03 21:34:29 +04:00
|
|
|
return (++mCurrentTile < mTileTextures.size());
|
|
|
|
}
|
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual TileIterator* AsTileIterator() MOZ_OVERRIDE
|
|
|
|
{
|
2013-05-03 21:34:29 +04:00
|
|
|
return mIsTiled ? this : nullptr;
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
virtual void UpdateImpl(const SurfaceDescriptor& aSurface,
|
2013-05-16 07:45:43 +04:00
|
|
|
nsIntRegion* aRegion,
|
|
|
|
nsIntPoint *aOffset = nullptr) MOZ_OVERRIDE;
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
private:
|
2013-05-03 21:34:29 +04:00
|
|
|
gfx::IntRect GetTileRect(uint32_t aID) const;
|
|
|
|
|
|
|
|
RefPtr<ID3D11Device> mDevice;
|
|
|
|
bool mIsTiled;
|
|
|
|
std::vector< RefPtr<ID3D11Texture2D> > mTileTextures;
|
|
|
|
uint32_t mCurrentTile;
|
|
|
|
bool mIterating;
|
|
|
|
};
|
|
|
|
|
2013-07-09 01:30:44 +04:00
|
|
|
class DeprecatedTextureHostDXGID3D11 : public DeprecatedTextureHost
|
2013-07-23 03:05:04 +04:00
|
|
|
, public TextureSourceD3D11
|
2013-05-03 21:34:29 +04:00
|
|
|
{
|
|
|
|
public:
|
2013-07-09 01:30:44 +04:00
|
|
|
DeprecatedTextureHostDXGID3D11()
|
2013-05-03 21:34:29 +04:00
|
|
|
: mDevice(nullptr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE { return this; }
|
|
|
|
|
|
|
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool Lock() MOZ_OVERRIDE;
|
|
|
|
virtual void Unlock() MOZ_OVERRIDE;
|
|
|
|
|
2013-11-27 13:59:01 +04:00
|
|
|
virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE
|
2013-05-26 06:43:43 +04:00
|
|
|
{
|
|
|
|
return nullptr; // TODO: cf bug 872568
|
|
|
|
}
|
|
|
|
|
2013-07-09 01:30:44 +04:00
|
|
|
virtual const char* Name() { return "DeprecatedTextureHostDXGID3D11"; }
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void UpdateImpl(const SurfaceDescriptor& aSurface,
|
2013-05-16 07:45:43 +04:00
|
|
|
nsIntRegion* aRegion,
|
|
|
|
nsIntPoint* aOffset = nullptr) MOZ_OVERRIDE;
|
2013-05-03 21:34:29 +04:00
|
|
|
private:
|
|
|
|
void LockTexture();
|
|
|
|
void ReleaseTexture();
|
|
|
|
|
|
|
|
RefPtr<ID3D11Device> mDevice;
|
|
|
|
};
|
|
|
|
|
2013-07-09 01:30:44 +04:00
|
|
|
class DeprecatedTextureHostYCbCrD3D11 : public DeprecatedTextureHost
|
2013-05-03 21:34:29 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-01-07 20:19:52 +04:00
|
|
|
DeprecatedTextureHostYCbCrD3D11();
|
|
|
|
~DeprecatedTextureHostYCbCrD3D11();
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
|
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
virtual TextureSourceD3D11* AsSourceD3D11() MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return mFirstSource->AsSourceD3D11();
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
TextureSource* GetSubSource(int index) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return mFirstSource ? mFirstSource->GetSubSource(index) : nullptr;
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2013-11-27 13:59:01 +04:00
|
|
|
virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE
|
2013-05-26 06:43:43 +04:00
|
|
|
{
|
|
|
|
return nullptr; // TODO: cf bug 872568
|
|
|
|
}
|
|
|
|
|
2013-07-23 03:05:04 +04:00
|
|
|
virtual const char* Name() MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
return "TextureImageDeprecatedTextureHostD3D11";
|
|
|
|
}
|
2013-05-03 21:34:29 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void UpdateImpl(const SurfaceDescriptor& aSurface,
|
2013-05-16 07:45:43 +04:00
|
|
|
nsIntRegion* aRegion,
|
|
|
|
nsIntPoint* aOffset = nullptr) MOZ_OVERRIDE;
|
2013-05-03 21:34:29 +04:00
|
|
|
|
2014-01-07 20:19:52 +04:00
|
|
|
ID3D11Device* GetDevice();
|
|
|
|
|
2013-05-03 21:34:29 +04:00
|
|
|
private:
|
2014-01-07 20:19:52 +04:00
|
|
|
gfx::IntSize mSize;
|
|
|
|
RefPtr<DataTextureSource> mFirstSource;
|
|
|
|
RefPtr<CompositorD3D11> mCompositor;
|
2013-05-03 21:34:29 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
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 */
|