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
9a614fef
Commit
9a614fef
authored
Nov 12, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d/arb: Move FFP bumpenv constant loading to arbfp_apply_draw_state().
parent
088da327
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
102 deletions
+29
-102
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+29
-102
No files found.
dlls/wined3d/arb_program_shader.c
View file @
9a614fef
...
...
@@ -5883,67 +5883,41 @@ static void arbfp_update_ps_constants(struct wined3d_context_gl *context_gl,
}
}
static
void
set_bumpmat_arbfp
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
static
void
arbfp_update_bumpenv_constants
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
,
struct
shader_arb_priv
*
priv
)
{
DWORD
stage
=
(
state_id
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
gl_info
;
struct
wined3d_device
*
device
=
context
->
device
;
float
mat
[
2
][
2
];
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_PS_BUMP_ENV
;
if
(
device
->
shader_backend
==
&
arb_program_shader_backend
)
if
(
context_gl
->
c
.
device
->
shader_backend
==
&
arb_program_shader_backend
)
{
struct
shader_arb_priv
*
priv
=
device
->
shader_priv
;
/* Exit now, don't set the bumpmat below, otherwise we may overwrite pixel shader constants. */
if
(
use_ps
(
state
))
return
;
priv
->
pshader_const_dirty
[
ARB_FFP_CONST_BUMPMAT
(
stage
)]
=
1
;
priv
->
highest_dirty_ps_const
=
max
(
priv
->
highest_dirty_ps_const
,
ARB_FFP_CONST_BUMPMAT
(
stage
)
+
1
);
for
(
unsigned
int
i
=
0
;
i
<
WINED3D_MAX_FFP_TEXTURES
;
++
i
)
{
priv
->
pshader_const_dirty
[
ARB_FFP_CONST_BUMPMAT
(
i
)]
=
1
;
priv
->
pshader_const_dirty
[
ARB_FFP_CONST_LUMINANCE
(
i
)]
=
1
;
}
priv
->
highest_dirty_ps_const
=
max
(
priv
->
highest_dirty_ps_const
,
ARB_FFP_CONST_LUMINANCE
(
WINED3D_MAX_FFP_TEXTURES
));
}
mat
[
0
][
0
]
=
*
((
float
*
)
&
state
->
texture_states
[
stage
][
WINED3D_TSS_BUMPENV_MAT00
]);
mat
[
0
][
1
]
=
*
((
float
*
)
&
state
->
texture_states
[
stage
][
WINED3D_TSS_BUMPENV_MAT01
]);
mat
[
1
][
0
]
=
*
((
float
*
)
&
state
->
texture_states
[
stage
][
WINED3D_TSS_BUMPENV_MAT10
]);
mat
[
1
][
1
]
=
*
((
float
*
)
&
state
->
texture_states
[
stage
][
WINED3D_TSS_BUMPENV_MAT11
]);
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
ARB_FFP_CONST_BUMPMAT
(
stage
),
&
mat
[
0
][
0
]));
checkGLcall
(
"glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_BUMPMAT(stage), &mat[0][0])"
);
}
static
void
tex_bumpenvlum_arbfp
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
DWORD
stage
=
(
state_id
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
gl_info
;
struct
wined3d_device
*
device
=
context
->
device
;
float
param
[
4
];
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_PS_BUMP_ENV
;
if
(
device
->
shader_backend
==
&
arb_program_shader_backend
)
for
(
unsigned
int
i
=
0
;
i
<
WINED3D_MAX_FFP_TEXTURES
;
++
i
)
{
struct
shader_arb_priv
*
priv
=
device
->
shader_priv
;
float
mat
[
2
][
2
],
param
[
4
]
;
/* Exit now, don't set the luminance below, otherwise we may overwrite pixel shader constants. */
if
(
use_ps
(
state
))
return
;
mat
[
0
][
0
]
=
int_to_float
(
state
->
texture_states
[
i
][
WINED3D_TSS_BUMPENV_MAT00
]);
mat
[
0
][
1
]
=
int_to_float
(
state
->
texture_states
[
i
][
WINED3D_TSS_BUMPENV_MAT01
]);
mat
[
1
][
0
]
=
int_to_float
(
state
->
texture_states
[
i
][
WINED3D_TSS_BUMPENV_MAT10
]);
mat
[
1
][
1
]
=
int_to_float
(
state
->
texture_states
[
i
][
WINED3D_TSS_BUMPENV_MAT11
]);
priv
->
pshader_const_dirty
[
ARB_FFP_CONST_LUMINANCE
(
stage
)]
=
1
;
priv
->
highest_dirty_ps_const
=
max
(
priv
->
highest_dirty_ps_const
,
ARB_FFP_CONST_LUMINANCE
(
stage
)
+
1
);
}
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
ARB_FFP_CONST_BUMPMAT
(
i
),
&
mat
[
0
][
0
]));
checkGLcall
(
"glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_BUMPMAT)"
);
param
[
0
]
=
*
((
float
*
)
&
state
->
texture_states
[
stage
][
WINED3D_TSS_BUMPENV_LSCALE
]);
param
[
1
]
=
*
((
float
*
)
&
state
->
texture_states
[
stage
][
WINED3D_TSS_BUMPENV_LOFFSET
]);
param
[
2
]
=
0
.
0
f
;
param
[
3
]
=
0
.
0
f
;
param
[
0
]
=
int_to_float
(
state
->
texture_states
[
i
][
WINED3D_TSS_BUMPENV_LSCALE
]);
param
[
1
]
=
int_to_float
(
state
->
texture_states
[
i
][
WINED3D_TSS_BUMPENV_LOFFSET
]);
param
[
2
]
=
0
.
0
f
;
param
[
3
]
=
0
.
0
f
;
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
ARB_FFP_CONST_LUMINANCE
(
stage
),
param
));
checkGLcall
(
"glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_LUMINANCE(stage), param)"
);
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
ARB_FFP_CONST_LUMINANCE
(
i
),
param
));
checkGLcall
(
"glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_LUMINANCE)"
);
}
}
static
void
alpha_test_arbfp
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
...
...
@@ -6569,7 +6543,6 @@ static void arbfp_update_shader(struct wined3d_context *context, const struct wi
struct
shader_arb_priv
*
priv
=
device
->
fragment_priv
;
struct
ffp_frag_settings
settings
;
const
struct
arbfp_ffp_desc
*
desc
;
unsigned
int
i
;
/* Find or create a shader implementing the fixed function pipeline
* settings, then activate it. */
...
...
@@ -6599,9 +6572,8 @@ static void arbfp_update_shader(struct wined3d_context *context, const struct wi
{
/* Reload fixed function constants since they collide with the
* pixel shader constants. */
for
(
i
=
0
;
i
<
WINED3D_MAX_FFP_TEXTURES
;
++
i
)
set_bumpmat_arbfp
(
context
,
state
,
STATE_TEXTURESTAGE
(
i
,
WINED3D_TSS_BUMPENV_MAT00
));
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_PS
|
WINED3D_SHADER_CONST_FFP_COLOR_KEY
;
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_PS
|
WINED3D_SHADER_CONST_FFP_COLOR_KEY
|
WINED3D_SHADER_CONST_PS_BUMP_ENV
;
}
context
->
last_was_pshader
=
FALSE
;
}
...
...
@@ -6671,12 +6643,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6686,12 +6652,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6701,12 +6661,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6716,12 +6670,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6731,12 +6679,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6746,12 +6688,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6761,12 +6697,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_OP
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6776,12 +6706,6 @@ static const struct wined3d_state_entry_template arbfp_fragmentstate_template[]
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_ALPHA_ARG2
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT00
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT00
),
set_bumpmat_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT01
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT10
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_LSCALE
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_LSCALE
),
tex_bumpenvlum_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_LOFFSET
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_LSCALE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
fragment_prog_arbfp
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3D_RS_ALPHAFUNC
),
{
STATE_RENDER
(
WINED3D_RS_ALPHATESTENABLE
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3D_RS_ALPHAREF
),
{
STATE_RENDER
(
WINED3D_RS_ALPHATESTENABLE
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -6856,6 +6780,9 @@ static void arbfp_apply_draw_state(struct wined3d_context *context, const struct
if
(
constant_update_mask
&
WINED3D_SHADER_CONST_FFP_COLOR_KEY
)
arbfp_update_color_key
(
context_gl
,
state
,
priv
);
if
(
constant_update_mask
&
WINED3D_SHADER_CONST_PS_BUMP_ENV
)
arbfp_update_bumpenv_constants
(
context_gl
,
state
,
priv
);
}
const
struct
wined3d_fragment_pipe_ops
arbfp_fragment_pipeline
=
...
...
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