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
1be54d8b
Commit
1be54d8b
authored
Aug 19, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Aug 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate hardware vertex shaders into the drawing pipeline.
parent
516a577d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
18 deletions
+24
-18
device.c
dlls/wined3d/device.c
+21
-13
drawprim.c
dlls/wined3d/drawprim.c
+0
-0
vertexshader.c
dlls/wined3d/vertexshader.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-4
No files found.
dlls/wined3d/device.c
View file @
1be54d8b
...
...
@@ -1456,7 +1456,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *iface, CON
IWineD3DVertexShaderImpl
*
object
;
/* NOTE: impl usage is ok, this is a create */
D3DCREATEOBJECTINSTANCE
(
object
,
VertexShader
)
TRACE
(
"(%p) : Created Vertex shader %p
\n
"
,
This
,
ppVertexShader
);
TRACE
(
"(%p) : Created Vertex shader %p
\n
"
,
This
,
*
ppVertexShader
);
IWineD3DVertexShader_SetFunction
(
*
ppVertexShader
,
pFunction
);
return
D3D_OK
;
...
...
@@ -4334,7 +4334,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, D3DPRIMIT
TRACE
(
"(%p) : Type=(%d,%s), Start=%d, Count=%d
\n
"
,
This
,
PrimitiveType
,
debug_d3dprimitivetype
(
PrimitiveType
),
StartVertex
,
PrimitiveCount
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
StartVertex
,
-
1
,
0
,
NULL
,
0
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
StartVertex
,
0
/* NumVertices */
,
-
1
/* indxStart */
,
0
/* indxSize */
,
NULL
/* indxData */
,
0
/* minIndex */
);
return
D3D_OK
;
}
...
...
@@ -4343,7 +4345,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, D3DPRIMIT
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitive
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
INT
baseVIndex
,
UINT
minIndex
,
UINT
NumVertices
,
UINT
startIndex
,
UINT
primCount
)
{
UINT
NumVertices
,
UINT
startIndex
,
UINT
primCount
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
UINT
idxStride
=
2
;
...
...
@@ -4364,10 +4366,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *iface,
idxStride
=
4
;
}
drawPrimitive
(
iface
,
PrimitiveType
,
primCount
,
baseVIndex
,
startIndex
,
idxStride
,
((
IWineD3DIndexBufferImpl
*
)
pIB
)
->
resource
.
allocatedMemory
,
minIndex
);
drawPrimitive
(
iface
,
PrimitiveType
,
primCount
,
baseVIndex
,
NumVertices
,
startIndex
,
idxStride
,
((
IWineD3DIndexBufferImpl
*
)
pIB
)
->
resource
.
allocatedMemory
,
minIndex
);
return
D3D_OK
;
}
...
...
@@ -4392,7 +4392,12 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, D3DPRIM
This
->
stateBlock
->
streamSource
[
0
]
=
(
IWineD3DVertexBuffer
*
)
pVertexStreamZeroData
;
This
->
stateBlock
->
streamStride
[
0
]
=
VertexStreamZeroStride
;
This
->
stateBlock
->
streamIsUP
=
TRUE
;
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
,
0
,
0
,
NULL
,
0
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
/* start vertex */
,
0
/* NumVertices */
,
0
/* indxStart*/
,
0
/* indxSize*/
,
NULL
/* indxData */
,
0
/* indxMin */
);
/* stream zero settings set to null at end, as per the msdn
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/graphics/reference/d3d/interfaces/idirect3ddevice9/DrawPrimitiveUP.asp
*/
This
->
stateBlock
->
streamStride
[
0
]
=
0
;
This
->
stateBlock
->
streamSource
[
0
]
=
NULL
;
...
...
@@ -4401,16 +4406,16 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface, D3DPRIM
}
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitiveUP
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
MinVertexIndex
,
UINT
NumVertexIndices
,
UINT
PrimitiveCount
,
CONST
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
,
CONST
void
*
pVertexStreamZeroData
,
UINT
MinVertexIndex
,
UINT
NumVertices
,
UINT
PrimitiveCount
,
CONST
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
{
int
idxStride
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p) : Type=(%d,%s), MinVtxIdx=%d, NumVIdx=%d, PCount=%d, pidxdata=%p, IdxFmt=%d, pVtxdata=%p, stride=%d
\n
"
,
This
,
PrimitiveType
,
debug_d3dprimitivetype
(
PrimitiveType
),
MinVertexIndex
,
NumVert
exInd
ices
,
PrimitiveCount
,
pIndexData
,
MinVertexIndex
,
NumVertices
,
PrimitiveCount
,
pIndexData
,
IndexDataFormat
,
pVertexStreamZeroData
,
VertexStreamZeroStride
);
if
(
IndexDataFormat
==
WINED3DFMT_INDEX16
)
{
...
...
@@ -4440,7 +4445,10 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface,
This
->
stateBlock
->
streamIsUP
=
TRUE
;
This
->
stateBlock
->
streamStride
[
0
]
=
VertexStreamZeroStride
;
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
,
0
,
idxStride
,
pIndexData
,
MinVertexIndex
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
/* vertexStart */
,
NumVertices
,
0
/* indxStart */
,
idxStride
,
pIndexData
,
MinVertexIndex
);
/* stream zero settings set to null at end as per the msdn
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/graphics/reference/d3d/interfaces/idirect3ddevice9/DrawPrimitiveUP.asp
*/
/* stream zero settings set to null at end as per the msdn */
This
->
stateBlock
->
streamSource
[
0
]
=
NULL
;
...
...
dlls/wined3d/drawprim.c
View file @
1be54d8b
This diff is collapsed.
Click to expand it.
dlls/wined3d/vertexshader.c
View file @
1be54d8b
...
...
@@ -1990,7 +1990,7 @@ ULONG WINAPI IWineD3DVertexShaderImpl_Release(IWineD3DVertexShader *iface) {
HRESULT
WINAPI
IWineD3DVertexShaderImpl_GetParent
(
IWineD3DVertexShader
*
iface
,
IUnknown
**
parent
){
IWineD3DVertexShaderImpl
*
This
=
(
IWineD3DVertexShaderImpl
*
)
iface
;
*
parent
=
(
IUnknown
*
)
parent
;
*
parent
=
(
IUnknown
*
)
This
->
parent
;
IUnknown_AddRef
(
*
parent
);
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
parent
);
return
D3D_OK
;
...
...
dlls/wined3d/wined3d_private.h
View file @
1be54d8b
...
...
@@ -80,7 +80,6 @@ extern DWORD *stateLookup[MAX_LOOKUPS];
extern
DWORD
minMipLookup
[
D3DTEXF_ANISOTROPIC
+
1
][
D3DTEXF_LINEAR
+
1
];
#if 0
/* NOTE: Make sure these are in the correct numerical order. (see /include/d3d9types.h typedef enum _D3DDECLTYPE) */
UINT
static
const
glTypeLookup
[
D3DDECLTYPE_UNUSED
][
5
]
=
{
{
D3DDECLTYPE_FLOAT1
,
1
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
...
...
@@ -104,9 +103,8 @@ UINT static const glTypeLookup[D3DDECLTYPE_UNUSED][5] = {
#define WINED3D_ATR_TYPE(_attribute) glTypeLookup[sd->u.s._attribute.dwType][0]
#define WINED3D_ATR_SIZE(_attribute) glTypeLookup[sd->u.s._attribute.dwType][1]
#define WINED3D_ATR_GLTYPE(_attribute) glTypeLookup[sd->u.s._attribute.dwType][2]
#define WINED3D_ATR_
GLSOMETHING(_attribute)
glTypeLookup[sd->u.s._attribute.dwType][3]
#define WINED3D_ATR_
NORMALIZED(_attribute)
glTypeLookup[sd->u.s._attribute.dwType][3]
#define WINED3D_ATR_TYPESIZE(_attribute) glTypeLookup[sd->u.s._attribute.dwType][4]
#endif
/**
* Settings
...
...
@@ -343,9 +341,9 @@ extern LONG primCounter;
void
drawPrimitive
(
IWineD3DDevice
*
iface
,
int
PrimitiveType
,
long
NumPrimitives
,
/* for Indexed: */
long
StartVertexIndex
,
UINT
numberOfVertices
,
long
StartIdx
,
short
idxBytes
,
const
void
*
idxData
,
...
...
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