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
afc5744e
Commit
afc5744e
authored
Mar 24, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass format_desc to set_shader().
This should be the last unnecessary getFormatDescEntry() call.
parent
dd1f0d9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+6
-7
surface.c
dlls/wined3d/surface.c
+5
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
afc5744e
...
@@ -3666,20 +3666,19 @@ static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, enum yuv_fixup yuv_fixu
...
@@ -3666,20 +3666,19 @@ static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, enum yuv_fixup yuv_fixu
return
shader
;
return
shader
;
}
}
static
HRESULT
arbfp_blit_set
(
IWineD3DDevice
*
iface
,
WINED3DFORMAT
fmt
,
GLenum
textype
,
UINT
width
,
UINT
height
)
{
static
HRESULT
arbfp_blit_set
(
IWineD3DDevice
*
iface
,
const
struct
GlPixelFormatDesc
*
format_desc
,
GLenum
textype
,
UINT
width
,
UINT
height
)
{
GLenum
shader
;
GLenum
shader
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
float
size
[
4
]
=
{
width
,
height
,
1
,
1
};
float
size
[
4
]
=
{
width
,
height
,
1
,
1
};
struct
arbfp_blit_priv
*
priv
=
device
->
blit_priv
;
struct
arbfp_blit_priv
*
priv
=
device
->
blit_priv
;
const
struct
GlPixelFormatDesc
*
glDesc
;
enum
yuv_fixup
yuv_fixup
;
enum
yuv_fixup
yuv_fixup
;
glDesc
=
getFormatDescEntry
(
fmt
,
&
GLINFO_LOCATION
);
if
(
!
is_yuv_fixup
(
format_desc
->
color_fixup
))
if
(
!
is_yuv_fixup
(
glDesc
->
color_fixup
))
{
{
TRACE
(
"Fixup:
\n
"
);
TRACE
(
"Fixup:
\n
"
);
dump_color_fixup_desc
(
glD
esc
->
color_fixup
);
dump_color_fixup_desc
(
format_d
esc
->
color_fixup
);
/* Don't bother setting up a shader for unconverted formats */
/* Don't bother setting up a shader for unconverted formats */
ENTER_GL
();
ENTER_GL
();
glEnable
(
textype
);
glEnable
(
textype
);
...
@@ -3688,7 +3687,7 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum t
...
@@ -3688,7 +3687,7 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum t
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
yuv_fixup
=
get_yuv_fixup
(
glD
esc
->
color_fixup
);
yuv_fixup
=
get_yuv_fixup
(
format_d
esc
->
color_fixup
);
switch
(
yuv_fixup
)
switch
(
yuv_fixup
)
{
{
...
...
dlls/wined3d/surface.c
View file @
afc5744e
...
@@ -3474,8 +3474,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
...
@@ -3474,8 +3474,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
rect
.
y1
+=
This
->
currentDesc
.
Height
-
h
;
rect
.
y2
+=
This
->
currentDesc
.
Height
-
h
;
rect
.
y1
+=
This
->
currentDesc
.
Height
-
h
;
rect
.
y2
+=
This
->
currentDesc
.
Height
-
h
;
}
}
myDevice
->
blitter
->
set_shader
((
IWineD3DDevice
*
)
myDevice
,
Src
->
resource
.
format_desc
->
format
,
myDevice
->
blitter
->
set_shader
((
IWineD3DDevice
*
)
myDevice
,
Src
->
resource
.
format_desc
,
Src
->
glDescription
.
target
,
Src
->
pow2Width
,
Src
->
pow2Height
);
Src
->
glDescription
.
target
,
Src
->
pow2Width
,
Src
->
pow2Height
);
ENTER_GL
();
ENTER_GL
();
...
@@ -4812,7 +4812,9 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
...
@@ -4812,7 +4812,9 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
static
HRESULT
ffp_blit_alloc
(
IWineD3DDevice
*
iface
)
{
return
WINED3D_OK
;
}
static
HRESULT
ffp_blit_alloc
(
IWineD3DDevice
*
iface
)
{
return
WINED3D_OK
;
}
static
void
ffp_blit_free
(
IWineD3DDevice
*
iface
)
{
}
static
void
ffp_blit_free
(
IWineD3DDevice
*
iface
)
{
}
static
HRESULT
ffp_blit_set
(
IWineD3DDevice
*
iface
,
WINED3DFORMAT
fmt
,
GLenum
textype
,
UINT
width
,
UINT
height
)
{
static
HRESULT
ffp_blit_set
(
IWineD3DDevice
*
iface
,
const
struct
GlPixelFormatDesc
*
format_desc
,
GLenum
textype
,
UINT
width
,
UINT
height
)
{
glEnable
(
textype
);
glEnable
(
textype
);
checkGLcall
(
"glEnable(textype)"
);
checkGLcall
(
"glEnable(textype)"
);
return
WINED3D_OK
;
return
WINED3D_OK
;
...
...
dlls/wined3d/wined3d_private.h
View file @
afc5744e
...
@@ -782,7 +782,8 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_
...
@@ -782,7 +782,8 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_
struct
blit_shader
{
struct
blit_shader
{
HRESULT
(
*
alloc_private
)(
IWineD3DDevice
*
iface
);
HRESULT
(
*
alloc_private
)(
IWineD3DDevice
*
iface
);
void
(
*
free_private
)(
IWineD3DDevice
*
iface
);
void
(
*
free_private
)(
IWineD3DDevice
*
iface
);
HRESULT
(
*
set_shader
)(
IWineD3DDevice
*
iface
,
WINED3DFORMAT
fmt
,
GLenum
textype
,
UINT
width
,
UINT
height
);
HRESULT
(
*
set_shader
)(
IWineD3DDevice
*
iface
,
const
struct
GlPixelFormatDesc
*
format_desc
,
GLenum
textype
,
UINT
width
,
UINT
height
);
void
(
*
unset_shader
)(
IWineD3DDevice
*
iface
);
void
(
*
unset_shader
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
color_fixup_supported
)(
struct
color_fixup_desc
fixup
);
BOOL
(
*
color_fixup_supported
)(
struct
color_fixup_desc
fixup
);
};
};
...
...
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