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
11bda6e0
Commit
11bda6e0
authored
May 25, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
May 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set the ati_fragment_shader.c GLINFO_LOCATION to *gl_info.
parent
66e4ba9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+8
-9
No files found.
dlls/wined3d/ati_fragment_shader.c
View file @
11bda6e0
...
...
@@ -28,6 +28,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_shader
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3d
);
#define GLINFO_LOCATION (*gl_info)
/* GL locking for state handlers is done by the caller. */
/* Some private defines, Constant associations, etc.
...
...
@@ -190,7 +192,6 @@ static const char *debug_mask(GLuint mask) {
default:
return
"Unexpected writemask"
;
}
}
#define GLINFO_LOCATION (*gl_info)
static
void
wrap_op1
(
const
struct
wined3d_gl_info
*
gl_info
,
GLuint
op
,
GLuint
dst
,
GLuint
dstMask
,
GLuint
dstMod
,
GLuint
arg1
,
GLuint
arg1Rep
,
GLuint
arg1Mod
)
...
...
@@ -796,11 +797,10 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES], con
checkGLcall
(
"GL_EXTCALL(glEndFragmentShaderATI())"
);
return
ret
;
}
#undef GLINFO_LOCATION
#define GLINFO_LOCATION stateblock->device->adapter->gl_info
static
void
set_tex_op_atifs
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
IWineD3DDeviceImpl
*
This
=
stateblock
->
device
;
const
struct
atifs_ffp_desc
*
desc
;
struct
ffp_frag_settings
settings
;
...
...
@@ -818,14 +818,14 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st
return
;
}
new_desc
->
num_textures_used
=
0
;
for
(
i
=
0
;
i
<
context
->
gl_info
->
limits
.
texture_stages
;
++
i
)
for
(
i
=
0
;
i
<
gl_info
->
limits
.
texture_stages
;
++
i
)
{
if
(
settings
.
op
[
i
].
cop
==
WINED3DTOP_DISABLE
)
break
;
new_desc
->
num_textures_used
=
i
;
}
memcpy
(
&
new_desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
));
new_desc
->
shader
=
gen_ati_shader
(
settings
.
op
,
context
->
gl_info
);
new_desc
->
shader
=
gen_ati_shader
(
settings
.
op
,
gl_info
);
add_ffp_frag_shader
(
&
priv
->
fragment_shaders
,
&
new_desc
->
parent
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
new_desc
);
desc
=
new_desc
;
...
...
@@ -849,6 +849,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st
static
void
state_texfactor_atifs
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
float
col
[
4
];
D3DCOLORTOGLFLOAT4
(
stateblock
->
renderState
[
WINED3DRS_TEXTUREFACTOR
],
col
);
...
...
@@ -859,6 +860,7 @@ static void state_texfactor_atifs(DWORD state, IWineD3DStateBlockImpl *statebloc
static
void
set_bumpmat
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
DWORD
stage
=
(
state
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
float
mat
[
2
][
2
];
mat
[
0
][
0
]
=
*
((
float
*
)
&
stateblock
->
textureState
[
stage
][
WINED3DTSS_BUMPENVMAT00
]);
...
...
@@ -912,8 +914,6 @@ static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *statebl
}
}
#undef GLINFO_LOCATION
static
const
struct
StateEntryTemplate
atifs_fragmentstate_template
[]
=
{
{
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
{
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
state_texfactor_atifs
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
state_fogcolor
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -1126,11 +1126,11 @@ static HRESULT atifs_alloc(IWineD3DDevice *iface) {
return
WINED3D_OK
;
}
#define GLINFO_LOCATION This->adapter->gl_info
/* Context activation is done by the caller. */
static
void
atifs_free_ffpshader
(
struct
wine_rb_entry
*
entry
,
void
*
context
)
{
IWineD3DDeviceImpl
*
This
=
context
;
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
adapter
->
gl_info
;
struct
atifs_ffp_desc
*
entry_ati
=
WINE_RB_ENTRY_VALUE
(
entry
,
struct
atifs_ffp_desc
,
parent
.
entry
);
ENTER_GL
();
...
...
@@ -1150,7 +1150,6 @@ static void atifs_free(IWineD3DDevice *iface) {
HeapFree
(
GetProcessHeap
(),
0
,
priv
);
This
->
fragment_priv
=
NULL
;
}
#undef GLINFO_LOCATION
static
BOOL
atifs_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