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
16394054
Commit
16394054
authored
Apr 29, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the bumpmap format capability in the format table.
parent
f09b8e45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
42 deletions
+26
-42
directx.c
dlls/wined3d/directx.c
+5
-22
utils.c
dlls/wined3d/utils.c
+10
-10
wined3d_private.h
dlls/wined3d/wined3d_private.h
+11
-10
No files found.
dlls/wined3d/directx.c
View file @
16394054
...
...
@@ -3204,28 +3204,11 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter
static
BOOL
CheckBumpMapCapability
(
struct
wined3d_adapter
*
adapter
,
WINED3DDEVTYPE
DeviceType
,
const
struct
wined3d_format_desc
*
format_desc
)
{
switch
(
format_desc
->
format
)
{
case
WINED3DFMT_R8G8_SNORM
:
case
WINED3DFMT_R16G16_SNORM
:
case
WINED3DFMT_R5G5_SNORM_L6_UNORM
:
case
WINED3DFMT_R8G8_SNORM_L8X8_UNORM
:
case
WINED3DFMT_R8G8B8A8_SNORM
:
/* Ask the fixed function pipeline implementation if it can deal
* with the conversion. If we've got a GL extension giving native
* support this will be an identity conversion. */
if
(
adapter
->
fragment_pipe
->
color_fixup_supported
(
format_desc
->
color_fixup
))
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
TRUE
;
}
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
default:
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
}
/* Ask the fixed function pipeline implementation if it can deal
* with the conversion. If we've got a GL extension giving native
* support this will be an identity conversion. */
return
(
format_desc
->
Flags
&
WINED3DFMT_FLAG_BUMPMAP
)
&&
adapter
->
fragment_pipe
->
color_fixup_supported
(
format_desc
->
color_fixup
);
}
/* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */
...
...
dlls/wined3d/utils.c
View file @
16394054
...
...
@@ -732,43 +732,43 @@ static const struct wined3d_format_texture_info format_texture_info[] =
/* Bump mapping stuff */
{
WINED3DFMT_R8G8_SNORM
,
GL_RGB8
,
GL_RGB8
,
0
,
GL_BGR
,
GL_UNSIGNED_BYTE
,
3
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
WINED3D_GL_EXT_NONE
,
&
convert_r8g8_snorm
},
{
WINED3DFMT_R8G8_SNORM
,
GL_DSDT8_NV
,
GL_DSDT8_NV
,
0
,
GL_DSDT_NV
,
GL_BYTE
,
0
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
NV_TEXTURE_SHADER
,
NULL
},
{
WINED3DFMT_R5G5_SNORM_L6_UNORM
,
GL_RGB5
,
GL_RGB5
,
0
,
GL_RGB
,
GL_UNSIGNED_SHORT_5_6_5
,
2
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
WINED3D_GL_EXT_NONE
,
&
convert_r5g5_snorm_l6_unorm
},
{
WINED3DFMT_R5G5_SNORM_L6_UNORM
,
GL_DSDT8_MAG8_NV
,
GL_DSDT8_MAG8_NV
,
0
,
GL_DSDT_MAG_NV
,
GL_BYTE
,
3
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
NV_TEXTURE_SHADER
,
&
convert_r5g5_snorm_l6_unorm_nv
},
{
WINED3DFMT_R8G8_SNORM_L8X8_UNORM
,
GL_RGB8
,
GL_RGB8
,
0
,
GL_BGRA
,
GL_UNSIGNED_INT_8_8_8_8_REV
,
4
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
WINED3D_GL_EXT_NONE
,
&
convert_r8g8_snorm_l8x8_unorm
},
{
WINED3DFMT_R8G8_SNORM_L8X8_UNORM
,
GL_DSDT8_MAG8_INTENSITY8_NV
,
GL_DSDT8_MAG8_INTENSITY8_NV
,
0
,
GL_DSDT_MAG_VIB_NV
,
GL_UNSIGNED_INT_8_8_S8_S8_REV_NV
,
4
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
NV_TEXTURE_SHADER
,
&
convert_r8g8_snorm_l8x8_unorm_nv
},
{
WINED3DFMT_R8G8B8A8_SNORM
,
GL_RGBA8
,
GL_RGBA8
,
0
,
GL_BGRA
,
GL_UNSIGNED_BYTE
,
4
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
WINED3D_GL_EXT_NONE
,
&
convert_r8g8b8a8_snorm
},
{
WINED3DFMT_R8G8B8A8_SNORM
,
GL_SIGNED_RGBA8_NV
,
GL_SIGNED_RGBA8_NV
,
0
,
GL_RGBA
,
GL_BYTE
,
0
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
NV_TEXTURE_SHADER
,
NULL
},
{
WINED3DFMT_R16G16_SNORM
,
GL_RGB16
,
GL_RGB16
,
0
,
GL_BGR
,
GL_UNSIGNED_SHORT
,
6
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
WINED3D_GL_EXT_NONE
,
&
convert_r16g16_snorm
},
{
WINED3DFMT_R16G16_SNORM
,
GL_SIGNED_HILO16_NV
,
GL_SIGNED_HILO16_NV
,
0
,
GL_HILO_NV
,
GL_SHORT
,
0
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
,
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
|
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_BUMPMAP
,
NV_TEXTURE_SHADER
,
NULL
},
/* Depth stencil formats */
{
WINED3DFMT_D16_LOCKABLE
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
...
...
dlls/wined3d/wined3d_private.h
View file @
16394054
...
...
@@ -2978,16 +2978,17 @@ extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN;
*/
/* WineD3D pixel format flags */
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x1
#define WINED3DFMT_FLAG_FILTERING 0x2
#define WINED3DFMT_FLAG_DEPTH 0x4
#define WINED3DFMT_FLAG_STENCIL 0x8
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
#define WINED3DFMT_FLAG_FOURCC 0x20
#define WINED3DFMT_FLAG_FBO_ATTACHABLE 0x40
#define WINED3DFMT_FLAG_COMPRESSED 0x80
#define WINED3DFMT_FLAG_GETDC 0x100
#define WINED3DFMT_FLAG_FLOAT 0x200
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001
#define WINED3DFMT_FLAG_FILTERING 0x00000002
#define WINED3DFMT_FLAG_DEPTH 0x00000004
#define WINED3DFMT_FLAG_STENCIL 0x00000008
#define WINED3DFMT_FLAG_RENDERTARGET 0x00000010
#define WINED3DFMT_FLAG_FOURCC 0x00000020
#define WINED3DFMT_FLAG_FBO_ATTACHABLE 0x00000040
#define WINED3DFMT_FLAG_COMPRESSED 0x00000080
#define WINED3DFMT_FLAG_GETDC 0x00000100
#define WINED3DFMT_FLAG_FLOAT 0x00000200
#define WINED3DFMT_FLAG_BUMPMAP 0x00000400
struct
wined3d_format_desc
{
...
...
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