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
403d1185
Commit
403d1185
authored
Jul 06, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Jul 06, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change all references to updateStateBlock to references to stateBlock
in drawprim.
parent
70c80fb4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
drawprim.c
dlls/wined3d/drawprim.c
+23
-23
No files found.
dlls/wined3d/drawprim.c
View file @
403d1185
...
...
@@ -55,10 +55,10 @@ BOOL initializeFVF(IWineD3DDevice *iface,
streams */
#endif
if
(
This
->
updateS
tateBlock
->
vertexShader
==
NULL
)
{
if
(
This
->
s
tateBlock
->
vertexShader
==
NULL
)
{
/* Use this as the FVF */
*
FVFbits
=
This
->
updateS
tateBlock
->
fvf
;
*
FVFbits
=
This
->
s
tateBlock
->
fvf
;
*
useVertexShaderFunction
=
FALSE
;
TRACE
(
"FVF explicitally defined, using fixed function pipeline with FVF=%lx
\n
"
,
*
FVFbits
);
...
...
@@ -67,17 +67,17 @@ BOOL initializeFVF(IWineD3DDevice *iface,
#if 0 /* TODO */
/* Use created shader */
IDirect3DVertexShaderImpl* vertex_shader = NULL;
vertex_shader = VERTEX_SHADER(This->
updateS
tateBlock->VertexShader);
vertex_shader = VERTEX_SHADER(This->
s
tateBlock->VertexShader);
if (vertex_shader == NULL) {
/* Hmm - User pulled figure out of the air? Unlikely, probably a bug */
ERR("trying to use unitialised vertex shader: %lu\n", This->
updateS
tateBlock->VertexShader);
ERR("trying to use unitialised vertex shader: %lu\n", This->
s
tateBlock->VertexShader);
return TRUE;
} else {
*FVFbits = This->
updateS
tateBlock->vertexShaderDecl->allFVF;
*FVFbits = This->
s
tateBlock->vertexShaderDecl->allFVF;
if (vertex_shader->function == NULL) {
/* No function, so many streams supplied plus FVF definition pre stream */
...
...
@@ -363,7 +363,7 @@ void primitiveConvertToStridedData(IWineD3DDevice *iface, Direct3DVertexStridedD
For the non-created vertex shaders, the VertexShader var holds the real
FVF and only stream 0 matters
For the created vertex shaders, there is an FVF per stream */
if
(
!
This
->
stateBlock
->
streamIsUP
&&
!
(
This
->
updateS
tateBlock
->
vertexShader
==
NULL
))
{
if
(
!
This
->
stateBlock
->
streamIsUP
&&
!
(
This
->
s
tateBlock
->
vertexShader
==
NULL
))
{
LoopThroughTo
=
MAX_STREAMS
;
}
else
{
LoopThroughTo
=
1
;
...
...
@@ -380,7 +380,7 @@ void primitiveConvertToStridedData(IWineD3DDevice *iface, Direct3DVertexStridedD
/* Retrieve appropriate FVF */
if
(
LoopThroughTo
==
1
)
{
/* Use FVF, not vertex shader */
thisFVF
=
This
->
updateS
tateBlock
->
fvf
;
thisFVF
=
This
->
s
tateBlock
->
fvf
;
/* Handle memory passed directly as well as vertex buffers */
if
(
This
->
stateBlock
->
streamIsUP
)
{
data
=
(
BYTE
*
)
This
->
stateBlock
->
streamSource
[
nStream
];
...
...
@@ -416,7 +416,7 @@ void primitiveConvertToStridedData(IWineD3DDevice *iface, Direct3DVertexStridedD
}
/* Blending is numBlends * FLOATs followed by a DWORD for UBYTE4 */
/** do we have to Check This->
updateS
tateBlock->renderState[D3DRS_INDEXEDVERTEXBLENDENABLE] ? */
/** do we have to Check This->
s
tateBlock->renderState[D3DRS_INDEXEDVERTEXBLENDENABLE] ? */
numBlends
=
((
thisFVF
&
D3DFVF_POSITION_MASK
)
>>
1
)
-
2
+
((
FALSE
==
(
thisFVF
&
D3DFVF_LASTBETA_UBYTE4
))
?
0
:
-
1
);
/* WARNING can be < 0 because -2 */
if
(
numBlends
>
0
)
{
...
...
@@ -556,7 +556,7 @@ void draw_vertex(IWineD3DDevice *iface, /* interfac
/* Query tex coords */
if
(
This
->
stateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
int
coordIdx
=
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
int
coordIdx
=
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
if
(
coordIdx
>
7
)
{
VTRACE
((
"tex: %d - Skip tex coords, as being system generated
\n
"
,
textureNo
));
continue
;
...
...
@@ -816,7 +816,7 @@ void drawStridedFast(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
/* Query tex coords */
if
(
This
->
stateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
int
coordIdx
=
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
int
coordIdx
=
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
if
(
!
GL_SUPPORT
(
ARB_MULTITEXTURE
)
&&
textureNo
>
0
)
{
FIXME
(
"Program using multiple concurrent textures which this opengl implementation doesn't support
\n
"
);
...
...
@@ -1020,7 +1020,7 @@ void drawStridedSlow(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
/* Query tex coords */
if
(
This
->
stateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
int
coordIdx
=
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
int
coordIdx
=
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXCOORDINDEX
];
float
*
ptrToCoords
=
(
float
*
)(
sd
->
u
.
s
.
texCoords
[
coordIdx
].
lpData
+
(
SkipnStrides
*
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwStride
));
float
s
=
0
.
0
,
t
=
0
.
0
,
r
=
0
.
0
,
q
=
0
.
0
;
...
...
@@ -1044,10 +1044,10 @@ void drawStridedSlow(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
/* Projected is more 'fun' - Move the last coord to the 'q'
parameter (see comments under D3DTSS_TEXTURETRANSFORMFLAGS */
if
((
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
!=
D3DTTFF_DISABLE
)
&&
(
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
if
((
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
!=
D3DTTFF_DISABLE
)
&&
(
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
))
{
if
(
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
if
(
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
)
{
switch
(
coordsToUse
)
{
case
0
:
/* Drop Through */
case
1
:
...
...
@@ -1067,7 +1067,7 @@ void drawStridedSlow(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
break
;
default:
FIXME
(
"Unexpected D3DTSS_TEXTURETRANSFORMFLAGS value of %ld
\n
"
,
This
->
updateS
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
);
This
->
s
tateBlock
->
textureState
[
textureNo
][
D3DTSS_TEXTURETRANSFORMFLAGS
]
&
D3DTTFF_PROJECTED
);
}
}
}
...
...
@@ -1290,8 +1290,8 @@ void drawStridedSoftwareVS(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
texcoords[textureNo].y = vertex_shader->output.oT[textureNo].y;
texcoords[textureNo].z = vertex_shader->output.oT[textureNo].z;
texcoords[textureNo].w = vertex_shader->output.oT[textureNo].w;
if (This->
updateS
tateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] != D3DTTFF_DISABLE) {
numcoords[textureNo] = This->
updateS
tateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] & ~D3DTTFF_PROJECTED;
if (This->
s
tateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] != D3DTTFF_DISABLE) {
numcoords[textureNo] = This->
s
tateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] & ~D3DTTFF_PROJECTED;
} else {
switch (IDirect3DBaseTexture8Impl_GetType((LPDIRECT3DBASETEXTURE8) This->stateBlock->textures[textureNo])) {
case D3DRTYPE_TEXTURE: numcoords[textureNo] = 2; break;
...
...
@@ -1436,7 +1436,7 @@ void drawPrimitive(IWineD3DDevice *iface,
/* If we will be using a vertex shader, do some initialization for it */
if
(
useVertexShaderFunction
)
{
#if 0 /* TODO: vertex and pixel shaders */
vertex_shader = VERTEX_SHADER(This->
updateS
tateBlock->VertexShader);
vertex_shader = VERTEX_SHADER(This->
s
tateBlock->VertexShader);
memset(&vertex_shader->input, 0, sizeof(VSHADERINPUTDATA8));
useHW = (((vs_mode == VS_HW) && GL_SUPPORT(ARB_VERTEX_PROGRAM)) &&
...
...
@@ -1445,9 +1445,9 @@ void drawPrimitive(IWineD3DDevice *iface,
vertex_shader->usage != D3DUSAGE_SOFTWAREPROCESSING);
/** init Constants */
if (This->
updateS
tateBlock->Changed.vertexShaderConstant) {
if (This->
s
tateBlock->Changed.vertexShaderConstant) {
TRACE_(d3d_shader)("vertex shader initializing constants\n");
IDirect3DVertexShaderImpl_SetConstantF(vertex_shader, 0, (CONST FLOAT*) &This->
updateS
tateBlock->vertexShaderConstant[0], 96);
IDirect3DVertexShaderImpl_SetConstantF(vertex_shader, 0, (CONST FLOAT*) &This->
s
tateBlock->vertexShaderConstant[0], 96);
}
#endif /* TODO: vertex and pixel shaders */
}
...
...
@@ -1457,7 +1457,7 @@ void drawPrimitive(IWineD3DDevice *iface,
#if 0 /* TODO: vertex and pixel shaders */
/* If we will be using a pixel, do some initialization for it */
if ((pixel_shader = PIXEL_SHADER(This->
updateS
tateBlock->PixelShader))) {
if ((pixel_shader = PIXEL_SHADER(This->
s
tateBlock->PixelShader))) {
TRACE("drawing with pixel shader handle %p\n", pixel_shader);
memset(&pixel_shader->input, 0, sizeof(PSHADERINPUTDATA8));
...
...
@@ -1467,9 +1467,9 @@ void drawPrimitive(IWineD3DDevice *iface,
checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);");
/* init Constants */
if (This->
updateS
tateBlock->Changed.pixelShaderConstant) {
if (This->
s
tateBlock->Changed.pixelShaderConstant) {
TRACE_(d3d_shader)("pixel shader initializing constants %p\n",pixel_shader);
IDirect3DPixelShaderImpl_SetConstantF(pixel_shader, 0, (CONST FLOAT*) &This->
updateS
tateBlock->pixelShaderConstant[0], 8);
IDirect3DPixelShaderImpl_SetConstantF(pixel_shader, 0, (CONST FLOAT*) &This->
s
tateBlock->pixelShaderConstant[0], 8);
}
/* Update the constants */
for (i=0; i<D3D8_PSHADER_MAX_CONSTANTS; i++) {
...
...
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