[PATCH 1/4] wined3d: Disallow empty surfaces.
hverbeet at gmail.com
Thu Nov 18 07:57:11 CST 2010
On 18 November 2010 14:59, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> Am Donnerstag 18 November 2010, 12:21:39 schrieb Henri Verbeet:
>> + if (!resource_size) return WINED3DERR_INVALIDCALL;
> Shouldn't we add a format flag that controls wether a format can be used to
> create a resource instead? I'm thinking about the NULL fourcc code that also
> has a resource size of zero but can be used to create a surface.
NULL is pretty special, and will require changes in a number of
places. Maybe it shouldn't go through the regular surface creation
path at all. Note that the point of the series is to disallow creating
surfaces with a zero width or height; failing NVDB surface creation is
just a fortunate side effect. In the longer term we should also
disallow e.g. formats without a GL format for resources in the default
or managed pools.
More information about the wine-devel