Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f6ee5b55
Commit
f6ee5b55
authored
May 08, 2022
by
Chip Davis
Committed by
Alexandre Julliard
May 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DFMT_FLAG_NORMALISED to the attributes group.
Signed-off-by:
Chip Davis
<
cdavis5x@gmail.com
>
parent
b4efd578
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
19 deletions
+16
-19
context_gl.c
dlls/wined3d/context_gl.c
+1
-2
device.c
dlls/wined3d/device.c
+1
-2
utils.c
dlls/wined3d/utils.c
+13
-14
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/context_gl.c
View file @
f6ee5b55
...
...
@@ -5733,7 +5733,6 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
if
(
element
->
stride
)
{
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
);
...
...
@@ -5755,7 +5754,7 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c
else
{
GL_EXTCALL
(
glVertexAttribPointer
(
i
,
format_gl
->
vtx_format
,
format_gl
->
vtx_type
,
!!
(
format_
flags
&
WINED3DFMT_FLAG
_NORMALISED
),
element
->
stride
,
offset
));
!!
(
format_
attrs
&
WINED3D_FORMAT_ATTR
_NORMALISED
),
element
->
stride
,
offset
));
}
if
(
!
(
context
->
numbered_array_mask
&
(
1u
<<
i
)))
...
...
dlls/wined3d/device.c
View file @
f6ee5b55
...
...
@@ -5120,8 +5120,7 @@ void CDECL wined3d_device_context_clear_uav_float(struct wined3d_device_context
{
TRACE
(
"context %p, view %p, clear_value %s.
\n
"
,
context
,
view
,
debug_vec4
(
clear_value
));
if
(
!
((
view
->
format
->
attrs
&
WINED3D_FORMAT_ATTR_FLOAT
)
||
(
view
->
format
->
flags
[
WINED3D_GL_RES_TYPE_TEX_2D
]
&
WINED3DFMT_FLAG_NORMALISED
)))
if
(
!
(
view
->
format
->
attrs
&
(
WINED3D_FORMAT_ATTR_FLOAT
|
WINED3D_FORMAT_ATTR_NORMALISED
)))
{
WARN
(
"Not supported for view format %s.
\n
"
,
debug_d3dformat
(
view
->
format
->
id
));
return
;
...
...
dlls/wined3d/utils.c
View file @
f6ee5b55
...
...
@@ -347,16 +347,16 @@ static const struct wined3d_format_base_flags format_base_flags[] =
{
WINED3DFMT_R32_UINT
,
0
,
WINED3DFMT_FLAG_CAST_TO_BLOCK
|
WINED3DFMT_FLAG_INDEX_BUFFER
},
{
WINED3DFMT_R32_SINT
,
0
,
WINED3DFMT_FLAG_CAST_TO_BLOCK
},
{
WINED3DFMT_R16_UINT
,
0
,
WINED3DFMT_FLAG_INDEX_BUFFER
},
{
WINED3DFMT_A8_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B10G10R10A2_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B2G3R3_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B4G4R4A4_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B4G4R4X4_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B5G5R5A1_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B5G5R5X1_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B5G6R5_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_B8G8R8_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_R10G10B10A2_UNORM
,
0
,
WINED3DFMT_FLAG
_NORMALISED
},
{
WINED3DFMT_A8_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B10G10R10A2_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B2G3R3_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B4G4R4A4_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B4G4R4X4_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B5G5R5A1_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B5G5R5X1_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B5G6R5_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_B8G8R8_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
{
WINED3DFMT_R10G10B10A2_UNORM
,
WINED3D_FORMAT_ATTR
_NORMALISED
},
};
static
void
rgb888_from_rgb565
(
WORD
rgb565
,
BYTE
*
r
,
BYTE
*
g
,
BYTE
*
b
)
...
...
@@ -2082,8 +2082,8 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
typed_formats
);
++
i
)
{
struct
wined3d_format
*
typeless_format
;
unsigned
int
flags
=
0
,
attrs
=
0
;
unsigned
int
component_count
=
0
;
unsigned
int
attrs
=
0
;
if
(
!
(
format
=
get_format_internal
(
adapter
,
typed_formats
[
i
].
id
)))
return
FALSE
;
...
...
@@ -2115,7 +2115,7 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter)
enum
wined3d_channel_type
channel_type
=
map_channel_type
(
typed_formats
[
i
].
channels
[
j
]);
if
(
channel_type
==
WINED3D_CHANNEL_TYPE_UNORM
||
channel_type
==
WINED3D_CHANNEL_TYPE_SNORM
)
flags
|=
WINED3DFMT_FLAG
_NORMALISED
;
attrs
|=
WINED3D_FORMAT_ATTR
_NORMALISED
;
if
(
channel_type
==
WINED3D_CHANNEL_TYPE_UINT
||
channel_type
==
WINED3D_CHANNEL_TYPE_SINT
)
attrs
|=
WINED3D_FORMAT_ATTR_INTEGER
;
if
(
channel_type
==
WINED3D_CHANNEL_TYPE_FLOAT
)
...
...
@@ -2138,7 +2138,6 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter)
format
->
component_count
=
component_count
;
format
->
attrs
|=
attrs
;
format_set_flag
(
format
,
flags
);
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
ddi_formats
);
++
i
)
...
...
@@ -6117,7 +6116,7 @@ void wined3d_format_convert_from_float(const struct wined3d_format *format,
return
;
}
if
(
format
->
flags
[
WINED3D_GL_RES_TYPE_TEX_2D
]
&
WINED3DFMT_FLAG
_NORMALISED
)
if
(
format
->
attrs
&
WINED3D_FORMAT_ATTR
_NORMALISED
)
{
uint32_t
*
ret_i
=
ret
;
...
...
dlls/wined3d/wined3d_private.h
View file @
f6ee5b55
...
...
@@ -6110,6 +6110,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
/* Pixel format attributes */
#define WINED3D_FORMAT_ATTR_FLOAT 0x00000001
#define WINED3D_FORMAT_ATTR_INTEGER 0x00000002
#define WINED3D_FORMAT_ATTR_NORMALISED 0x00000004
/* WineD3D pixel format flags */
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001
...
...
@@ -6133,7 +6134,6 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3DFMT_FLAG_TEXTURE 0x00080000
#define WINED3DFMT_FLAG_BLOCKS_NO_VERIFY 0x00100000
#define WINED3DFMT_FLAG_GEN_MIPMAP 0x00400000
#define WINED3DFMT_FLAG_NORMALISED 0x00800000
#define WINED3DFMT_FLAG_VERTEX_ATTRIBUTE 0x01000000
#define WINED3DFMT_FLAG_BLIT 0x02000000
#define WINED3DFMT_FLAG_MAPPABLE 0x04000000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment