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
362bc0d6
Commit
362bc0d6
authored
Mar 09, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't compare const_num against -1.
parent
4ff5736e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+11
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
362bc0d6
...
...
@@ -212,7 +212,8 @@ static void shader_arb_load_constants(
GL_EXTCALL
(
glProgramEnvParameter4fvARB
(
GL_FRAGMENT_PROGRAM_ARB
,
psi
->
bumpenvmatconst
[
i
].
const_num
,
data
));
deviceImpl
->
activeContext
->
pshader_const_dirty
[
psi
->
bumpenvmatconst
[
i
].
const_num
]
=
1
;
if
(
psi
->
luminanceconst
[
i
].
const_num
!=
-
1
)
{
if
(
psi
->
luminanceconst
[
i
].
const_num
!=
WINED3D_CONST_NUM_UNUSED
)
{
/* WINED3DTSS_BUMPENVLSCALE and WINED3DTSS_BUMPENVLOFFSET are next to each other.
* point gl to the scale, and load 4 floats. x = scale, y = offset, z and w are junk, we
* don't care about them. The pointers are valid for sure because the stateblock is bigger.
...
...
@@ -777,7 +778,9 @@ static void pshader_hw_bem(const SHADER_OPCODE_ARG *arg)
int
i
;
for
(
i
=
0
;
i
<
This
->
numbumpenvmatconsts
;
i
++
)
{
if
(
This
->
bumpenvmatconst
[
i
].
const_num
!=
-
1
&&
This
->
bumpenvmatconst
[
i
].
texunit
==
sampler_code
)
{
if
(
This
->
bumpenvmatconst
[
i
].
const_num
!=
WINED3D_CONST_NUM_UNUSED
&&
This
->
bumpenvmatconst
[
i
].
texunit
==
sampler_code
)
{
has_bumpmat
=
TRUE
;
break
;
}
...
...
@@ -1232,13 +1235,17 @@ static void pshader_hw_texbem(const SHADER_OPCODE_ARG *arg)
pshader_get_register_name
(
arg
->
shader
,
dst
,
reg_coord
);
for
(
i
=
0
;
i
<
This
->
numbumpenvmatconsts
;
i
++
)
{
if
(
This
->
bumpenvmatconst
[
i
].
const_num
!=
-
1
&&
reg_dest_code
==
This
->
bumpenvmatconst
[
i
].
texunit
)
{
if
(
This
->
bumpenvmatconst
[
i
].
const_num
!=
WINED3D_CONST_NUM_UNUSED
&&
reg_dest_code
==
This
->
bumpenvmatconst
[
i
].
texunit
)
{
has_bumpmat
=
TRUE
;
break
;
}
}
for
(
i
=
0
;
i
<
This
->
numbumpenvmatconsts
;
i
++
)
{
if
(
This
->
luminanceconst
[
i
].
const_num
!=
-
1
&&
reg_dest_code
==
This
->
luminanceconst
[
i
].
texunit
)
{
if
(
This
->
luminanceconst
[
i
].
const_num
!=
WINED3D_CONST_NUM_UNUSED
&&
reg_dest_code
==
This
->
luminanceconst
[
i
].
texunit
)
{
has_luminance
=
TRUE
;
break
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
362bc0d6
...
...
@@ -435,6 +435,8 @@ enum vertexprocessing_mode {
pretransformed
};
#define WINED3D_CONST_NUM_UNUSED ~0U
struct
stb_const_desc
{
char
texunit
;
UINT
const_num
;
...
...
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