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
4e27a7d8
Commit
4e27a7d8
authored
Jun 07, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: For ps_2_0 and higher, call shader_get_registers_used() in…
wined3d: For ps_2_0 and higher, call shader_get_registers_used() in IWineD3DPixelShaderImpl_SetFunction.
parent
7a9bb1db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
pixelshader.c
dlls/wined3d/pixelshader.c
+23
-8
No files found.
dlls/wined3d/pixelshader.c
View file @
4e27a7d8
...
...
@@ -501,6 +501,18 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
list_init
(
&
This
->
baseShader
.
constantsB
);
list_init
(
&
This
->
baseShader
.
constantsI
);
if
(
WINED3DSHADER_VERSION_MAJOR
(
This
->
baseShader
.
hex_version
)
>
1
)
{
shader_reg_maps
*
reg_maps
=
&
This
->
baseShader
.
reg_maps
;
HRESULT
hr
;
/* Second pass: figure out which registers are used, what the semantics are, etc.. */
memset
(
reg_maps
,
0
,
sizeof
(
shader_reg_maps
));
hr
=
shader_get_registers_used
((
IWineD3DBaseShader
*
)
This
,
reg_maps
,
This
->
semantics_in
,
NULL
,
pFunction
,
NULL
);
if
(
FAILED
(
hr
))
return
hr
;
/* FIXME: validate reg_maps against OpenGL */
}
This
->
baseShader
.
shader_mode
=
deviceImpl
->
ps_selected_mode
;
TRACE
(
"(%p) : Copying the function
\n
"
,
This
);
...
...
@@ -523,8 +535,6 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_CompileShader(IWineD3DPixelShader
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
IWineD3DDeviceImpl
*
deviceImpl
=
(
IWineD3DDeviceImpl
*
)
This
->
baseShader
.
device
;
CONST
DWORD
*
function
=
This
->
baseShader
.
function
;
shader_reg_maps
*
reg_maps
=
&
This
->
baseShader
.
reg_maps
;
HRESULT
hr
;
TRACE
(
"(%p) : function %p
\n
"
,
iface
,
function
);
...
...
@@ -537,12 +547,17 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_CompileShader(IWineD3DPixelShader
return
WINED3D_OK
;
}
/* Second pass: figure out which registers are used, what the semantics are, etc.. */
memset
(
reg_maps
,
0
,
sizeof
(
shader_reg_maps
));
hr
=
shader_get_registers_used
((
IWineD3DBaseShader
*
)
This
,
reg_maps
,
This
->
semantics_in
,
NULL
,
This
->
baseShader
.
function
,
deviceImpl
->
stateBlock
);
if
(
hr
!=
WINED3D_OK
)
return
hr
;
/* FIXME: validate reg_maps against OpenGL */
if
(
WINED3DSHADER_VERSION_MAJOR
(
This
->
baseShader
.
hex_version
)
==
1
)
{
shader_reg_maps
*
reg_maps
=
&
This
->
baseShader
.
reg_maps
;
HRESULT
hr
;
/* Second pass: figure out which registers are used, what the semantics are, etc.. */
memset
(
reg_maps
,
0
,
sizeof
(
shader_reg_maps
));
hr
=
shader_get_registers_used
((
IWineD3DBaseShader
*
)
This
,
reg_maps
,
This
->
semantics_in
,
NULL
,
This
->
baseShader
.
function
,
deviceImpl
->
stateBlock
);
if
(
FAILED
(
hr
))
return
hr
;
/* FIXME: validate reg_maps against OpenGL */
}
/* Generate the HW shader */
TRACE
(
"(%p) : Generating hardware program
\n
"
,
This
);
...
...
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