[RFC] wined3d: Avoid triggering OPENGL errors when setting point size

Vincent Pelletier plr.vincent at gmail.com
Fri Dec 26 15:35:18 CST 2008


Woops, re-sending to list this time...

On Wed, Dec 24, 2008 at 4:01 PM, Stefan Dösinger <stefan at codeweavers.com> 
wrote:
> I think henri sent a reply. He recommended to clamp the new pointsize
> instead of leaving the old one set.

Found it. Wasn't subscribed here at that time (only to -patches).
New version of previous patch is attached.

> Of course a test would be interesting too, to see how windows behaves here.

I'm not sure where to add it. I've added some line in
d3d9/tests/visual.c:pointsize_test (attached too). As I wrote that
test to succeed on wine and did not run it on any windows version, I
would be happy if someone could try it.
Note that this patch also contains a change from fix explained below
(I'm not used to git enough yet to split patches...).

Also, runing that test I had an unrelated failure in
autogen_mipmap_test because texture creation failed in
IWineD3DDeviceImpl_CreateTexture due to SFLAG_OVERSIZE being set at
D3DCB_CreateSurface return.
As I guess IWineD3DDeviceImpl_CreateTexture should then return a
failure code, I patched it and made the test give up if texture
allocation failed. (patch attached)
I'm not sure if I chose the right error code. From MSDN, it can return:
D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY

If this change is OK, I will submit it separately from pointsize clamping.

--
Vincent Pelletier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: always_clamp_point_size.diff
Type: text/x-diff
Size: 716 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081226/a94d2904/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: return_error_code_if_texture_oversised.diff
Type: text/x-diff
Size: 839 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081226/a94d2904/attachment-0001.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_test_for_0_sized_point.diff
Type: text/x-diff
Size: 2828 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081226/a94d2904/attachment-0002.diff 


More information about the wine-devel mailing list