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
6d89364a
Commit
6d89364a
authored
May 21, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid using the long type.
parent
f9d2b85e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
22 deletions
+22
-22
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-2
device.c
dlls/wined3d/device.c
+1
-1
directx.c
dlls/wined3d/directx.c
+2
-2
drawprim.c
dlls/wined3d/drawprim.c
+9
-9
state.c
dlls/wined3d/state.c
+1
-1
swapchain_gdi.c
dlls/wined3d/swapchain_gdi.c
+1
-1
utils.c
dlls/wined3d/utils.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
6d89364a
...
...
@@ -61,14 +61,14 @@ static char *get_line(char **ptr)
static
void
shader_arb_dump_program_source
(
const
char
*
source
)
{
unsigned
long
source_size
;
ULONG
source_size
;
char
*
ptr
,
*
line
,
*
tmp
;
source_size
=
strlen
(
source
)
+
1
;
tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
source_size
);
if
(
!
tmp
)
{
ERR
(
"Failed to allocate %
l
u bytes for shader source.
\n
"
,
source_size
);
ERR
(
"Failed to allocate %u bytes for shader source.
\n
"
,
source_size
);
return
;
}
memcpy
(
tmp
,
source
,
source_size
);
...
...
dlls/wined3d/device.c
View file @
6d89364a
...
...
@@ -3941,7 +3941,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
{
struct
wined3d_buffer
*
vb
=
(
struct
wined3d_buffer
*
)
This
->
stateBlock
->
streamSource
[
e
->
stream_idx
];
e
->
buffer_object
=
0
;
e
->
data
=
(
BYTE
*
)((
unsigned
long
)
e
->
data
+
(
unsigned
long
)
buffer_get_sysmem
(
vb
,
gl_info
));
e
->
data
=
(
BYTE
*
)((
ULONG_PTR
)
e
->
data
+
(
ULONG_PTR
)
buffer_get_sysmem
(
vb
,
gl_info
));
ENTER_GL
();
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
vb
->
buffer_object
));
vb
->
buffer_object
=
0
;
...
...
dlls/wined3d/directx.c
View file @
6d89364a
...
...
@@ -327,12 +327,12 @@ fail:
}
/* Adjust the amount of used texture memory */
long
WineD3DAdapterChangeGLRam
(
IWineD3DDeviceImpl
*
device
,
long
glram
)
unsigned
int
WineD3DAdapterChangeGLRam
(
IWineD3DDeviceImpl
*
device
,
unsigned
int
glram
)
{
struct
wined3d_adapter
*
adapter
=
device
->
adapter
;
adapter
->
UsedTextureRam
+=
glram
;
TRACE
(
"Adjusted gl ram by %
l
d to %d
\n
"
,
glram
,
adapter
->
UsedTextureRam
);
TRACE
(
"Adjusted gl ram by %d to %d
\n
"
,
glram
,
adapter
->
UsedTextureRam
);
return
adapter
->
UsedTextureRam
;
}
...
...
dlls/wined3d/drawprim.c
View file @
6d89364a
...
...
@@ -71,7 +71,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context
UINT
vx_index
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
const
UINT
*
streamOffset
=
This
->
stateBlock
->
streamOffset
;
long
SkipnStrides
=
startIdx
+
This
->
stateBlock
->
loadBaseVertexIndex
;
LONG
SkipnStrides
=
startIdx
+
This
->
stateBlock
->
loadBaseVertexIndex
;
BOOL
pixelShader
=
use_ps
(
This
->
stateBlock
);
BOOL
specular_fog
=
FALSE
;
const
BYTE
*
texCoords
[
WINED3DDP_MAXTEXCOORD
];
...
...
@@ -423,7 +423,7 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, const struct wined3d_stream
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
const
struct
wined3d_gl_info
*
gl_info
=
&
This
->
adapter
->
gl_info
;
long
SkipnStrides
=
startIdx
+
This
->
stateBlock
->
loadBaseVertexIndex
;
LONG
SkipnStrides
=
startIdx
+
This
->
stateBlock
->
loadBaseVertexIndex
;
const
WORD
*
pIdxBufS
=
NULL
;
const
DWORD
*
pIdxBufL
=
NULL
;
UINT
vx_index
;
...
...
@@ -536,7 +536,7 @@ static inline void drawStridedInstanced(IWineD3DDevice *iface, const struct wine
{
struct
wined3d_buffer
*
vb
=
(
struct
wined3d_buffer
*
)
stateblock
->
streamSource
[
si
->
elements
[
instancedData
[
j
]].
stream_idx
];
ptr
+=
(
long
)
buffer_get_sysmem
(
vb
,
&
This
->
adapter
->
gl_info
);
ptr
+=
(
ULONG_PTR
)
buffer_get_sysmem
(
vb
,
&
This
->
adapter
->
gl_info
);
}
send_attribute
(
This
,
si
->
elements
[
instancedData
[
j
]].
format_desc
->
format
,
instancedData
[
j
],
ptr
);
...
...
@@ -564,7 +564,7 @@ static inline void remove_vbos(IWineD3DDeviceImpl *This, const struct wined3d_gl
{
struct
wined3d_buffer
*
vb
=
(
struct
wined3d_buffer
*
)
This
->
stateBlock
->
streamSource
[
e
->
stream_idx
];
e
->
buffer_object
=
0
;
e
->
data
=
(
BYTE
*
)((
unsigned
long
)
e
->
data
+
(
unsigned
long
)
buffer_get_sysmem
(
vb
,
gl_info
));
e
->
data
=
(
BYTE
*
)((
ULONG_PTR
)
e
->
data
+
(
ULONG_PTR
)
buffer_get_sysmem
(
vb
,
gl_info
));
}
}
}
...
...
@@ -731,14 +731,14 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
/* Diagnostics */
#ifdef SHOW_FRAME_MAKEUP
{
static
long
int
primCounter
=
0
;
static
LONG
primCounter
=
0
;
/* NOTE: set primCounter to the value reported by drawprim
before you want to to write frame makeup to /tmp */
if
(
primCounter
>=
0
)
{
WINED3DLOCKED_RECT
r
;
char
buffer
[
80
];
IWineD3DSurface_LockRect
(
This
->
render_targets
[
0
],
&
r
,
NULL
,
WINED3DLOCK_READONLY
);
sprintf
(
buffer
,
"/tmp/backbuffer_%
l
d.tga"
,
primCounter
);
sprintf
(
buffer
,
"/tmp/backbuffer_%d.tga"
,
primCounter
);
TRACE
(
"Saving screenshot %s
\n
"
,
buffer
);
IWineD3DSurface_SaveSnapshot
(
This
->
render_targets
[
0
],
buffer
);
IWineD3DSurface_UnlockRect
(
This
->
render_targets
[
0
]);
...
...
@@ -749,7 +749,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
int
textureNo
;
for
(
textureNo
=
0
;
textureNo
<
MAX_COMBINED_SAMPLERS
;
++
textureNo
)
{
if
(
This
->
stateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
sprintf
(
buffer
,
"/tmp/texture_%p_%
l
d_%d.tga"
,
This
->
stateBlock
->
textures
[
textureNo
],
primCounter
,
textureNo
);
sprintf
(
buffer
,
"/tmp/texture_%p_%d_%d.tga"
,
This
->
stateBlock
->
textures
[
textureNo
],
primCounter
,
textureNo
);
TRACE
(
"Saving texture %s
\n
"
,
buffer
);
if
(
IWineD3DBaseTexture_GetType
(
This
->
stateBlock
->
textures
[
textureNo
])
==
WINED3DRTYPE_TEXTURE
)
{
IWineD3DTexture_GetSurfaceLevel
(
This
->
stateBlock
->
textures
[
textureNo
],
0
,
&
pSur
);
...
...
@@ -763,7 +763,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
}
#endif
}
TRACE
(
"drawprim #%
l
d
\n
"
,
primCounter
);
TRACE
(
"drawprim #%d
\n
"
,
primCounter
);
++
primCounter
;
}
#endif
...
...
@@ -832,7 +832,7 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
{
struct
wined3d_buffer
*
vb
;
vb
=
(
struct
wined3d_buffer
*
)
This
->
stateBlock
->
streamSource
[
e
->
stream_idx
];
e
->
data
=
(
BYTE
*
)((
unsigned
long
)
e
->
data
+
(
unsigned
long
)
buffer_get_sysmem
(
vb
,
context
->
gl_info
));
e
->
data
=
(
BYTE
*
)((
ULONG_PTR
)
e
->
data
+
(
ULONG_PTR
)
buffer_get_sysmem
(
vb
,
context
->
gl_info
));
}
vtxStride
=
e
->
stride
;
data
=
e
->
data
+
...
...
dlls/wined3d/state.c
View file @
6d89364a
...
...
@@ -4100,7 +4100,7 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock,
if
(
stream_info
->
elements
[
i
].
buffer_object
)
{
vb
=
(
struct
wined3d_buffer
*
)
stateblock
->
streamSource
[
stream_info
->
elements
[
i
].
stream_idx
];
ptr
+=
(
long
)
buffer_get_sysmem
(
vb
,
gl_info
);
ptr
+=
(
ULONG_PTR
)
buffer_get_sysmem
(
vb
,
gl_info
);
}
if
(
context
->
numbered_array_mask
&
(
1
<<
i
))
unload_numbered_array
(
stateblock
,
context
,
i
);
...
...
dlls/wined3d/swapchain_gdi.c
View file @
6d89364a
...
...
@@ -230,7 +230,7 @@ static HRESULT WINAPI IWineGDISwapChainImpl_Present(IWineD3DSwapChain *iface, CO
/* FPS support */
if
(
TRACE_ON
(
fps
))
{
static
long
prev_time
,
frames
;
static
LONG
prev_time
,
frames
;
DWORD
time
=
GetTickCount
();
frames
++
;
...
...
dlls/wined3d/utils.c
View file @
6d89364a
...
...
@@ -337,7 +337,7 @@ static void convert_r8g8_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT widt
Dest
=
dst
+
y
*
outpitch
;
for
(
x
=
0
;
x
<
width
;
x
++
)
{
long
color
=
(
*
Source
++
);
LONG
color
=
(
*
Source
++
);
/* B */
Dest
[
0
]
=
0xff
;
/* G */
Dest
[
1
]
=
(
color
>>
8
)
+
128
;
/* V */
/* R */
Dest
[
2
]
=
(
color
)
+
128
;
/* U */
...
...
@@ -362,7 +362,7 @@ static void convert_r8g8_snorm_l8x8_unorm(const BYTE *src, BYTE *dst, UINT pitch
Dest
=
dst
+
y
*
pitch
;
for
(
x
=
0
;
x
<
width
;
x
++
)
{
long
color
=
(
*
Source
++
);
LONG
color
=
(
*
Source
++
);
/* B */
Dest
[
0
]
=
((
color
>>
16
)
&
0xff
);
/* L */
/* G */
Dest
[
1
]
=
((
color
>>
8
)
&
0xff
)
+
128
;
/* V */
/* R */
Dest
[
2
]
=
(
color
&
0xff
)
+
128
;
/* U */
...
...
@@ -386,7 +386,7 @@ static void convert_r8g8_snorm_l8x8_unorm_nv(const BYTE *src, BYTE *dst, UINT pi
Dest
=
dst
+
y
*
pitch
;
for
(
x
=
0
;
x
<
width
;
x
++
)
{
long
color
=
(
*
Source
++
);
LONG
color
=
(
*
Source
++
);
/* L */
Dest
[
2
]
=
((
color
>>
16
)
&
0xff
);
/* L */
/* V */
Dest
[
1
]
=
((
color
>>
8
)
&
0xff
);
/* V */
/* U */
Dest
[
0
]
=
(
color
&
0xff
);
/* U */
...
...
@@ -408,7 +408,7 @@ static void convert_r8g8b8a8_snorm(const BYTE *src, BYTE *dst, UINT pitch, UINT
Dest
=
dst
+
y
*
pitch
;
for
(
x
=
0
;
x
<
width
;
x
++
)
{
long
color
=
(
*
Source
++
);
LONG
color
=
(
*
Source
++
);
/* B */
Dest
[
0
]
=
((
color
>>
16
)
&
0xff
)
+
128
;
/* W */
/* G */
Dest
[
1
]
=
((
color
>>
8
)
&
0xff
)
+
128
;
/* V */
/* R */
Dest
[
2
]
=
(
color
&
0xff
)
+
128
;
/* U */
...
...
dlls/wined3d/wined3d_private.h
View file @
6d89364a
...
...
@@ -1470,7 +1470,7 @@ struct wined3d_adapter
BOOL
initPixelFormats
(
struct
wined3d_gl_info
*
gl_info
,
enum
wined3d_pci_vendor
vendor
)
DECLSPEC_HIDDEN
;
BOOL
initPixelFormatsNoGL
(
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
extern
long
WineD3DAdapterChangeGLRam
(
IWineD3DDeviceImpl
*
D3DDevice
,
long
glram
)
DECLSPEC_HIDDEN
;
extern
unsigned
int
WineD3DAdapterChangeGLRam
(
IWineD3DDeviceImpl
*
D3DDevice
,
unsigned
int
glram
)
DECLSPEC_HIDDEN
;
extern
void
add_gl_compat_wrappers
(
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
...
...
@@ -2546,7 +2546,7 @@ struct IWineD3DSwapChainImpl
BOOL
render_to_fbo
;
const
struct
wined3d_format_desc
*
ds_format
;
long
prev_time
,
frames
;
/* Performance tracking */
LONG
prev_time
,
frames
;
/* Performance tracking */
unsigned
int
vSyncCounter
;
struct
wined3d_context
**
context
;
...
...
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