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
d2bbbc71
Commit
d2bbbc71
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: Implement ID3DXConstantTable::SetBool.
parent
98fe3f1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
shader.c
dlls/d3dx9_36/shader.c
+12
-9
No files found.
dlls/d3dx9_36/shader.c
View file @
d2bbbc71
...
@@ -857,7 +857,7 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantElement(ID3DXConstant
...
@@ -857,7 +857,7 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantElement(ID3DXConstant
return
NULL
;
return
NULL
;
}
}
static
HRESULT
set_
float_array
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
D3DXHANDLE
constant
,
const
void
*
data
,
static
HRESULT
set_
scalar_array
(
ID3DXConstantTable
*
iface
,
IDirect3DDevice9
*
device
,
D3DXHANDLE
constant
,
const
void
*
data
,
UINT
count
,
D3DXPARAMETER_TYPE
type
)
UINT
count
,
D3DXPARAMETER_TYPE
type
)
{
{
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
...
@@ -876,7 +876,7 @@ static HRESULT set_float_array(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 devi
...
@@ -876,7 +876,7 @@ static HRESULT set_float_array(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 devi
switch
(
desc
.
RegisterSet
)
switch
(
desc
.
RegisterSet
)
{
{
case
D3DXRS_FLOAT4
:
case
D3DXRS_FLOAT4
:
for
(
i
=
0
;
i
<
count
&&
i
<
desc
.
RegisterCount
;
i
++
)
for
(
i
=
0
;
i
<
min
(
count
,
desc
.
RegisterCount
)
;
i
++
)
{
{
/* We need the for loop since each IDirect3DDevice9_Set*ShaderConstantF expects a float4 */
/* We need the for loop since each IDirect3DDevice9_Set*ShaderConstantF expects a float4 */
switch
(
type
)
switch
(
type
)
...
@@ -887,8 +887,11 @@ static HRESULT set_float_array(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 devi
...
@@ -887,8 +887,11 @@ static HRESULT set_float_array(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 devi
case
D3DXPT_INT
:
case
D3DXPT_INT
:
row
[
0
]
=
(
float
)((
int
*
)
data
)[
i
];
row
[
0
]
=
(
float
)((
int
*
)
data
)[
i
];
break
;
break
;
case
D3DXPT_BOOL
:
row
[
0
]
=
((
BOOL
*
)
data
)[
i
]
?
1
.
0
f
:
0
.
0
f
;
break
;
default:
default:
FIXME
(
"Unhandled type
passed to set_float_array
\n
"
);
FIXME
(
"Unhandled type
%#x
\n
"
,
type
);
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
}
}
set_float_shader_constant
(
This
,
device
,
desc
.
RegisterIndex
+
i
,
row
,
1
);
set_float_shader_constant
(
This
,
device
,
desc
.
RegisterIndex
+
i
,
row
,
1
);
...
@@ -940,9 +943,9 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetBool(ID3DXConstantTable *iface,
...
@@ -940,9 +943,9 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetBool(ID3DXConstantTable *iface,
{
{
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
FIXME
(
"(%p)->(%p, %p, %d): stub
\n
"
,
This
,
device
,
constant
,
b
);
TRACE
(
"(%p)->(%p, %p, %d)
\n
"
,
This
,
device
,
constant
,
b
);
return
E_NOTIMPL
;
return
set_scalar_array
(
iface
,
device
,
constant
,
&
b
,
1
,
D3DXPT_BOOL
)
;
}
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetBoolArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetBoolArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
@@ -961,7 +964,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetInt(ID3DXConstantTable *iface, L
...
@@ -961,7 +964,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetInt(ID3DXConstantTable *iface, L
TRACE
(
"(%p)->(%p, %p, %d)
\n
"
,
This
,
device
,
constant
,
n
);
TRACE
(
"(%p)->(%p, %p, %d)
\n
"
,
This
,
device
,
constant
,
n
);
return
ID3DXConstantTable_SetIntArray
(
iface
,
device
,
constant
,
&
n
,
1
);
return
set_scalar_array
(
iface
,
device
,
constant
,
&
n
,
1
,
D3DXPT_INT
);
}
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetIntArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetIntArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
@@ -971,7 +974,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetIntArray(ID3DXConstantTable *ifa
...
@@ -971,7 +974,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetIntArray(ID3DXConstantTable *ifa
TRACE
(
"(%p)->(%p, %p, %p, %d)
\n
"
,
This
,
device
,
constant
,
n
,
count
);
TRACE
(
"(%p)->(%p, %p, %p, %d)
\n
"
,
This
,
device
,
constant
,
n
,
count
);
return
set_
float
_array
(
iface
,
device
,
constant
,
n
,
count
,
D3DXPT_INT
);
return
set_
scalar
_array
(
iface
,
device
,
constant
,
n
,
count
,
D3DXPT_INT
);
}
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetFloat
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetFloat
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
@@ -981,7 +984,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetFloat(ID3DXConstantTable *iface,
...
@@ -981,7 +984,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetFloat(ID3DXConstantTable *iface,
TRACE
(
"(%p)->(%p, %p, %f)
\n
"
,
This
,
device
,
constant
,
f
);
TRACE
(
"(%p)->(%p, %p, %f)
\n
"
,
This
,
device
,
constant
,
f
);
return
ID3DXConstantTable_SetFloatArray
(
iface
,
device
,
constant
,
&
f
,
1
);
return
set_scalar_array
(
iface
,
device
,
constant
,
&
f
,
1
,
D3DXPT_FLOAT
);
}
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetFloatArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetFloatArray
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
@@ -991,7 +994,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetFloatArray(ID3DXConstantTable *i
...
@@ -991,7 +994,7 @@ static HRESULT WINAPI ID3DXConstantTableImpl_SetFloatArray(ID3DXConstantTable *i
TRACE
(
"(%p)->(%p, %p, %p, %d)
\n
"
,
This
,
device
,
constant
,
f
,
count
);
TRACE
(
"(%p)->(%p, %p, %p, %d)
\n
"
,
This
,
device
,
constant
,
f
,
count
);
return
set_
float
_array
(
iface
,
device
,
constant
,
f
,
count
,
D3DXPT_FLOAT
);
return
set_
scalar
_array
(
iface
,
device
,
constant
,
f
,
count
,
D3DXPT_FLOAT
);
}
}
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetVector
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
static
HRESULT
WINAPI
ID3DXConstantTableImpl_SetVector
(
ID3DXConstantTable
*
iface
,
LPDIRECT3DDEVICE9
device
,
...
...
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