wined3d: Get rid of wined3d_get_draw_rect().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
96432c4cc2
commit
eb83a7c993
|
@ -501,14 +501,11 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
|||
|
||||
static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_state *state = &cs->state;
|
||||
const struct wined3d_cs_clear *op = data;
|
||||
struct wined3d_device *device;
|
||||
unsigned int i;
|
||||
RECT draw_rect;
|
||||
|
||||
device = cs->device;
|
||||
wined3d_get_draw_rect(state, &draw_rect);
|
||||
device->blitter->ops->blitter_clear(device->blitter, device, op->rt_count, op->fb,
|
||||
op->rect_count, op->rects, &op->draw_rect, op->flags, &op->color, op->depth, op->stencil);
|
||||
|
||||
|
@ -529,6 +526,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
|||
{
|
||||
unsigned int rt_count = cs->device->adapter->gl_info.limits.buffers;
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
const struct wined3d_viewport *vp = &state->viewport;
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int i;
|
||||
|
||||
|
@ -538,7 +536,9 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
|||
op->flags = flags;
|
||||
op->rt_count = rt_count;
|
||||
op->fb = &cs->fb;
|
||||
wined3d_get_draw_rect(state, &op->draw_rect);
|
||||
SetRect(&op->draw_rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height);
|
||||
if (state->render_states[WINED3D_RS_SCISSORTESTENABLE])
|
||||
IntersectRect(&op->draw_rect, &op->draw_rect, &state->scissor_rect);
|
||||
op->color = *color;
|
||||
op->depth = depth;
|
||||
op->stencil = stencil;
|
||||
|
|
|
@ -5990,16 +5990,6 @@ int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb
|
|||
return memcmp(ka, kb, sizeof(*ka));
|
||||
}
|
||||
|
||||
void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect)
|
||||
{
|
||||
const struct wined3d_viewport *vp = &state->viewport;
|
||||
|
||||
SetRect(rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height);
|
||||
|
||||
if (state->render_states[WINED3D_RS_SCISSORTESTENABLE])
|
||||
IntersectRect(rect, rect, &state->scissor_rect);
|
||||
}
|
||||
|
||||
const char *wined3d_debug_location(DWORD location)
|
||||
{
|
||||
const char *prefix = "";
|
||||
|
|
|
@ -2695,7 +2695,6 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
|||
const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders,
|
||||
const struct ffp_frag_settings *settings) DECLSPEC_HIDDEN;
|
||||
void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN;
|
||||
void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect) DECLSPEC_HIDDEN;
|
||||
void wined3d_ftoa(float value, char *s) DECLSPEC_HIDDEN;
|
||||
|
||||
extern const float wined3d_srgb_const0[] DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue