wined3d: Also move the rendertarget capability to the formats table.
This commit is contained in:
parent
ef73fe5d47
commit
c0be6047ef
|
@ -1935,24 +1935,16 @@ static BOOL CheckFilterCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
|
|||
static BOOL CheckRenderTargetCapability(WINED3DFORMAT AdapterFormat, WINED3DFORMAT CheckFormat)
|
||||
{
|
||||
UINT Adapter = 0;
|
||||
const GlPixelFormatDesc *glDesc;
|
||||
const StaticPixelFormatDesc *desc = getFormatDescEntry(CheckFormat, &GLINFO_LOCATION, &glDesc);
|
||||
|
||||
/* Fail if we weren't able to get a description of the format */
|
||||
if(!desc || !glDesc)
|
||||
return FALSE;
|
||||
|
||||
/* Filter out non-RT formats */
|
||||
switch(CheckFormat)
|
||||
{
|
||||
/* Don't offer 8bit, windows doesn't either although we could emulate it */
|
||||
case WINED3DFMT_A8P8:
|
||||
case WINED3DFMT_P8:
|
||||
|
||||
/* No DXTC render targets */
|
||||
case WINED3DFMT_DXT1:
|
||||
case WINED3DFMT_DXT2:
|
||||
case WINED3DFMT_DXT3:
|
||||
case WINED3DFMT_DXT4:
|
||||
case WINED3DFMT_DXT5:
|
||||
if(!(glDesc->Flags & WINED3DFMT_FLAG_RENDERTARGET))
|
||||
return FALSE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) {
|
||||
WineD3D_PixelFormat *cfgs = Adapters[Adapter].cfgs;
|
||||
|
|
|
@ -153,21 +153,21 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
|
|||
,0 },
|
||||
/* IEEE formats */
|
||||
{WINED3DFMT_R32F ,GL_RGB32F_ARB ,GL_RGB32F_ARB , 0, GL_RED ,GL_FLOAT
|
||||
,0 },
|
||||
,WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_G32R32F ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
,WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_A32B32G32R32F ,GL_RGBA32F_ARB ,GL_RGBA32F_ARB , 0, GL_RGBA ,GL_FLOAT
|
||||
,0 },
|
||||
,WINED3DFMT_FLAG_RENDERTARGET },
|
||||
/* Hmm? */
|
||||
{WINED3DFMT_CxV8U8 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
/* Float */
|
||||
{WINED3DFMT_R16F ,GL_RGB16F_ARB ,GL_RGB16F_ARB , 0, GL_RED ,GL_HALF_FLOAT_ARB
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_G16R16F ,0 ,0 , 0, 0 ,0
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_A16B16G16R16F ,GL_RGBA16F_ARB ,GL_RGBA16F_ARB , 0, GL_RGBA ,GL_HALF_FLOAT_ARB
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
/* Palettized formats */
|
||||
{WINED3DFMT_A8P8, 0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
|
@ -175,13 +175,13 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
|
|||
,0 },
|
||||
/* Standard ARGB formats */
|
||||
{WINED3DFMT_R8G8B8 ,GL_RGB8 ,GL_RGB8 , 0, GL_BGR ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_A8R8G8B8 ,GL_RGBA8 ,GL_SRGB8_ALPHA8_EXT , 0, GL_BGRA ,GL_UNSIGNED_INT_8_8_8_8_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_X8R8G8B8 ,GL_RGB8 ,GL_SRGB8_EXT , 0, GL_BGRA ,GL_UNSIGNED_INT_8_8_8_8_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_R5G6B5 ,GL_RGB5 ,GL_RGB5 , GL_RGB8, GL_RGB ,GL_UNSIGNED_SHORT_5_6_5
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_X1R5G5B5 ,GL_RGB5 ,GL_RGB5_A1 , 0, GL_BGRA ,GL_UNSIGNED_SHORT_1_5_5_5_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A1R5G5B5 ,GL_RGB5_A1 ,GL_RGB5_A1 , 0, GL_BGRA ,GL_UNSIGNED_SHORT_1_5_5_5_REV
|
||||
|
@ -207,7 +207,7 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
|
|||
{WINED3DFMT_A2R10G10B10 ,GL_RGBA ,GL_RGBA , 0, GL_BGRA ,GL_UNSIGNED_INT_2_10_10_10_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A16B16G16R16 ,GL_RGBA16_EXT ,GL_RGBA16_EXT , 0, GL_RGBA ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
/* Luminance */
|
||||
{WINED3DFMT_L8 ,GL_LUMINANCE8 ,GL_SLUMINANCE8_EXT , 0, GL_LUMINANCE ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
|
|
|
@ -35,6 +35,7 @@ typedef enum {
|
|||
#define WINED3DFMT_FLAG_FILTERING 0x2
|
||||
#define WINED3DFMT_FLAG_DEPTH 0x4
|
||||
#define WINED3DFMT_FLAG_STENCIL 0x8
|
||||
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
|
||||
|
||||
/** DCL usage masks **/
|
||||
#define WINED3DSP_DCL_USAGE_SHIFT 0
|
||||
|
|
Loading…
Reference in New Issue