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
3bf0ad45
Commit
3bf0ad45
authored
Aug 07, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Explicitly pass the context to the shader_select() handler.
parent
26fbee2d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
12 deletions
+13
-12
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+7
-6
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+1
-1
baseshader.c
dlls/wined3d/baseshader.c
+1
-1
context.c
dlls/wined3d/context.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+0
-0
state.c
dlls/wined3d/state.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
3bf0ad45
...
...
@@ -4210,10 +4210,10 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW
}
/* GL locking is done by the caller */
static
void
shader_arb_select
(
IWineD3DDevice
*
iface
,
BOOL
usePS
,
BOOL
useVS
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
static
void
shader_arb_select
(
const
struct
wined3d_context
*
context
,
BOOL
usePS
,
BOOL
useVS
)
{
IWineD3DDeviceImpl
*
This
=
((
IWineD3DSurfaceImpl
*
)
context
->
surface
)
->
resource
.
wineD3DDevice
;
struct
shader_arb_priv
*
priv
=
This
->
shader_priv
;
struct
wined3d_context
*
context
=
context_get_current
();
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
int
i
;
...
...
@@ -4260,7 +4260,8 @@ static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
}
/* Force constant reloading for the NP2 fixup (see comment in shader_glsl_select for more info) */
if
(
compiled
->
np2fixup_info
.
super
.
active
)
shader_arb_load_np2fixup_constants
(
iface
,
usePS
,
useVS
);
if
(
compiled
->
np2fixup_info
.
super
.
active
)
shader_arb_load_np2fixup_constants
((
IWineD3DDevice
*
)
This
,
usePS
,
useVS
);
}
else
if
(
GL_SUPPORT
(
ARB_FRAGMENT_PROGRAM
)
&&
!
priv
->
use_arbfp_fixed_func
)
{
/* Disable only if we're not using arbfp fixed function fragment processing. If this is used,
* keep GL_FRAGMENT_PROGRAM_ARB enabled, and the fixed function pipeline will bind the fixed function
...
...
@@ -5774,7 +5775,7 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
state_texfactor_arbfp
(
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
stateblock
,
context
);
state_arb_specularenable
(
STATE_RENDER
(
WINED3DRS_SPECULARENABLE
),
stateblock
,
context
);
}
else
if
(
use_pshader
&&
!
isStateDirty
(
context
,
device
->
StateTable
[
STATE_VSHADER
].
representative
))
{
device
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
use_pshader
,
use_vshader
);
device
->
shader_backend
->
shader_select
(
context
,
use_pshader
,
use_vshader
);
}
return
;
}
...
...
@@ -5834,7 +5835,7 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
* shader handler
*/
if
(
!
isStateDirty
(
context
,
device
->
StateTable
[
STATE_VSHADER
].
representative
))
{
device
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
use_pshader
,
use_vshader
);
device
->
shader_backend
->
shader_select
(
context
,
use_pshader
,
use_vshader
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
use_vshader
||
use_pshader
))
{
device
->
StateTable
[
STATE_VERTEXSHADERCONSTANT
].
apply
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
3bf0ad45
...
...
@@ -901,7 +901,7 @@ static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *statebl
* simpler.
*/
if
(
!
isStateDirty
(
context
,
device
->
StateTable
[
STATE_VSHADER
].
representative
))
{
device
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
FALSE
,
use_vshader
);
device
->
shader_backend
->
shader_select
(
context
,
FALSE
,
use_vshader
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
use_vshader
)
{
device
->
StateTable
[
STATE_VERTEXSHADERCONSTANT
].
apply
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
...
...
dlls/wined3d/baseshader.c
View file @
3bf0ad45
...
...
@@ -1366,7 +1366,7 @@ void shader_cleanup(IWineD3DBaseShader *iface)
}
static
void
shader_none_handle_instruction
(
const
struct
wined3d_shader_instruction
*
ins
)
{}
static
void
shader_none_select
(
IWineD3DDevice
*
iface
,
BOOL
usePS
,
BOOL
useVS
)
{}
static
void
shader_none_select
(
const
struct
wined3d_context
*
context
,
BOOL
usePS
,
BOOL
useVS
)
{}
static
void
shader_none_select_depth_blt
(
IWineD3DDevice
*
iface
,
enum
tex_types
tex_type
)
{}
static
void
shader_none_deselect_depth_blt
(
IWineD3DDevice
*
iface
)
{}
static
void
shader_none_update_float_vertex_constants
(
IWineD3DDevice
*
iface
,
UINT
start
,
UINT
count
)
{}
...
...
dlls/wined3d/context.c
View file @
3bf0ad45
...
...
@@ -1528,7 +1528,7 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context
/* Disable shaders */
ENTER_GL
();
This
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
This
,
FALSE
,
FALSE
);
This
->
shader_backend
->
shader_select
(
context
,
FALSE
,
FALSE
);
LEAVE_GL
();
Context_MarkStateDirty
(
context
,
STATE_VSHADER
,
StateTable
);
...
...
dlls/wined3d/glsl_shader.c
View file @
3bf0ad45
This diff is collapsed.
Click to expand it.
dlls/wined3d/state.c
View file @
3bf0ad45
...
...
@@ -3518,7 +3518,7 @@ void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, struct w
}
if
(
!
isStateDirty
(
context
,
device
->
StateTable
[
STATE_VSHADER
].
representative
))
{
device
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
use_pshader
,
use_vshader
);
device
->
shader_backend
->
shader_select
(
context
,
use_pshader
,
use_vshader
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
use_vshader
||
use_pshader
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
...
...
@@ -4587,7 +4587,7 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, s
* application
*/
if
(
!
isStateDirty
(
context
,
STATE_PIXELSHADER
))
{
device
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
device
,
usePixelShaderFunction
,
useVertexShaderFunction
);
device
->
shader_backend
->
shader_select
(
context
,
usePixelShaderFunction
,
useVertexShaderFunction
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
useVertexShaderFunction
||
usePixelShaderFunction
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
...
...
dlls/wined3d/wined3d_private.h
View file @
3bf0ad45
...
...
@@ -821,7 +821,7 @@ struct wined3d_context;
typedef
struct
{
void
(
*
shader_handle_instruction
)(
const
struct
wined3d_shader_instruction
*
);
void
(
*
shader_select
)(
IWineD3DDevice
*
iface
,
BOOL
usePS
,
BOOL
useVS
);
void
(
*
shader_select
)(
const
struct
wined3d_context
*
context
,
BOOL
usePS
,
BOOL
useVS
);
void
(
*
shader_select_depth_blt
)(
IWineD3DDevice
*
iface
,
enum
tex_types
tex_type
);
void
(
*
shader_deselect_depth_blt
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_update_float_vertex_constants
)(
IWineD3DDevice
*
iface
,
UINT
start
,
UINT
count
);
...
...
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