Commit b4efd578 authored by Chip Davis's avatar Chip Davis Committed by Alexandre Julliard

wined3d: Move WINED3DFMT_FLAG_INTEGER to the attributes group.

parent 93add6f3
...@@ -5734,6 +5734,7 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c ...@@ -5734,6 +5734,7 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
if (element->stride) if (element->stride)
{ {
DWORD format_flags = format_gl->f.flags[WINED3D_GL_RES_TYPE_BUFFER]; DWORD format_flags = format_gl->f.flags[WINED3D_GL_RES_TYPE_BUFFER];
unsigned int format_attrs = format_gl->f.attrs;
bo = wined3d_bo_gl_id(element->data.buffer_object); bo = wined3d_bo_gl_id(element->data.buffer_object);
if (current_bo != bo) if (current_bo != bo)
...@@ -5746,7 +5747,7 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c ...@@ -5746,7 +5747,7 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
* pointer. vb can point to a user pointer data blob. In that case * pointer. vb can point to a user pointer data blob. In that case
* current_bo will be 0. If there is a vertex buffer but no vbo we * current_bo will be 0. If there is a vertex buffer but no vbo we
* won't be load converted attributes anyway. */ * won't be load converted attributes anyway. */
if (vs && vs->reg_maps.shader_version.major >= 4 && (format_flags & WINED3DFMT_FLAG_INTEGER)) if (vs && vs->reg_maps.shader_version.major >= 4 && (format_attrs & WINED3D_FORMAT_ATTR_INTEGER))
{ {
GL_EXTCALL(glVertexAttribIPointer(i, format_gl->vtx_format, GL_EXTCALL(glVertexAttribIPointer(i, format_gl->vtx_format,
format_gl->vtx_type, element->stride, offset)); format_gl->vtx_type, element->stride, offset));
......
...@@ -6655,7 +6655,7 @@ static void vk_blitter_clear_rendertargets(struct wined3d_context_vk *context_vk ...@@ -6655,7 +6655,7 @@ static void vk_blitter_clear_rendertargets(struct wined3d_context_vk *context_vk
wined3d_rendertarget_view_vk_barrier(rtv_vk, context_vk, WINED3D_BIND_RENDER_TARGET); wined3d_rendertarget_view_vk_barrier(rtv_vk, context_vk, WINED3D_BIND_RENDER_TARGET);
c = &clear_values[attachment_count].color; c = &clear_values[attachment_count].color;
if (view->format_flags & WINED3DFMT_FLAG_INTEGER) if (view->format_attrs & WINED3D_FORMAT_ATTR_INTEGER)
{ {
c->int32[0] = colour->r; c->int32[0] = colour->r;
c->int32[1] = colour->g; c->int32[1] = colour->g;
......
...@@ -2117,7 +2117,7 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter) ...@@ -2117,7 +2117,7 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter)
if (channel_type == WINED3D_CHANNEL_TYPE_UNORM || channel_type == WINED3D_CHANNEL_TYPE_SNORM) if (channel_type == WINED3D_CHANNEL_TYPE_UNORM || channel_type == WINED3D_CHANNEL_TYPE_SNORM)
flags |= WINED3DFMT_FLAG_NORMALISED; flags |= WINED3DFMT_FLAG_NORMALISED;
if (channel_type == WINED3D_CHANNEL_TYPE_UINT || channel_type == WINED3D_CHANNEL_TYPE_SINT) if (channel_type == WINED3D_CHANNEL_TYPE_UINT || channel_type == WINED3D_CHANNEL_TYPE_SINT)
flags |= WINED3DFMT_FLAG_INTEGER; attrs |= WINED3D_FORMAT_ATTR_INTEGER;
if (channel_type == WINED3D_CHANNEL_TYPE_FLOAT) if (channel_type == WINED3D_CHANNEL_TYPE_FLOAT)
attrs |= WINED3D_FORMAT_ATTR_FLOAT; attrs |= WINED3D_FORMAT_ATTR_FLOAT;
if (channel_type != WINED3D_CHANNEL_TYPE_UNUSED) if (channel_type != WINED3D_CHANNEL_TYPE_UNUSED)
...@@ -2598,7 +2598,7 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for ...@@ -2598,7 +2598,7 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for
if (status == GL_FRAMEBUFFER_COMPLETE if (status == GL_FRAMEBUFFER_COMPLETE
&& ((format->f.flags[type] & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) && ((format->f.flags[type] & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)
|| !(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) || !(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING))
&& !(format->f.flags[type] & WINED3DFMT_FLAG_INTEGER) && !(format->f.attrs & WINED3D_FORMAT_ATTR_INTEGER)
&& format->f.id != WINED3DFMT_NULL && format->f.id != WINED3DFMT_P8_UINT && format->f.id != WINED3DFMT_NULL && format->f.id != WINED3DFMT_P8_UINT
&& format->format != GL_LUMINANCE && format->format != GL_LUMINANCE_ALPHA && format->format != GL_LUMINANCE && format->format != GL_LUMINANCE_ALPHA
&& (format->f.red_size || format->f.alpha_size)) && (format->f.red_size || format->f.alpha_size))
...@@ -3214,7 +3214,7 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win ...@@ -3214,7 +3214,7 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
/* ARB_texture_rg defines integer formats if EXT_texture_integer is also supported. */ /* ARB_texture_rg defines integer formats if EXT_texture_integer is also supported. */
if (!gl_info->supported[EXT_TEXTURE_INTEGER] if (!gl_info->supported[EXT_TEXTURE_INTEGER]
&& (format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_INTEGER)) && (format->f.attrs & WINED3D_FORMAT_ATTR_INTEGER))
continue; continue;
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
......
...@@ -1571,7 +1571,7 @@ void wined3d_unordered_access_view_gl_clear(struct wined3d_unordered_access_view ...@@ -1571,7 +1571,7 @@ void wined3d_unordered_access_view_gl_clear(struct wined3d_unordered_access_view
packed = wined3d_format_pack(&format_gl->f, clear_value); packed = wined3d_format_pack(&format_gl->f, clear_value);
data = &packed; data = &packed;
} }
else if (resource->format_flags & WINED3DFMT_FLAG_INTEGER) else if (resource->format_attrs & WINED3D_FORMAT_ATTR_INTEGER)
{ {
gl_format = GL_RGBA_INTEGER; gl_format = GL_RGBA_INTEGER;
gl_type = GL_UNSIGNED_INT; gl_type = GL_UNSIGNED_INT;
......
...@@ -6109,6 +6109,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN ...@@ -6109,6 +6109,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
/* Pixel format attributes */ /* Pixel format attributes */
#define WINED3D_FORMAT_ATTR_FLOAT 0x00000001 #define WINED3D_FORMAT_ATTR_FLOAT 0x00000001
#define WINED3D_FORMAT_ATTR_INTEGER 0x00000002
/* WineD3D pixel format flags */ /* WineD3D pixel format flags */
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001 #define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001
...@@ -6131,7 +6132,6 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN ...@@ -6131,7 +6132,6 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3DFMT_FLAG_HEIGHT_SCALE 0x00040000 #define WINED3DFMT_FLAG_HEIGHT_SCALE 0x00040000
#define WINED3DFMT_FLAG_TEXTURE 0x00080000 #define WINED3DFMT_FLAG_TEXTURE 0x00080000
#define WINED3DFMT_FLAG_BLOCKS_NO_VERIFY 0x00100000 #define WINED3DFMT_FLAG_BLOCKS_NO_VERIFY 0x00100000
#define WINED3DFMT_FLAG_INTEGER 0x00200000
#define WINED3DFMT_FLAG_GEN_MIPMAP 0x00400000 #define WINED3DFMT_FLAG_GEN_MIPMAP 0x00400000
#define WINED3DFMT_FLAG_NORMALISED 0x00800000 #define WINED3DFMT_FLAG_NORMALISED 0x00800000
#define WINED3DFMT_FLAG_VERTEX_ATTRIBUTE 0x01000000 #define WINED3DFMT_FLAG_VERTEX_ATTRIBUTE 0x01000000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment