From: Elizabeth Figura zfigura@codeweavers.com
Now that we require ORM_FBO, wined3d backbuffers are always offscreen (and we never draw directly to the frontbuffer, which is the only truly onscreen surface).
We could reintroduce support for drawing directly to the backbuffer, and this would presumably improve performance by avoiding a blit from the wined3d backbuffer to the real GL backbuffer.
However, this is not always possible or performant due to mismatching dimensions, or the need to use a depth buffer which is also used with offscreen RTVs, and for d3d1-9 it may not be possible at all due to issues related to preserving invariance between flipped and non-flipped geometry.
It *may* be possible to identify situations where we can render directly to the backbuffer for d3d10+, but at that point we can rely on the Vulkan backend to work, and given other unfixable performance problems with the GL backend (most notably the inability to properly stream index buffer data) it does not really make much sense to go out of our way to perform such a minor optimization there. --- dlls/wined3d/adapter_gl.c | 1 - dlls/wined3d/arb_program_shader.c | 4 +- dlls/wined3d/context_gl.c | 101 +++++++++--------------------- dlls/wined3d/ffp_gl.c | 95 +++++++--------------------- dlls/wined3d/glsl_shader.c | 4 +- dlls/wined3d/shader.c | 4 +- dlls/wined3d/utils.c | 2 +- dlls/wined3d/wined3d_private.h | 10 +-- 8 files changed, 60 insertions(+), 161 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 5539c879199..06e18c30d68 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5060,7 +5060,6 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_ d3d_info->vs_clipping = shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING; d3d_info->shader_double_precision = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_DOUBLE_PRECISION); d3d_info->shader_output_interpolation = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION); - d3d_info->frag_coord_correction = !!gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]; d3d_info->viewport_array_index_any_shader = !!gl_info->supported[ARB_SHADER_VIEWPORT_LAYER_ARRAY]; d3d_info->stencil_export = !!gl_info->supported[ARB_SHADER_STENCIL_EXPORT]; d3d_info->texture_npot = !!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]; diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index fd58f8b080b..305322522cb 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -561,8 +561,8 @@ static void shader_arb_ps_local_constants(const struct arb_ps_compiled_shader *g * ycorrection.w: 0.0 */ float val[4]; - val[0] = context_gl->c.render_offscreen ? 0.0f : (float)rt_height; - val[1] = context_gl->c.render_offscreen ? 1.0f : -1.0f; + val[0] = 0.0f; + val[1] = 1.0f; val[2] = 1.0f; val[3] = 0.0f; GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, gl_shader->ycorrection, val)); diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index a7caef64b46..6f7cf0eb3e3 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2122,7 +2122,6 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
/* Set up the context defaults. */
- context->render_offscreen = wined3d_resource_is_offscreen(&context->current_rt.texture->resource); context_gl->draw_buffers_mask = context_generate_rt_mask(GL_BACK);
if (!wined3d_context_gl_set_current(context_gl)) @@ -3155,25 +3154,6 @@ void wined3d_context_gl_destroy_bo(struct wined3d_context_gl *context_gl, struct bo->id = 0; }
-static void wined3d_context_gl_set_render_offscreen(struct wined3d_context_gl *context_gl, BOOL offscreen) -{ - if (context_gl->c.render_offscreen == offscreen) - return; - - context_invalidate_state(&context_gl->c, STATE_VIEWPORT); - context_invalidate_state(&context_gl->c, STATE_SCISSORRECT); - if (!context_gl->gl_info->supported[ARB_CLIP_CONTROL]) - { - context_invalidate_state(&context_gl->c, STATE_RASTERIZER); - context_invalidate_state(&context_gl->c, STATE_POINTSPRITECOORDORIGIN); - context_invalidate_state(&context_gl->c, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); - } - context_invalidate_state(&context_gl->c, STATE_SHADER(WINED3D_SHADER_TYPE_DOMAIN)); - if (context_gl->gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]) - context_invalidate_state(&context_gl->c, STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL)); - context_gl->c.render_offscreen = offscreen; -} - GLenum wined3d_context_gl_get_offscreen_gl_buffer(const struct wined3d_context_gl *context_gl) { return GL_COLOR_ATTACHMENT0; @@ -3525,9 +3505,6 @@ static uint32_t find_draw_buffers_mask(const struct wined3d_context_gl *context_ unsigned int rt_mask, mask; unsigned int i;
- if (!context_gl->c.render_offscreen) - return context_generate_rt_mask_from_resource(rts[0]->resource); - rt_mask = ps ? ps->reg_maps.rt_mask : 1; rt_mask &= wined3d_mask_from_size(gl_info->limits.buffers); if (state->blend_state && state->blend_state->dual_source) @@ -3590,50 +3567,40 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat { struct wined3d_context_gl *context_gl = wined3d_context_gl(context); uint32_t rt_mask = find_draw_buffers_mask(context_gl, state); + const struct wined3d_rendertarget_view_gl *view_gl; struct wined3d_rendertarget_info ds_info = {{0}}; const struct wined3d_fb_state *fb = &state->fb; DWORD color_location = 0; uint32_t *cur_mask;
- if (!context->render_offscreen) - { - wined3d_context_gl_apply_fbo_state(context_gl, GL_FRAMEBUFFER, NULL, &ds_info, - WINED3D_LOCATION_DRAWABLE, WINED3D_LOCATION_DRAWABLE); - } - else + memset(context_gl->blit_targets, 0, sizeof(context_gl->blit_targets)); + for (unsigned int i = 0; i < context_gl->gl_info->limits.buffers; ++i) { - const struct wined3d_rendertarget_view_gl *view_gl; - unsigned int i; - - memset(context_gl->blit_targets, 0, sizeof(context_gl->blit_targets)); - for (i = 0; i < context_gl->gl_info->limits.buffers; ++i) - { - if (!fb->render_targets[i]) - continue; - - view_gl = wined3d_rendertarget_view_gl(fb->render_targets[i]); - context_gl->blit_targets[i].gl_view = view_gl->gl_view; - context_gl->blit_targets[i].resource = view_gl->v.resource; - context_gl->blit_targets[i].sub_resource_idx = view_gl->v.sub_resource_idx; - context_gl->blit_targets[i].layer_count = view_gl->v.layer_count; + if (!fb->render_targets[i]) + continue;
- if (!color_location) - color_location = view_gl->v.resource->draw_binding; - } + view_gl = wined3d_rendertarget_view_gl(fb->render_targets[i]); + context_gl->blit_targets[i].gl_view = view_gl->gl_view; + context_gl->blit_targets[i].resource = view_gl->v.resource; + context_gl->blit_targets[i].sub_resource_idx = view_gl->v.sub_resource_idx; + context_gl->blit_targets[i].layer_count = view_gl->v.layer_count;
- if (fb->depth_stencil) - { - view_gl = wined3d_rendertarget_view_gl(fb->depth_stencil); - ds_info.gl_view = view_gl->gl_view; - ds_info.resource = view_gl->v.resource; - ds_info.sub_resource_idx = view_gl->v.sub_resource_idx; - ds_info.layer_count = view_gl->v.layer_count; - } + if (!color_location) + color_location = view_gl->v.resource->draw_binding; + }
- wined3d_context_gl_apply_fbo_state(context_gl, GL_FRAMEBUFFER, context_gl->blit_targets, &ds_info, - color_location, fb->depth_stencil ? fb->depth_stencil->resource->draw_binding : 0); + if (fb->depth_stencil) + { + view_gl = wined3d_rendertarget_view_gl(fb->depth_stencil); + ds_info.gl_view = view_gl->gl_view; + ds_info.resource = view_gl->v.resource; + ds_info.sub_resource_idx = view_gl->v.sub_resource_idx; + ds_info.layer_count = view_gl->v.layer_count; }
+ wined3d_context_gl_apply_fbo_state(context_gl, GL_FRAMEBUFFER, context_gl->blit_targets, &ds_info, + color_location, fb->depth_stencil ? fb->depth_stencil->resource->draw_binding : 0); + cur_mask = context_gl->current_fbo ? &context_gl->current_fbo->rt_mask : &context_gl->draw_buffers_mask; if (rt_mask != *cur_mask) { @@ -4236,8 +4203,6 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, FIXME("OpenGL implementation does not support framebuffers with no attachments.\n"); return FALSE; } - - wined3d_context_gl_set_render_offscreen(context_gl, TRUE); }
/* Preload resources before FBO setup. Texture preload in particular may @@ -4447,12 +4412,8 @@ static void wined3d_context_gl_pause_transform_feedback(struct wined3d_context_g static void wined3d_context_gl_setup_target(struct wined3d_context_gl *context_gl, struct wined3d_texture *texture, unsigned int sub_resource_idx) { - BOOL old_render_offscreen = context_gl->c.render_offscreen, render_offscreen; - - render_offscreen = wined3d_resource_is_offscreen(&texture->resource); if (context_gl->c.current_rt.texture == texture - && context_gl->c.current_rt.sub_resource_idx == sub_resource_idx - && render_offscreen == old_render_offscreen) + && context_gl->c.current_rt.sub_resource_idx == sub_resource_idx) return;
/* To compensate the lack of format switching with some offscreen rendering methods and on onscreen buffers @@ -4477,7 +4438,6 @@ static void wined3d_context_gl_setup_target(struct wined3d_context_gl *context_g
context_gl->c.current_rt.texture = texture; context_gl->c.current_rt.sub_resource_idx = sub_resource_idx; - wined3d_context_gl_set_render_offscreen(context_gl, render_offscreen); }
static void wined3d_context_gl_activate(struct wined3d_context_gl *context_gl, @@ -5156,12 +5116,11 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
if ((dsv = fb->depth_stencil)) { - /* Note that this depends on the context_acquire() call above to set - * context->render_offscreen properly. We don't currently take the - * Z-compare function into account, but we could skip loading the - * depthstencil for D3DCMP_NEVER and D3DCMP_ALWAYS as well. Also note - * that we never copy the stencil data.*/ - DWORD location = context->render_offscreen ? dsv->resource->draw_binding : WINED3D_LOCATION_DRAWABLE; + /* We don't currently take the Z-compare function into account, + * but we could skip loading the depthstencil for D3DCMP_NEVER and + * D3DCMP_ALWAYS as well. + * Also note that we never copy the stencil data. */ + uint32_t location = dsv->resource->draw_binding;
if (wined3d_state_uses_depth_buffer(state)) wined3d_rendertarget_view_load_location(dsv, context, location); @@ -5181,7 +5140,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
if (dsv && (!state->depth_stencil_state || state->depth_stencil_state->writes_ds)) { - DWORD location = context->render_offscreen ? dsv->resource->draw_binding : WINED3D_LOCATION_DRAWABLE; + uint32_t location = dsv->resource->draw_binding;
wined3d_rendertarget_view_validate_location(dsv, location); wined3d_rendertarget_view_invalidate_location(dsv, ~location); diff --git a/dlls/wined3d/ffp_gl.c b/dlls/wined3d/ffp_gl.c index 8af67fc12df..85c672972ae 100644 --- a/dlls/wined3d/ffp_gl.c +++ b/dlls/wined3d/ffp_gl.c @@ -360,8 +360,7 @@ static BOOL is_blend_enabled(struct wined3d_context *context, const struct wined /* Disable blending in all cases even without pixel shaders. * With blending on we could face a big performance penalty. * The d3d9 visual test confirms the behavior. */ - if (context->render_offscreen - && !(state->fb.render_targets[index]->format_caps & WINED3D_FORMAT_CAP_POSTPIXELSHADER_BLENDING)) + if (!(state->fb.render_targets[index]->format_caps & WINED3D_FORMAT_CAP_POSTPIXELSHADER_BLENDING)) return FALSE;
return TRUE; @@ -3675,43 +3674,9 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine } }
-static void get_viewports(struct wined3d_context *context, const struct wined3d_state *state, - unsigned int viewport_count, struct wined3d_viewport *viewports) -{ - const struct wined3d_rendertarget_view *depth_stencil = state->fb.depth_stencil; - const struct wined3d_rendertarget_view *target = state->fb.render_targets[0]; - unsigned int width, height, i; - - for (i = 0; i < viewport_count; ++i) - viewports[i] = state->viewports[i]; - - /* Note: GL uses a lower left origin while DirectX uses upper left. This - * is reversed when using offscreen rendering. */ - if (context->render_offscreen) - return; - - if (target) - { - wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); - } - else if (depth_stencil) - { - height = depth_stencil->height; - } - else - { - FIXME("Could not get the height of render targets.\n"); - return; - } - - for (i = 0; i < viewport_count; ++i) - viewports[i].y = height - (viewports[i].y + viewports[i].height); -} - static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; - struct wined3d_viewport vp[WINED3D_MAX_VIEWPORTS]; float min_z, max_z;
if (gl_info->supported[ARB_VIEWPORT_ARRAY]) @@ -3721,17 +3686,16 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
unsigned int i, reset_count = 0;
- get_viewports(context, state, state->viewport_count, vp); for (i = 0; i < state->viewport_count; ++i) { - wined3d_viewport_get_z_range(&vp[i], &min_z, &max_z); + wined3d_viewport_get_z_range(&state->viewports[i], &min_z, &max_z); depth_ranges[i * 2] = min_z; depth_ranges[i * 2 + 1] = max_z;
- viewports[i * 4] = vp[i].x; - viewports[i * 4 + 1] = vp[i].y; - viewports[i * 4 + 2] = vp[i].width; - viewports[i * 4 + 3] = vp[i].height; + viewports[i * 4] = state->viewports[i].x; + viewports[i * 4 + 1] = state->viewports[i].y; + viewports[i * 4 + 2] = state->viewports[i].width; + viewports[i * 4 + 3] = state->viewports[i].height;
/* Don't pass fractionals to GL if we earlier decided not to use * this functionality for two reasons: First, GL might offer us @@ -3765,10 +3729,10 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine } else { - get_viewports(context, state, 1, vp); - wined3d_viewport_get_z_range(&vp[0], &min_z, &max_z); + wined3d_viewport_get_z_range(&state->viewports[0], &min_z, &max_z); gl_info->gl_ops.gl.p_glDepthRange(min_z, max_z); - gl_info->gl_ops.gl.p_glViewport(vp[0].x, vp[0].y, vp[0].width, vp[0].height); + gl_info->gl_ops.gl.p_glViewport(state->viewports[0].x, state->viewports[0].y, + state->viewports[0].width, state->viewports[0].height); } checkGLcall("setting clip space and viewport"); } @@ -3780,27 +3744,25 @@ static void viewport_miscpart_cc(struct wined3d_context *context, /* See get_projection_matrix() in utils.c for a discussion about those values. */ float pixel_center_offset = context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f; - struct wined3d_viewport vp[WINED3D_MAX_VIEWPORTS]; GLdouble depth_ranges[2 * WINED3D_MAX_VIEWPORTS]; GLfloat viewports[4 * WINED3D_MAX_VIEWPORTS]; unsigned int i, reset_count = 0; float min_z, max_z;
pixel_center_offset += context->d3d_info->filling_convention_offset / 2.0f; - get_viewports(context, state, state->viewport_count, vp);
- GL_EXTCALL(glClipControl(context->render_offscreen ? GL_UPPER_LEFT : GL_LOWER_LEFT, GL_ZERO_TO_ONE)); + GL_EXTCALL(glClipControl(GL_UPPER_LEFT, GL_ZERO_TO_ONE));
for (i = 0; i < state->viewport_count; ++i) { - wined3d_viewport_get_z_range(&vp[i], &min_z, &max_z); + wined3d_viewport_get_z_range(&state->viewports[i], &min_z, &max_z); depth_ranges[i * 2] = min_z; depth_ranges[i * 2 + 1] = max_z;
- viewports[i * 4] = vp[i].x + pixel_center_offset; - viewports[i * 4 + 1] = vp[i].y + pixel_center_offset; - viewports[i * 4 + 2] = vp[i].width; - viewports[i * 4 + 3] = vp[i].height; + viewports[i * 4] = state->viewports[i].x + pixel_center_offset; + viewports[i * 4 + 1] = state->viewports[i].y + pixel_center_offset; + viewports[i * 4 + 2] = state->viewports[i].width; + viewports[i * 4 + 3] = state->viewports[i].height; }
if (context->viewport_count > state->viewport_count) @@ -3937,21 +3899,12 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s static void scissorrect(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; - unsigned int height = 0; const RECT *r;
/* Warning: glScissor uses window coordinates, not viewport coordinates, * so our viewport correction does not apply. Warning2: Even in windowed * mode the coords are relative to the window, not the screen. */
- if (!context->render_offscreen) - { - const struct wined3d_rendertarget_view *target = state->fb.render_targets[0]; - unsigned int width; - - wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); - } - if (gl_info->supported[ARB_VIEWPORT_ARRAY]) { GLint sr[4 * WINED3D_MAX_VIEWPORTS]; @@ -3962,7 +3915,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st r = &state->scissor_rects[i];
sr[i * 4] = r->left; - sr[i * 4 + 1] = height ? height - r->top : r->top; + sr[i * 4 + 1] = r->top; sr[i * 4 + 2] = r->right - r->left; sr[i * 4 + 3] = r->bottom - r->top; } @@ -3980,8 +3933,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st else { r = &state->scissor_rects[0]; - gl_info->gl_ops.gl.p_glScissor(r->left, height ? height - r->top : r->top, - r->right - r->left, r->bottom - r->top); + gl_info->gl_ops.gl.p_glScissor(r->left, r->top, r->right - r->left, r->bottom - r->top); checkGLcall("glScissor"); } } @@ -4030,13 +3982,11 @@ static void rasterizer(struct wined3d_context *context, const struct wined3d_sta { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; const struct wined3d_rasterizer_state *r = state->rasterizer_state; - GLenum mode;
- mode = r && r->desc.front_ccw ? GL_CCW : GL_CW; - if (context->render_offscreen) - mode = (mode == GL_CW) ? GL_CCW : GL_CW; - - gl_info->gl_ops.gl.p_glFrontFace(mode); + /* Rendering without ARB_clip_control requires flipping position manually. + * This also means that all primitives will be backwards, so we need to + * also swap which side is the front face. */ + gl_info->gl_ops.gl.p_glFrontFace(r && r->desc.front_ccw ? GL_CW : GL_CCW); checkGLcall("glFrontFace"); depthbias(context, state); fillmode(r, gl_info); @@ -4078,9 +4028,8 @@ static void psorigin_w(struct wined3d_context *context, const struct wined3d_sta static void psorigin(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; - GLint origin = context->render_offscreen ? GL_LOWER_LEFT : GL_UPPER_LEFT;
- GL_EXTCALL(glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, origin)); + GL_EXTCALL(glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT)); checkGLcall("glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, ...)"); }
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 21006d3cf46..08e7d359bf6 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1923,8 +1923,8 @@ static void shader_glsl_load_constants(struct shader_glsl_priv *priv, const struct wined3d_vec4 correction_params = { /* Position is relative to the framebuffer, not the viewport. */ - context->render_offscreen ? 0.0f : (float)state->fb.render_targets[0]->height, - context->render_offscreen ? 1.0f : -1.0f, + 0.0f, + 1.0f, 0.0f, 0.0f, }; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index a5dabc1f344..2b78c2df150 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2762,7 +2762,7 @@ void find_ds_compile_args(const struct wined3d_state *state, const struct wined3 : pixel_shader ? pixel_shader->limits->packed_input : shader->limits->packed_output; args->next_shader_type = geometry_shader ? WINED3D_SHADER_TYPE_GEOMETRY : WINED3D_SHADER_TYPE_PIXEL;
- args->render_offscreen = context->render_offscreen; + args->render_offscreen = 1;
init_interpolation_compile_args(args->interpolation_mode, args->next_shader_type == WINED3D_SHADER_TYPE_PIXEL ? pixel_shader : NULL, context->d3d_info); @@ -3056,7 +3056,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 if (d3d_info->emulated_flatshading) args->flatshading = state->render_states[WINED3D_RS_SHADEMODE] == WINED3D_SHADE_FLAT;
- args->y_correction = (shader->reg_maps.vpos && d3d_info->frag_coord_correction) ? !context->render_offscreen : 0; + args->y_correction = 0;
for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i) { diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 8af50fbbf06..c0695762795 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -5658,7 +5658,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w ERR("Did not expect to enter this codepath without WINED3D_PIXEL_CENTER_INTEGER.\n");
clip_control = d3d_info->clip_control; - flip = !clip_control && context->render_offscreen; + flip = !clip_control; if (!clip_control) center_offset = 1.0f + d3d_info->filling_convention_offset; else diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 83bc6a95efd..a28255e2d1d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -230,7 +230,6 @@ struct wined3d_d3d_info uint32_t vs_clipping : 1; uint32_t shader_double_precision : 1; uint32_t shader_output_interpolation : 1; - uint32_t frag_coord_correction : 1; uint32_t viewport_array_index_any_shader : 1; uint32_t stencil_export : 1; uint32_t texture_npot : 1; @@ -1957,7 +1956,6 @@ struct wined3d_context DWORD transform_feedback_active : 1; DWORD transform_feedback_paused : 1; DWORD fog_coord : 1; - DWORD render_offscreen : 1; DWORD current : 1; DWORD destroyed : 1; DWORD destroy_delayed : 1; @@ -1965,7 +1963,7 @@ struct wined3d_context DWORD update_primitive_type : 1; DWORD update_patch_vertex_count : 1; DWORD update_multisample_state : 1; - DWORD padding : 2; + DWORD padding : 3;
DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
@@ -4403,12 +4401,6 @@ static inline void shader_get_position_fixup(const struct wined3d_context *conte } position_fixup[4 * i + 2] = (center_offset + x) / state->viewports[i].width; position_fixup[4 * i + 3] = -(center_offset + y) / state->viewports[i].height; - - if (context->render_offscreen) - { - position_fixup[4 * i + 1] *= -1.0f; - position_fixup[4 * i + 3] *= -1.0f; - } } }