Hash :
d6cb2443
Author :
Date :
2013-07-10T15:13:38
Add a client version parameter to several D3D11-specific texture format queries. TRAC #23483 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Authored-by: Jamie Madill
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// formatutils11.h: Queries for GL image formats and their translations to D3D11
// formats.
#ifndef LIBGLESV2_RENDERER_FORMATUTILS11_H_
#define LIBGLESV2_RENDERER_FORMATUTILS11_H_
#include "libGLESv2/formatutils.h"
namespace rx
{
namespace d3d11
{
typedef std::set<DXGI_FORMAT> DXGIFormatSet;
MipGenerationFunction GetMipGenerationFunction(DXGI_FORMAT format, GLuint clientVersion);
LoadImageFunction GetImageLoadFunction(GLint internalFormat, GLenum type, GLuint clientVersion);
GLuint GetFormatPixelBytes(DXGI_FORMAT format, GLuint clientVersion);
GLuint GetBlockWidth(DXGI_FORMAT format, GLuint clientVersion);
GLuint GetBlockHeight(DXGI_FORMAT format, GLuint clientVersion);
GLuint GetDepthBits(DXGI_FORMAT format);
GLuint GetDepthOffset(DXGI_FORMAT format);
GLuint GetStencilBits(DXGI_FORMAT format);
GLuint GetStencilOffset(DXGI_FORMAT format);
void MakeValidSize(bool isImage, DXGI_FORMAT format, GLuint clientVersion, GLsizei *requestWidth, GLsizei *requestHeight, int *levelOffset);
const DXGIFormatSet &GetAllUsedDXGIFormats();
ColorReadFunction GetColorReadFunction(DXGI_FORMAT format, GLuint clientVersion);
ColorCopyFunction GetFastCopyFunction(DXGI_FORMAT sourceFormat, GLenum destFormat, GLenum destType, GLuint clientVersion);
}
namespace gl_d3d11
{
DXGI_FORMAT GetTexFormat(GLint internalFormat, GLuint clientVersion);
DXGI_FORMAT GetSRVFormat(GLint internalFormat, GLuint clientVersion);
DXGI_FORMAT GetRTVFormat(GLint internalFormat, GLuint clientVersion);
DXGI_FORMAT GetDSVFormat(GLint internalFormat, GLuint clientVersion);
DXGI_FORMAT GetRenderableFormat(GLint internalFormat, GLuint clientVersion);
}
namespace d3d11_gl
{
GLint GetInternalFormat(DXGI_FORMAT format, GLuint clientVersion);
}
}
#endif // LIBGLESV2_RENDERER_FORMATUTILS11_H_