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
f7918b97
Commit
f7918b97
authored
Aug 12, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the "luminanceparams" shader_reg_maps member a bitmap.
parent
95bb4c04
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
+10
-8
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-3
baseshader.c
dlls/wined3d/baseshader.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-1
state.c
dlls/wined3d/state.c
+3
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
f7918b97
...
...
@@ -3384,7 +3384,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
i
,
compiled
->
bumpenvmatconst
[
cur
].
const_num
);
compiled
->
numbumpenvmatconsts
=
cur
+
1
;
if
(
!
reg_maps
->
luminanceparams
[
i
]
)
continue
;
if
(
!
(
reg_maps
->
luminanceparams
&
(
1
<<
i
))
)
continue
;
compiled
->
luminanceconst
[
cur
].
const_num
=
next_local
++
;
shader_addline
(
buffer
,
"PARAM luminance%d = program.local[%d];
\n
"
,
...
...
@@ -5262,8 +5262,9 @@ static void tex_bumpenvlum_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock
if
(
use_ps
(
stateblock
))
{
if
(
stage
!=
0
&&
((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
reg_maps
.
luminanceparams
[
stage
])
{
if
(
stage
!=
0
&&
(((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
reg_maps
.
luminanceparams
&
(
1
<<
stage
)))
{
/* The pixel shader has to know the luminance offset. Do a constants update if it
* isn't scheduled anyway
*/
...
...
dlls/wined3d/baseshader.c
View file @
f7918b97
...
...
@@ -689,7 +689,7 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
reg_maps
->
bumpmat
|=
1
<<
dst_param
.
reg
.
idx
;
if
(
ins
.
handler_idx
==
WINED3DSIH_TEXBEML
)
{
reg_maps
->
luminanceparams
[
sampler_code
]
=
TRUE
;
reg_maps
->
luminanceparams
|=
1
<<
dst_param
.
reg
.
idx
;
}
}
}
...
...
dlls/wined3d/glsl_shader.c
View file @
f7918b97
...
...
@@ -905,7 +905,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
shader_addline
(
buffer
,
"uniform mat2 bumpenvmat%d;
\n
"
,
i
);
if
(
reg_maps
->
luminanceparams
[
i
]
)
if
(
reg_maps
->
luminanceparams
&
(
1
<<
i
)
)
{
shader_addline
(
buffer
,
"uniform float luminancescale%d;
\n
"
,
i
);
shader_addline
(
buffer
,
"uniform float luminanceoffset%d;
\n
"
,
i
);
...
...
dlls/wined3d/state.c
View file @
f7918b97
...
...
@@ -3368,8 +3368,9 @@ static void tex_bumpenvlscale(DWORD state, IWineD3DStateBlockImpl *stateblock, s
{
DWORD
stage
=
(
state
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
if
(
stateblock
->
pixelShader
&&
stage
!=
0
&&
((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
reg_maps
.
luminanceparams
[
stage
])
{
if
(
stateblock
->
pixelShader
&&
stage
!=
0
&&
(((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
reg_maps
.
luminanceparams
&
(
1
<<
stage
)))
{
/* The pixel shader has to know the luminance scale. Do a constants update if it
* isn't scheduled anyway
*/
...
...
dlls/wined3d/wined3d_private.h
View file @
f7918b97
...
...
@@ -643,7 +643,7 @@ typedef struct shader_reg_maps
WINED3DSAMPLER_TEXTURE_TYPE
sampler_type
[
max
(
MAX_FRAGMENT_SAMPLERS
,
MAX_VERTEX_SAMPLERS
)];
BYTE
bumpmat
;
/* MAX_TEXTURES, 8 */
B
OOL
luminanceparams
[
MAX_TEXTURES
];
B
YTE
luminanceparams
;
/* MAX_TEXTURES, 8 */
WORD
usesnrm
:
1
;
WORD
vpos
:
1
;
...
...
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