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
5c79a9f4
Commit
5c79a9f4
authored
Nov 07, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename the fragment ffp desc structures.
This reflects the fact that they describe the fragment pipeline. The vertex pipeline will use its own structures.
parent
cd011661
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
32 deletions
+32
-32
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+7
-7
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+6
-6
utils.c
dlls/wined3d/utils.c
+11
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+8
-8
No files found.
dlls/wined3d/arb_program_shader.c
View file @
5c79a9f4
...
...
@@ -2372,7 +2372,7 @@ const shader_backend_t arb_program_shader_backend = {
struct
arbfp_ffp_desc
{
struct
ffp_desc
parent
;
struct
ffp_
frag_
desc
parent
;
GLuint
shader
;
unsigned
int
num_textures_used
;
};
...
...
@@ -2401,7 +2401,7 @@ static HRESULT arbfp_alloc(IWineD3DDevice *iface) {
if
(
!
This
->
fragment_priv
)
return
E_OUTOFMEMORY
;
}
priv
=
(
struct
shader_arb_priv
*
)
This
->
fragment_priv
;
priv
->
fragment_shaders
=
hash_table_create
(
ffp_
program_key_hash
,
ffp
_program_key_compare
);
priv
->
fragment_shaders
=
hash_table_create
(
ffp_
frag_program_key_hash
,
ffp_frag
_program_key_compare
);
priv
->
use_arbfp_fixed_func
=
TRUE
;
return
WINED3D_OK
;
}
...
...
@@ -2792,7 +2792,7 @@ static void gen_ffp_instr(SHADER_BUFFER *buffer, unsigned int stage, BOOL color,
}
/* The stateblock is passed for GLINFO_LOCATION */
static
GLuint
gen_arbfp_ffp_shader
(
struct
ffp_settings
*
settings
,
IWineD3DStateBlockImpl
*
stateblock
)
{
static
GLuint
gen_arbfp_ffp_shader
(
struct
ffp_
frag_
settings
*
settings
,
IWineD3DStateBlockImpl
*
stateblock
)
{
unsigned
int
stage
;
SHADER_BUFFER
buffer
;
BOOL
tex_read
[
MAX_TEXTURES
]
=
{
FALSE
,
FALSE
,
FALSE
,
FALSE
,
FALSE
,
FALSE
,
FALSE
,
FALSE
};
...
...
@@ -3060,7 +3060,7 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
struct
shader_arb_priv
*
priv
=
(
struct
shader_arb_priv
*
)
device
->
fragment_priv
;
BOOL
use_pshader
=
use_ps
(
device
);
BOOL
use_vshader
=
use_vs
(
device
);
struct
ffp_settings
settings
;
struct
ffp_
frag_
settings
settings
;
struct
arbfp_ffp_desc
*
desc
;
unsigned
int
i
;
...
...
@@ -3082,8 +3082,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
IWineD3DPixelShader_CompileShader
(
stateblock
->
pixelShader
);
}
else
{
/* Find or create a shader implementing the fixed function pipeline settings, then activate it */
gen_ffp_op
(
stateblock
,
&
settings
,
FALSE
);
desc
=
(
struct
arbfp_ffp_desc
*
)
find_ffp_shader
(
priv
->
fragment_shaders
,
&
settings
);
gen_ffp_
frag_
op
(
stateblock
,
&
settings
,
FALSE
);
desc
=
(
struct
arbfp_ffp_desc
*
)
find_ffp_
frag_
shader
(
priv
->
fragment_shaders
,
&
settings
);
if
(
!
desc
)
{
desc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
desc
));
if
(
!
desc
)
{
...
...
@@ -3098,7 +3098,7 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
memcpy
(
&
desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
));
desc
->
shader
=
gen_arbfp_ffp_shader
(
&
settings
,
stateblock
);
add_ffp_shader
(
priv
->
fragment_shaders
,
&
desc
->
parent
);
add_ffp_
frag_
shader
(
priv
->
fragment_shaders
,
&
desc
->
parent
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
desc
);
}
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
5c79a9f4
...
...
@@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
/* GL_ATI_fragment_shader specific fixed function pipeline description. "Inherits" from the common one */
struct
atifs_ffp_desc
{
struct
ffp_desc
parent
;
struct
ffp_
frag_
desc
parent
;
GLuint
shader
;
unsigned
int
num_textures_used
;
};
...
...
@@ -803,13 +803,13 @@ static GLuint gen_ati_shader(struct texture_stage_op op[MAX_TEXTURES], WineD3D_G
static
void
set_tex_op_atifs
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
IWineD3DDeviceImpl
*
This
=
stateblock
->
wineD3DDevice
;
struct
atifs_ffp_desc
*
desc
;
struct
ffp_
settings
settings
;
struct
ffp_
frag_settings
settings
;
struct
atifs_private_data
*
priv
=
(
struct
atifs_private_data
*
)
This
->
fragment_priv
;
DWORD
mapped_stage
;
unsigned
int
i
;
gen_ffp_op
(
stateblock
,
&
settings
,
TRUE
);
desc
=
(
struct
atifs_ffp_desc
*
)
find_ffp_shader
(
priv
->
fragment_shaders
,
&
settings
);
gen_ffp_
frag_
op
(
stateblock
,
&
settings
,
TRUE
);
desc
=
(
struct
atifs_ffp_desc
*
)
find_ffp_
frag_
shader
(
priv
->
fragment_shaders
,
&
settings
);
if
(
!
desc
)
{
desc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
desc
));
if
(
!
desc
)
{
...
...
@@ -824,7 +824,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi
memcpy
(
&
desc
->
parent
.
settings
,
&
settings
,
sizeof
(
settings
));
desc
->
shader
=
gen_ati_shader
(
settings
.
op
,
&
GLINFO_LOCATION
);
add_ffp_shader
(
priv
->
fragment_shaders
,
&
desc
->
parent
);
add_ffp_
frag_
shader
(
priv
->
fragment_shaders
,
&
desc
->
parent
);
TRACE
(
"Allocated fixed function replacement shader descriptor %p
\n
"
,
desc
);
}
...
...
@@ -1074,7 +1074,7 @@ static HRESULT atifs_alloc(IWineD3DDevice *iface) {
return
E_OUTOFMEMORY
;
}
priv
=
(
struct
atifs_private_data
*
)
This
->
fragment_priv
;
priv
->
fragment_shaders
=
hash_table_create
(
ffp_
program_key_hash
,
ffp
_program_key_compare
);
priv
->
fragment_shaders
=
hash_table_create
(
ffp_
frag_program_key_hash
,
ffp_frag
_program_key_compare
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/utils.c
View file @
5c79a9f4
...
...
@@ -1793,7 +1793,7 @@ void *hash_table_get(struct hash_table_t *table, void *key)
}
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
void
gen_ffp_
op
(
IWineD3DStateBlockImpl
*
stateblock
,
struct
ffp
_settings
*
settings
,
BOOL
ignore_textype
)
{
void
gen_ffp_
frag_op
(
IWineD3DStateBlockImpl
*
stateblock
,
struct
ffp_frag
_settings
*
settings
,
BOOL
ignore_textype
)
{
#define ARG1 0x01
#define ARG2 0x02
#define ARG0 0x04
...
...
@@ -2013,13 +2013,13 @@ void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *setting
}
#undef GLINFO_LOCATION
struct
ffp_
desc
*
find_ffp_shader
(
struct
hash_table_t
*
fragment_shaders
,
struct
ffp
_settings
*
settings
)
struct
ffp_
frag_desc
*
find_ffp_frag_shader
(
struct
hash_table_t
*
fragment_shaders
,
struct
ffp_frag
_settings
*
settings
)
{
return
(
struct
ffp_desc
*
)
hash_table_get
(
fragment_shaders
,
settings
);}
return
(
struct
ffp_
frag_
desc
*
)
hash_table_get
(
fragment_shaders
,
settings
);}
void
add_ffp_
shader
(
struct
hash_table_t
*
shaders
,
struct
ffp
_desc
*
desc
)
{
struct
ffp_settings
*
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
key
));
/* Note that the key is the implementation independent part of the ffp_desc structure,
void
add_ffp_
frag_shader
(
struct
hash_table_t
*
shaders
,
struct
ffp_frag
_desc
*
desc
)
{
struct
ffp_
frag_
settings
*
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
key
));
/* Note that the key is the implementation independent part of the ffp_
frag_
desc structure,
* whereas desc points to an extended structure with implementation specific parts.
* Make a copy of the key because hash_table_put takes ownership of it
*/
...
...
@@ -2121,8 +2121,8 @@ void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
}
#undef GLINFO_LOCATION
unsigned
int
ffp_program_key_hash
(
void
*
key
)
{
struct
ffp_
settings
*
k
=
(
struct
ffp
_settings
*
)
key
;
unsigned
int
ffp_
frag_
program_key_hash
(
void
*
key
)
{
struct
ffp_
frag_settings
*
k
=
(
struct
ffp_frag
_settings
*
)
key
;
unsigned
int
hash
=
0
,
i
;
DWORD
*
blob
;
...
...
@@ -2147,9 +2147,9 @@ unsigned int ffp_program_key_hash(void *key) {
return
hash
;
}
BOOL
ffp_program_key_compare
(
void
*
keya
,
void
*
keyb
)
{
struct
ffp_
settings
*
ka
=
(
struct
ffp
_settings
*
)
keya
;
struct
ffp_
settings
*
kb
=
(
struct
ffp
_settings
*
)
keyb
;
BOOL
ffp_
frag_
program_key_compare
(
void
*
keya
,
void
*
keyb
)
{
struct
ffp_
frag_settings
*
ka
=
(
struct
ffp_frag
_settings
*
)
keya
;
struct
ffp_
frag_settings
*
kb
=
(
struct
ffp_frag
_settings
*
)
keyb
;
return
memcmp
(
ka
,
kb
,
sizeof
(
*
ka
))
==
0
;
}
dlls/wined3d/wined3d_private.h
View file @
5c79a9f4
...
...
@@ -853,7 +853,7 @@ struct texture_stage_op
WINED3DFORMAT
color_correction
;
};
struct
ffp_settings
{
struct
ffp_
frag_
settings
{
struct
texture_stage_op
op
[
MAX_TEXTURES
];
enum
{
FOG_OFF
,
...
...
@@ -865,16 +865,16 @@ struct ffp_settings {
unsigned
int
sRGB_write
;
};
struct
ffp_desc
struct
ffp_
frag_
desc
{
struct
ffp_
settings
settings
;
struct
ffp_
frag_settings
settings
;
};
void
gen_ffp_
op
(
IWineD3DStateBlockImpl
*
stateblock
,
struct
ffp
_settings
*
settings
,
BOOL
ignore_textype
);
struct
ffp_
desc
*
find_ffp_shader
(
struct
hash_table_t
*
fragment_shaders
,
struct
ffp
_settings
*
settings
);
void
add_ffp_
shader
(
struct
hash_table_t
*
shaders
,
struct
ffp
_desc
*
desc
);
BOOL
ffp_program_key_compare
(
void
*
keya
,
void
*
keyb
);
unsigned
int
ffp_program_key_hash
(
void
*
key
);
void
gen_ffp_
frag_op
(
IWineD3DStateBlockImpl
*
stateblock
,
struct
ffp_frag
_settings
*
settings
,
BOOL
ignore_textype
);
struct
ffp_
frag_desc
*
find_ffp_frag_shader
(
struct
hash_table_t
*
fragment_shaders
,
struct
ffp_frag
_settings
*
settings
);
void
add_ffp_
frag_shader
(
struct
hash_table_t
*
shaders
,
struct
ffp_frag
_desc
*
desc
);
BOOL
ffp_
frag_
program_key_compare
(
void
*
keya
,
void
*
keyb
);
unsigned
int
ffp_
frag_
program_key_hash
(
void
*
key
);
/*****************************************************************************
* IWineD3D implementation structure
...
...
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