wined3d: Pass a format instead of a surface to wined3d_format_convert_from_float().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
03ced2e0d3
commit
0ec540276a
|
@ -4685,7 +4685,7 @@ static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d
|
|||
static const RECT src_rect;
|
||||
struct wined3d_blt_fx fx;
|
||||
|
||||
fx.fill_color = wined3d_format_convert_from_float(surface, color);
|
||||
fx.fill_color = wined3d_format_convert_from_float(view->format, color);
|
||||
return surface_cpu_blt(surface, rect, NULL, &src_rect,
|
||||
WINED3D_BLT_COLOR_FILL, &fx, WINED3D_TEXF_POINT);
|
||||
}
|
||||
|
|
|
@ -4393,7 +4393,7 @@ void get_fog_start_end(const struct wined3d_context *context, const struct wined
|
|||
/* Note: It's the caller's responsibility to ensure values can be expressed
|
||||
* in the requested format. UNORM formats for example can only express values
|
||||
* in the range 0.0f -> 1.0f. */
|
||||
DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface, const struct wined3d_color *color)
|
||||
DWORD wined3d_format_convert_from_float(const struct wined3d_format *format, const struct wined3d_color *color)
|
||||
{
|
||||
static const struct
|
||||
{
|
||||
|
@ -4426,7 +4426,6 @@ DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface, c
|
|||
{WINED3DFMT_R10G10B10A2_UNORM, 1023.0f, 1023.0f, 1023.0f, 3.0f, 0, 10, 20, 30},
|
||||
{WINED3DFMT_P8_UINT, 0.0f, 0.0f, 0.0f, 255.0f, 0, 0, 0, 0},
|
||||
};
|
||||
const struct wined3d_format *format = surface->resource.format;
|
||||
unsigned int i;
|
||||
|
||||
TRACE("Converting color {%.8e %.8e %.8e %.8e} to format %s.\n",
|
||||
|
|
|
@ -3354,7 +3354,7 @@ void wined3d_format_calculate_pitch(const struct wined3d_format *format, unsigne
|
|||
unsigned int width, unsigned int height, unsigned int *row_pitch, unsigned int *slice_pitch) DECLSPEC_HIDDEN;
|
||||
UINT wined3d_format_calculate_size(const struct wined3d_format *format,
|
||||
UINT alignment, UINT width, UINT height, UINT depth) DECLSPEC_HIDDEN;
|
||||
DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface,
|
||||
DWORD wined3d_format_convert_from_float(const struct wined3d_format *format,
|
||||
const struct wined3d_color *color) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_format_convert_color_to_float(const struct wined3d_format *format,
|
||||
const struct wined3d_palette *palette, DWORD color, struct wined3d_color *float_color) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue