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
53ce2a24
Commit
53ce2a24
authored
Aug 16, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
Aug 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Fix ID3DXConstantTable::SetVector.
parent
5fd7d982
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
24 deletions
+4
-24
shader.c
dlls/d3dx9_36/shader.c
+2
-23
shader.c
dlls/d3dx9_36/tests/shader.c
+2
-1
No files found.
dlls/d3dx9_36/shader.c
View file @
53ce2a24
...
...
@@ -1158,38 +1158,17 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetVector(ID3DXConstantTable *iface
TRACE
(
"(%p)->(%p, %p, %p)
\n
"
,
This
,
device
,
constant
,
vector
);
return
ID3DXConstantTable_SetVectorArray
(
iface
,
device
,
constant
,
vector
,
1
);
return
set_vector_array
(
iface
,
device
,
constant
,
vector
,
1
,
D3DXPT_FLOAT
);
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetVectorArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
D3DXHANDLE
constant
,
CONST
D3DXVECTOR4
*
vector
,
UINT
count
)
{
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
D3DXCONSTANT_DESC
desc
;
HRESULT
hr
;
UINT
desc_count
=
1
;
TRACE
(
"(%p)->(%p, %p, %p, %d)
\n
"
,
This
,
device
,
constant
,
vector
,
count
);
hr
=
ID3DXConstantTable_GetConstantDesc
(
iface
,
constant
,
&
desc
,
&
desc_count
);
if
(
FAILED
(
hr
))
{
TRACE
(
"ID3DXConstantTable_GetConstantDesc failed: %08x
\n
"
,
hr
);
return
D3DERR_INVALIDCALL
;
}
switch
(
desc
.
RegisterSet
)
{
case
D3DXRS_FLOAT4
:
set_float_shader_constant
(
This
,
device
,
desc
.
RegisterIndex
,
(
float
*
)
vector
,
min
(
desc
.
RegisterCount
,
count
));
break
;
default:
FIXME
(
"Handle other register sets
\n
"
);
return
E_NOTIMPL
;
}
return
D3D_OK
;
return
set_vector_array
(
iface
,
device
,
constant
,
vector
,
count
,
D3DXPT_FLOAT
);
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetMatrix
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
...
dlls/d3dx9_36/tests/shader.c
View file @
53ce2a24
...
...
@@ -632,7 +632,8 @@ static void test_setting_basic_table(IDirect3DDevice9 *device)
ok
(
res
==
D3D_OK
,
"ID3DXConstantTable_SetVector failed on variable f: 0x%08x
\n
"
,
res
);
IDirect3DDevice9_GetVertexShaderConstantF
(
device
,
6
,
out
,
1
);
ok
(
out
[
0
]
==
f4
.
x
,
"The variable f was not set correctly by ID3DXConstantTable_SetVector, got %f, should be %f
\n
"
,
ok
(
out
[
0
]
==
f4
.
x
&&
out
[
1
]
==
0
.
0
f
&&
out
[
2
]
==
0
.
0
f
&&
out
[
3
]
==
0
.
0
f
,
"The variable f was not set correctly by ID3DXConstantTable_SetVector, got %f, should be %f
\n
"
,
out
[
0
],
f4
.
x
);
refcnt
=
ID3DXConstantTable_Release
(
ctable
);
...
...
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