wined3d: Consistently store format bitcounts in BYTEs.
This commit is contained in:
parent
28169c6d55
commit
20b147bfeb
|
@ -1177,8 +1177,8 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
|
|||
{
|
||||
int iPixelFormat=0;
|
||||
unsigned int matchtry;
|
||||
short redBits, greenBits, blueBits, alphaBits, colorBits;
|
||||
short depthBits=0, stencilBits=0;
|
||||
BYTE redBits, greenBits, blueBits, alphaBits, colorBits;
|
||||
BYTE depthBits=0, stencilBits=0;
|
||||
|
||||
static const struct
|
||||
{
|
||||
|
@ -2052,7 +2052,7 @@ static inline void context_set_render_offscreen(struct wined3d_context *context,
|
|||
static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
|
||||
const struct wined3d_format *required)
|
||||
{
|
||||
short existing_depth, existing_stencil, required_depth, required_stencil;
|
||||
BYTE existing_depth, existing_stencil, required_depth, required_stencil;
|
||||
|
||||
if (existing == required) return TRUE;
|
||||
if ((existing->flags & WINED3DFMT_FLAG_FLOAT) != (required->flags & WINED3DFMT_FLAG_FLOAT)) return FALSE;
|
||||
|
|
|
@ -2934,7 +2934,7 @@ HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d,
|
|||
static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_pixel_format *cfg, const struct wined3d_format *format)
|
||||
{
|
||||
short redSize, greenSize, blueSize, alphaSize, colorBits;
|
||||
BYTE redSize, greenSize, blueSize, alphaSize, colorBits;
|
||||
|
||||
if(!cfg)
|
||||
return FALSE;
|
||||
|
@ -2971,7 +2971,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined
|
|||
static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_pixel_format *cfg, const struct wined3d_format *format)
|
||||
{
|
||||
short depthSize, stencilSize;
|
||||
BYTE depthSize, stencilSize;
|
||||
BOOL lockable = FALSE;
|
||||
|
||||
if(!cfg)
|
||||
|
@ -3117,7 +3117,7 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
|
|||
}
|
||||
else if (format->flags & WINED3DFMT_FLAG_RENDERTARGET)
|
||||
{
|
||||
short redSize, greenSize, blueSize, alphaSize, colorBits;
|
||||
BYTE redSize, greenSize, blueSize, alphaSize, colorBits;
|
||||
const struct wined3d_pixel_format *cfgs;
|
||||
unsigned int i, cfg_count;
|
||||
|
||||
|
@ -3217,8 +3217,8 @@ static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter,
|
|||
if (!(check_format->flags & WINED3DFMT_FLAG_RENDERTARGET)) return FALSE;
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER)
|
||||
{
|
||||
short AdapterRed, AdapterGreen, AdapterBlue, AdapterAlpha, AdapterTotalSize;
|
||||
short CheckRed, CheckGreen, CheckBlue, CheckAlpha, CheckTotalSize;
|
||||
BYTE AdapterRed, AdapterGreen, AdapterBlue, AdapterAlpha, AdapterTotalSize;
|
||||
BYTE CheckRed, CheckGreen, CheckBlue, CheckAlpha, CheckTotalSize;
|
||||
const struct wined3d_pixel_format *cfgs = adapter->cfgs;
|
||||
int it;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ struct StaticPixelFormatDesc
|
|||
enum wined3d_format_id id;
|
||||
DWORD alphaMask, redMask, greenMask, blueMask;
|
||||
UINT bpp;
|
||||
short depthSize, stencilSize;
|
||||
BYTE depthSize, stencilSize;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -2535,7 +2535,7 @@ unsigned int count_bits(unsigned int mask)
|
|||
/* Helper function for retrieving color info for ChoosePixelFormat and wglChoosePixelFormatARB.
|
||||
* The later function requires individual color components. */
|
||||
BOOL getColorBits(const struct wined3d_format *format,
|
||||
short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize)
|
||||
BYTE *redSize, BYTE *greenSize, BYTE *blueSize, BYTE *alphaSize, BYTE *totalSize)
|
||||
{
|
||||
TRACE("format %s.\n", debug_d3dformat(format->id));
|
||||
|
||||
|
@ -2573,7 +2573,7 @@ BOOL getColorBits(const struct wined3d_format *format,
|
|||
}
|
||||
|
||||
/* Helper function for retrieving depth/stencil info for ChoosePixelFormat and wglChoosePixelFormatARB */
|
||||
BOOL getDepthStencilBits(const struct wined3d_format *format, short *depthSize, short *stencilSize)
|
||||
BOOL getDepthStencilBits(const struct wined3d_format *format, BYTE *depthSize, BYTE *stencilSize)
|
||||
{
|
||||
TRACE("format %s.\n", debug_d3dformat(format->id));
|
||||
|
||||
|
|
|
@ -2540,9 +2540,9 @@ void state_fog_fragpart(DWORD state, struct wined3d_stateblock *stateblock,
|
|||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
|
||||
BOOL getColorBits(const struct wined3d_format *format,
|
||||
short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) DECLSPEC_HIDDEN;
|
||||
BYTE *redSize, BYTE *greenSize, BYTE *blueSize, BYTE *alphaSize, BYTE *totalSize) DECLSPEC_HIDDEN;
|
||||
BOOL getDepthStencilBits(const struct wined3d_format *format,
|
||||
short *depthSize, short *stencilSize) DECLSPEC_HIDDEN;
|
||||
BYTE *depthSize, BYTE *stencilSize) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Math utils */
|
||||
void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2) DECLSPEC_HIDDEN;
|
||||
|
@ -2812,8 +2812,8 @@ struct wined3d_format
|
|||
DWORD blue_mask;
|
||||
DWORD alpha_mask;
|
||||
UINT byte_count;
|
||||
WORD depth_size;
|
||||
WORD stencil_size;
|
||||
BYTE depth_size;
|
||||
BYTE stencil_size;
|
||||
|
||||
UINT block_width;
|
||||
UINT block_height;
|
||||
|
|
Loading…
Reference in New Issue