Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7ff576bb
Commit
7ff576bb
authored
Feb 03, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Select the blitter during adapter initialization.
parent
6806451d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
18 deletions
+15
-18
device.c
dlls/wined3d/device.c
+1
-1
directx.c
dlls/wined3d/directx.c
+13
-4
utils.c
dlls/wined3d/utils.c
+0
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-2
No files found.
dlls/wined3d/device.c
View file @
7ff576bb
...
@@ -6948,7 +6948,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
...
@@ -6948,7 +6948,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
return
hr
;
return
hr
;
}
}
device
->
blitter
=
select_blit_implementation
(
adapter
,
device_type
)
;
device
->
blitter
=
adapter
->
blitter
;
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
...
dlls/wined3d/directx.c
View file @
7ff576bb
...
@@ -1655,6 +1655,17 @@ static const shader_backend_t *select_shader_backend(struct wined3d_adapter *ada
...
@@ -1655,6 +1655,17 @@ static const shader_backend_t *select_shader_backend(struct wined3d_adapter *ada
return
&
none_shader_backend
;
return
&
none_shader_backend
;
}
}
static
const
struct
blit_shader
*
select_blit_implementation
(
struct
wined3d_adapter
*
adapter
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
int
vs_selected_mode
,
ps_selected_mode
;
select_shader_mode
(
gl_info
,
&
ps_selected_mode
,
&
vs_selected_mode
);
if
((
ps_selected_mode
==
SHADER_ARB
||
ps_selected_mode
==
SHADER_GLSL
)
&&
gl_info
->
supported
[
ARB_FRAGMENT_PROGRAM
])
return
&
arbfp_blit
;
else
return
&
ffp_blit
;
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
BOOL
IWineD3DImpl_FillGLCaps
(
struct
wined3d_adapter
*
adapter
)
static
BOOL
IWineD3DImpl_FillGLCaps
(
struct
wined3d_adapter
*
adapter
)
{
{
...
@@ -2095,6 +2106,7 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
...
@@ -2095,6 +2106,7 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
adapter
->
fragment_pipe
=
select_fragment_implementation
(
adapter
);
adapter
->
fragment_pipe
=
select_fragment_implementation
(
adapter
);
adapter
->
shader_backend
=
select_shader_backend
(
adapter
);
adapter
->
shader_backend
=
select_shader_backend
(
adapter
);
adapter
->
blitter
=
select_blit_implementation
(
adapter
);
/* In some cases the number of texture stages can be larger than the number
/* In some cases the number of texture stages can be larger than the number
* of samplers. The GF4 for example can use only 2 samplers (no fragment
* of samplers. The GF4 for example can use only 2 samplers (no fragment
...
@@ -3231,8 +3243,6 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter,
...
@@ -3231,8 +3243,6 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter,
static
BOOL
CheckSurfaceCapability
(
struct
wined3d_adapter
*
adapter
,
const
struct
GlPixelFormatDesc
*
adapter_format_desc
,
static
BOOL
CheckSurfaceCapability
(
struct
wined3d_adapter
*
adapter
,
const
struct
GlPixelFormatDesc
*
adapter_format_desc
,
WINED3DDEVTYPE
DeviceType
,
const
struct
GlPixelFormatDesc
*
check_format_desc
,
WINED3DSURFTYPE
SurfaceType
)
WINED3DDEVTYPE
DeviceType
,
const
struct
GlPixelFormatDesc
*
check_format_desc
,
WINED3DSURFTYPE
SurfaceType
)
{
{
const
struct
blit_shader
*
blitter
;
if
(
SurfaceType
==
SURFACE_GDI
)
{
if
(
SurfaceType
==
SURFACE_GDI
)
{
switch
(
check_format_desc
->
format
)
switch
(
check_format_desc
->
format
)
{
{
...
@@ -3268,8 +3278,7 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, const struct
...
@@ -3268,8 +3278,7 @@ static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter, const struct
if
(
CheckDepthStencilCapability
(
adapter
,
adapter_format_desc
,
check_format_desc
))
return
TRUE
;
if
(
CheckDepthStencilCapability
(
adapter
,
adapter_format_desc
,
check_format_desc
))
return
TRUE
;
/* If opengl can't process the format natively, the blitter may be able to convert it */
/* If opengl can't process the format natively, the blitter may be able to convert it */
blitter
=
select_blit_implementation
(
adapter
,
DeviceType
);
if
(
adapter
->
blitter
->
color_fixup_supported
(
check_format_desc
->
color_fixup
))
if
(
blitter
->
color_fixup_supported
(
check_format_desc
->
color_fixup
))
{
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
TRUE
;
return
TRUE
;
...
...
dlls/wined3d/utils.c
View file @
7ff576bb
...
@@ -2840,14 +2840,3 @@ void select_shader_mode(const struct wined3d_gl_info *gl_info, int *ps_selected,
...
@@ -2840,14 +2840,3 @@ void select_shader_mode(const struct wined3d_gl_info *gl_info, int *ps_selected,
else
if
(
gl_info
->
supported
[
ATI_FRAGMENT_SHADER
])
*
ps_selected
=
SHADER_ATI
;
else
if
(
gl_info
->
supported
[
ATI_FRAGMENT_SHADER
])
*
ps_selected
=
SHADER_ATI
;
else
*
ps_selected
=
SHADER_NONE
;
else
*
ps_selected
=
SHADER_NONE
;
}
}
const
struct
blit_shader
*
select_blit_implementation
(
struct
wined3d_adapter
*
adapter
,
WINED3DDEVTYPE
device_type
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
int
vs_selected_mode
,
ps_selected_mode
;
select_shader_mode
(
gl_info
,
&
ps_selected_mode
,
&
vs_selected_mode
);
if
((
ps_selected_mode
==
SHADER_ARB
||
ps_selected_mode
==
SHADER_GLSL
)
&&
gl_info
->
supported
[
ARB_FRAGMENT_PROGRAM
])
return
&
arbfp_blit
;
else
return
&
ffp_blit
;
}
dlls/wined3d/wined3d_private.h
View file @
7ff576bb
...
@@ -1365,6 +1365,7 @@ struct wined3d_adapter
...
@@ -1365,6 +1365,7 @@ struct wined3d_adapter
const
struct
fragment_pipeline
*
fragment_pipe
;
const
struct
fragment_pipeline
*
fragment_pipe
;
const
shader_backend_t
*
shader_backend
;
const
shader_backend_t
*
shader_backend
;
const
struct
blit_shader
*
blitter
;
};
};
BOOL
initPixelFormats
(
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_pci_vendor
vendor
)
DECLSPEC_HIDDEN
;
BOOL
initPixelFormats
(
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_pci_vendor
vendor
)
DECLSPEC_HIDDEN
;
...
@@ -2569,8 +2570,6 @@ void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED
...
@@ -2569,8 +2570,6 @@ void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED
UINT
wined3d_log2i
(
UINT32
x
)
DECLSPEC_HIDDEN
;
UINT
wined3d_log2i
(
UINT32
x
)
DECLSPEC_HIDDEN
;
unsigned
int
count_bits
(
unsigned
int
mask
)
DECLSPEC_HIDDEN
;
unsigned
int
count_bits
(
unsigned
int
mask
)
DECLSPEC_HIDDEN
;
const
struct
blit_shader
*
select_blit_implementation
(
struct
wined3d_adapter
*
adapter
,
WINED3DDEVTYPE
device_type
)
DECLSPEC_HIDDEN
;
void
select_shader_mode
(
const
struct
wined3d_gl_info
*
gl_info
,
int
*
ps_selected
,
int
*
vs_selected
)
DECLSPEC_HIDDEN
;
void
select_shader_mode
(
const
struct
wined3d_gl_info
*
gl_info
,
int
*
ps_selected
,
int
*
vs_selected
)
DECLSPEC_HIDDEN
;
typedef
struct
local_constant
{
typedef
struct
local_constant
{
...
...
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