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
50853e29
Commit
50853e29
authored
Aug 11, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the "texcoord" shader_reg_maps member a bitmap.
parent
a282380f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
16 deletions
+15
-16
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+7
-5
baseshader.c
dlls/wined3d/baseshader.c
+1
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+6
-9
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/arb_program_shader.c
View file @
50853e29
...
...
@@ -615,6 +615,7 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s
char
pshader
=
shader_is_pshader_version
(
reg_maps
->
shader_version
.
type
);
unsigned
max_constantsF
;
const
local_constant
*
lconst
;
DWORD
map
;
/* In pixel shaders, all private constants are program local, we don't need anything
* from program.env. Thus we can advertise the full set of constants in pixel shaders.
...
...
@@ -668,10 +669,11 @@ static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const s
shader_addline
(
buffer
,
"ADDRESS A%d;
\n
"
,
i
);
}
if
(
pshader
&&
reg_maps
->
shader_version
.
major
==
1
&&
reg_maps
->
shader_version
.
minor
<=
3
)
{
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
texcoord
;
i
++
)
{
if
(
reg_maps
->
texcoord
[
i
]
&&
pshader
)
shader_addline
(
buffer
,
"TEMP T%u;
\n
"
,
i
);
if
(
pshader
&&
reg_maps
->
shader_version
.
major
==
1
&&
reg_maps
->
shader_version
.
minor
<=
3
)
{
for
(
i
=
0
,
map
=
reg_maps
->
texcoord
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"TEMP T%u;
\n
"
,
i
);
}
}
...
...
@@ -3923,7 +3925,7 @@ static void find_clip_texcoord(IWineD3DPixelShaderImpl *ps)
{
for
(
i
=
GL_LIMITS
(
texture_stages
);
i
>
0
;
i
--
)
{
if
(
!
ps
->
baseShader
.
reg_maps
.
texcoord
[
i
-
1
]
)
if
(
!
(
ps
->
baseShader
.
reg_maps
.
texcoord
&
(
1
<<
(
i
-
1
)))
)
{
shader_priv
->
clipplane_emulation
=
i
;
return
;
...
...
dlls/wined3d/baseshader.c
View file @
50853e29
...
...
@@ -257,7 +257,7 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct sh
switch
(
reg
->
type
)
{
case
WINED3DSPR_TEXTURE
:
/* WINED3DSPR_ADDR */
if
(
shader_type
==
WINED3D_SHADER_TYPE_PIXEL
)
reg_maps
->
texcoord
[
reg
->
idx
]
=
1
;
if
(
shader_type
==
WINED3D_SHADER_TYPE_PIXEL
)
reg_maps
->
texcoord
|=
1
<<
reg
->
idx
;
else
reg_maps
->
address
[
reg
->
idx
]
=
1
;
break
;
...
...
dlls/wined3d/glsl_shader.c
View file @
50853e29
...
...
@@ -814,6 +814,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
unsigned
int
i
,
extra_constants_needed
=
0
;
const
local_constant
*
lconst
;
DWORD
map
;
/* There are some minor differences between pixel and vertex shaders */
char
pshader
=
shader_is_pshader_version
(
reg_maps
->
shader_version
.
type
);
...
...
@@ -1009,9 +1010,9 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
}
/* Declare texture coordinate temporaries and initialize them */
for
(
i
=
0
;
i
<
This
->
baseShader
.
limits
.
texcoord
;
i
++
)
{
if
(
reg_maps
->
texcoord
[
i
])
shader_addline
(
buffer
,
"vec4 T%u = gl_TexCoord[%u];
\n
"
,
i
,
i
);
for
(
i
=
0
,
map
=
reg_maps
->
texcoord
;
map
;
map
>>=
1
,
++
i
)
{
if
(
map
&
1
)
shader_addline
(
buffer
,
"vec4 T%u = gl_TexCoord[%u];
\n
"
,
i
,
i
);
}
/* Declare input register varyings. Only pixel shader, vertex shaders have that declared in the
...
...
@@ -1045,13 +1046,9 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
/* Declare attributes */
if
(
reg_maps
->
shader_version
.
type
==
WINED3D_SHADER_TYPE_VERTEX
)
{
WORD
map
=
reg_maps
->
input_registers
;
for
(
i
=
0
;
map
;
map
>>=
1
,
++
i
)
for
(
i
=
0
,
map
=
reg_maps
->
input_registers
;
map
;
map
>>=
1
,
++
i
)
{
if
(
!
(
map
&
1
))
continue
;
shader_addline
(
buffer
,
"attribute vec4 attrib%i;
\n
"
,
i
);
if
(
map
&
1
)
shader_addline
(
buffer
,
"attribute vec4 attrib%i;
\n
"
,
i
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
50853e29
...
...
@@ -628,7 +628,7 @@ struct wined3d_shader_version
typedef
struct
shader_reg_maps
{
struct
wined3d_shader_version
shader_version
;
char
texcoord
[
MAX_REG_TEXCRD
];
/* pixel < 3.0
*/
BYTE
texcoord
;
/* MAX_REG_TEXCRD, 8
*/
char
temporary
[
MAX_REG_TEMP
];
/* pixel, vertex */
char
address
[
MAX_REG_ADDR
];
/* vertex */
char
labels
[
MAX_LABELS
];
/* pixel, vertex */
...
...
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