wined3d: Add support for the NULL format.
This commit is contained in:
parent
2469597e2a
commit
c964134a59
|
@ -271,7 +271,7 @@ static void context_attach_surface_fbo(const struct wined3d_context *context,
|
|||
|
||||
TRACE("Attach surface %p to %u\n", surface, idx);
|
||||
|
||||
if (surface)
|
||||
if (surface && surface->resource.format->id != WINED3DFMT_NULL)
|
||||
{
|
||||
switch (location)
|
||||
{
|
||||
|
@ -1932,7 +1932,7 @@ static void context_apply_draw_buffers(struct wined3d_context *context, UINT rt_
|
|||
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
{
|
||||
if (i < rt_count && rts[i])
|
||||
if (i < rt_count && rts[i] && rts[i]->resource.format->id != WINED3DFMT_NULL)
|
||||
context->draw_buffers[i] = GL_COLOR_ATTACHMENT0 + i;
|
||||
else
|
||||
context->draw_buffers[i] = GL_NONE;
|
||||
|
@ -2062,7 +2062,8 @@ static BOOL context_validate_rt_config(UINT rt_count,
|
|||
|
||||
for (i = 0; i < rt_count; ++i)
|
||||
{
|
||||
if (rts[i]) return TRUE;
|
||||
if (rts[i] && rts[i]->resource.format->id != WINED3DFMT_NULL)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
WARN("Invalid render target config, need at least one attachment.\n");
|
||||
|
|
|
@ -3470,6 +3470,11 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct
|
|||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return FALSE;
|
||||
|
||||
case WINED3DFMT_NULL:
|
||||
if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT])
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
|
||||
case WINED3DFMT_UNKNOWN:
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ static const struct StaticPixelFormatDesc formats[] =
|
|||
{WINED3DFMT_INTZ, 0x0, 0x0, 0x0, 0x0, 4, 24, 8},
|
||||
{WINED3DFMT_NVHU, 0x0, 0x0, 0x0, 0x0, 2, 0, 0},
|
||||
{WINED3DFMT_NVHS, 0x0, 0x0, 0x0, 0x0, 2, 0, 0},
|
||||
{WINED3DFMT_NULL, 0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0},
|
||||
};
|
||||
|
||||
struct wined3d_format_base_flags
|
||||
|
@ -158,6 +159,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
|
|||
{WINED3DFMT_G8R8_G8B8, WINED3DFMT_FLAG_FOURCC},
|
||||
{WINED3DFMT_R8G8_B8G8, WINED3DFMT_FLAG_FOURCC},
|
||||
{WINED3DFMT_INTZ, WINED3DFMT_FLAG_FOURCC},
|
||||
{WINED3DFMT_NULL, WINED3DFMT_FLAG_FOURCC},
|
||||
{WINED3DFMT_P8_UINT, WINED3DFMT_FLAG_GETDC},
|
||||
{WINED3DFMT_B8G8R8_UNORM, WINED3DFMT_FLAG_GETDC},
|
||||
{WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_FLAG_GETDC},
|
||||
|
@ -868,6 +870,10 @@ static const struct wined3d_format_texture_info format_texture_info[] =
|
|||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH
|
||||
| WINED3DFMT_FLAG_STENCIL,
|
||||
ARB_FRAMEBUFFER_OBJECT, NULL},
|
||||
{WINED3DFMT_NULL, GL_RGBA8, GL_RGBA8, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_FRAMEBUFFER_OBJECT, NULL},
|
||||
};
|
||||
|
||||
static inline int getFmtIdx(enum wined3d_format_id format_id)
|
||||
|
@ -1740,6 +1746,7 @@ const char *debug_d3dformat(enum wined3d_format_id format_id)
|
|||
FMT_TO_STR(WINED3DFMT_B8G8R8A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B8G8R8X8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_INTZ);
|
||||
FMT_TO_STR(WINED3DFMT_NULL);
|
||||
#undef FMT_TO_STR
|
||||
default:
|
||||
{
|
||||
|
|
|
@ -275,6 +275,7 @@ enum wined3d_format_id
|
|||
WINED3DFMT_NVHU = WINEMAKEFOURCC('N','V','H','U'),
|
||||
WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S'),
|
||||
WINED3DFMT_INTZ = WINEMAKEFOURCC('I','N','T','Z'),
|
||||
WINED3DFMT_NULL = WINEMAKEFOURCC('N','U','L','L'),
|
||||
|
||||
WINED3DFMT_FORCE_DWORD = 0xffffffff
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue