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
592361be
Commit
592361be
authored
Jun 30, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the shader type to shader_record_register_usage().
parent
5b6877ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
baseshader.c
dlls/wined3d/baseshader.c
+13
-10
No files found.
dlls/wined3d/baseshader.c
View file @
592361be
...
...
@@ -241,12 +241,12 @@ static inline void set_bitmap_bit(DWORD *bitmap, DWORD bit)
}
static
void
shader_record_register_usage
(
IWineD3DBaseShaderImpl
*
This
,
struct
shader_reg_maps
*
reg_maps
,
const
struct
wined3d_shader_register
*
reg
,
BOOL
pshader
)
const
struct
wined3d_shader_register
*
reg
,
enum
wined3d_shader_type
shader_type
)
{
switch
(
reg
->
type
)
{
case
WINED3DSPR_TEXTURE
:
/* WINED3DSPR_ADDR */
if
(
pshader
)
reg_maps
->
texcoord
[
reg
->
idx
]
=
1
;
if
(
shader_type
==
WINED3D_SHADER_TYPE_PIXEL
)
reg_maps
->
texcoord
[
reg
->
idx
]
=
1
;
else
reg_maps
->
address
[
reg
->
idx
]
=
1
;
break
;
...
...
@@ -255,8 +255,7 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct sh
break
;
case
WINED3DSPR_INPUT
:
if
(
!
pshader
)
reg_maps
->
input_registers
|=
1
<<
reg
->
idx
;
else
if
(
shader_type
==
WINED3D_SHADER_TYPE_PIXEL
)
{
if
(
reg
->
rel_addr
)
{
...
...
@@ -274,6 +273,7 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct sh
((
IWineD3DPixelShaderImpl
*
)
This
)
->
input_reg_used
[
reg
->
idx
]
=
TRUE
;
}
}
else
reg_maps
->
input_registers
|=
1
<<
reg
->
idx
;
break
;
case
WINED3DSPR_RASTOUT
:
...
...
@@ -281,14 +281,17 @@ static void shader_record_register_usage(IWineD3DBaseShaderImpl *This, struct sh
break
;
case
WINED3DSPR_MISCTYPE
:
if
(
pshader
&&
reg
->
idx
==
0
)
reg_maps
->
vpos
=
1
;
if
(
pshader
&&
reg
->
idx
==
1
)
reg_maps
->
usesfacing
=
1
;
if
(
shader_type
==
WINED3D_SHADER_TYPE_PIXEL
)
{
if
(
reg
->
idx
==
0
)
reg_maps
->
vpos
=
1
;
else
if
(
reg
->
idx
==
1
)
reg_maps
->
usesfacing
=
1
;
}
break
;
case
WINED3DSPR_CONST
:
if
(
reg
->
rel_addr
)
{
if
(
!
pshader
)
if
(
shader_type
!=
WINED3D_SHADER_TYPE_PIXEL
)
{
if
(
reg
->
idx
<=
((
IWineD3DVertexShaderImpl
*
)
This
)
->
min_rel_offset
)
((
IWineD3DVertexShaderImpl
*
)
This
)
->
min_rel_offset
=
reg
->
idx
;
...
...
@@ -619,7 +622,7 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
IWineD3DPixelShaderImpl
*
ps
=
(
IWineD3DPixelShaderImpl
*
)
This
;
ps
->
color0_mov
=
FALSE
;
}
shader_record_register_usage
(
This
,
reg_maps
,
&
dst_param
.
reg
,
pshader
);
shader_record_register_usage
(
This
,
reg_maps
,
&
dst_param
.
reg
,
shader_version
.
type
);
}
/* Declare 1.X samplers implicitly, based on the destination reg. number */
...
...
@@ -718,11 +721,11 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
fe
->
shader_read_src_param
(
fe_data
,
&
pToken
,
&
src_param
,
&
src_rel_addr
);
count
=
get_instr_extra_regcount
(
ins
.
handler_idx
,
i
);
shader_record_register_usage
(
This
,
reg_maps
,
&
src_param
.
reg
,
pshader
);
shader_record_register_usage
(
This
,
reg_maps
,
&
src_param
.
reg
,
shader_version
.
type
);
while
(
count
)
{
++
src_param
.
reg
.
idx
;
shader_record_register_usage
(
This
,
reg_maps
,
&
src_param
.
reg
,
pshader
);
shader_record_register_usage
(
This
,
reg_maps
,
&
src_param
.
reg
,
shader_version
.
type
);
--
count
;
}
...
...
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