mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-27 11:12:05 +00:00
wined3d: Collapse together NPOT d3d_info flags.
This commit is contained in:
parent
65cc641719
commit
dcb0136cc0
|
@ -4298,7 +4298,7 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
|
|||
{
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_VOLUMEMAP
|
||||
| WINED3DPTEXTURECAPS_MIPVOLUMEMAP;
|
||||
if (!d3d_info->texture_npot)
|
||||
if (!d3d_info->unconditional_npot)
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_VOLUMEMAP_POW2;
|
||||
|
||||
caps->VolumeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFLINEAR
|
||||
|
@ -4338,7 +4338,7 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
|
|||
{
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP
|
||||
| WINED3DPTEXTURECAPS_MIPCUBEMAP;
|
||||
if (!d3d_info->texture_npot)
|
||||
if (!d3d_info->unconditional_npot)
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP_POW2;
|
||||
|
||||
caps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFLINEAR
|
||||
|
@ -5045,9 +5045,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
|||
d3d_info->shader_output_interpolation = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION);
|
||||
d3d_info->viewport_array_index_any_shader = !!gl_info->supported[ARB_SHADER_VIEWPORT_LAYER_ARRAY];
|
||||
d3d_info->stencil_export = !!gl_info->supported[ARB_SHADER_STENCIL_EXPORT];
|
||||
d3d_info->texture_npot = !!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO];
|
||||
d3d_info->texture_npot_conditional = gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT];
|
||||
d3d_info->normalized_texrect = gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT];
|
||||
d3d_info->unconditional_npot = !!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO];
|
||||
d3d_info->draw_base_vertex_offset = !!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX];
|
||||
d3d_info->vertex_bgra = !!gl_info->supported[ARB_VERTEX_ARRAY_BGRA];
|
||||
d3d_info->texture_swizzle = !!gl_info->supported[ARB_TEXTURE_SWIZZLE];
|
||||
|
|
|
@ -2356,9 +2356,7 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_
|
|||
d3d_info->shader_output_interpolation = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION);
|
||||
d3d_info->viewport_array_index_any_shader = false; /* VK_EXT_shader_viewport_index_layer */
|
||||
d3d_info->stencil_export = vk_info->supported[WINED3D_VK_EXT_SHADER_STENCIL_EXPORT];
|
||||
d3d_info->texture_npot = true;
|
||||
d3d_info->texture_npot_conditional = true;
|
||||
d3d_info->normalized_texrect = false;
|
||||
d3d_info->unconditional_npot = true;
|
||||
d3d_info->draw_base_vertex_offset = true;
|
||||
d3d_info->vertex_bgra = true;
|
||||
d3d_info->texture_swizzle = true;
|
||||
|
|
|
@ -2437,12 +2437,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter,
|
|||
WINED3DPTEXTURECAPS_PROJECTED |
|
||||
WINED3DPTEXTURECAPS_PERSPECTIVE;
|
||||
|
||||
if (!d3d_info->texture_npot)
|
||||
{
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_POW2;
|
||||
if (d3d_info->texture_npot_conditional)
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL;
|
||||
}
|
||||
if (!d3d_info->unconditional_npot)
|
||||
caps->TextureCaps |= WINED3DPTEXTURECAPS_POW2 | WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL;
|
||||
|
||||
caps->TextureFilterCaps = WINED3DPTFILTERCAPS_MAGFLINEAR |
|
||||
WINED3DPTFILTERCAPS_MAGFPOINT |
|
||||
|
@ -3323,7 +3319,7 @@ static void wined3d_adapter_no3d_init_d3d_info(struct wined3d_adapter *adapter,
|
|||
struct wined3d_d3d_info *d3d_info = &adapter->d3d_info;
|
||||
|
||||
d3d_info->wined3d_creation_flags = wined3d_creation_flags;
|
||||
d3d_info->texture_npot = TRUE;
|
||||
d3d_info->unconditional_npot = true;
|
||||
d3d_info->feature_level = WINED3D_FEATURE_LEVEL_5;
|
||||
}
|
||||
|
||||
|
|
|
@ -2667,7 +2667,7 @@ static void sampler_desc_from_sampler_states(struct wined3d_sampler_desc *desc,
|
|||
if (texture->flags & WINED3D_TEXTURE_COND_NP2)
|
||||
{
|
||||
desc->mip_filter = WINED3D_TEXF_NONE;
|
||||
if (d3d_info->normalized_texrect)
|
||||
if (!d3d_info->unconditional_npot)
|
||||
desc->min_filter = WINED3D_TEXF_POINT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3713,7 +3713,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
|||
pow2_width = desc->width;
|
||||
pow2_height = desc->height;
|
||||
if (((desc->width & (desc->width - 1)) || (desc->height & (desc->height - 1)) || (desc->depth & (desc->depth - 1)))
|
||||
&& !d3d_info->texture_npot)
|
||||
&& !d3d_info->unconditional_npot)
|
||||
{
|
||||
/* level_count == 0 returns an error as well. */
|
||||
if (level_count != 1 || layer_count != 1 || desc->resource_type == WINED3D_RTYPE_TEXTURE_3D)
|
||||
|
|
|
@ -232,9 +232,9 @@ struct wined3d_d3d_info
|
|||
uint32_t shader_output_interpolation : 1;
|
||||
uint32_t viewport_array_index_any_shader : 1;
|
||||
uint32_t stencil_export : 1;
|
||||
uint32_t texture_npot : 1;
|
||||
uint32_t texture_npot_conditional : 1;
|
||||
uint32_t normalized_texrect : 1;
|
||||
/* If zero, only conditional NPOT textures are supported, via
|
||||
* WINED3D_GL_NORMALIZED_TEXRECT. */
|
||||
uint32_t unconditional_npot : 1;
|
||||
uint32_t draw_base_vertex_offset : 1;
|
||||
uint32_t vertex_bgra : 1;
|
||||
uint32_t texture_swizzle : 1;
|
||||
|
|
Loading…
Reference in a new issue