diff options
Diffstat (limited to 'src/gallium/state_trackers/d3d1x')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp index 2bf001261eb..e3329e4d5d3 100644 --- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp @@ -1162,7 +1162,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX if(1) { unsigned blit_x, blit_y, blit_w, blit_h; - float black[4] = {0, 0, 0, 0}; + static const union pipe_color_union black; if(!formats_compatible || src->width0 != dst_w || src->height0 != dst_h) { struct pipe_surface templat; @@ -1205,9 +1205,9 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX } if(blit_x) - pipe->clear_render_target(pipe, dst_surface, black, rect.left, rect.top, blit_x, dst_h); + pipe->clear_render_target(pipe, dst_surface, &black, rect.left, rect.top, blit_x, dst_h); if(blit_y) - pipe->clear_render_target(pipe, dst_surface, black, rect.left, rect.top, dst_w, blit_y); + pipe->clear_render_target(pipe, dst_surface, &black, rect.left, rect.top, dst_w, blit_y); if(formats_compatible && blit_w == src->width0 && blit_h == src->height0) { @@ -1226,9 +1226,9 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX } if(blit_w != dst_w) - pipe->clear_render_target(pipe, dst_surface, black, rect.left + blit_x + blit_w, rect.top, dst_w - blit_x - blit_w, dst_h); + pipe->clear_render_target(pipe, dst_surface, &black, rect.left + blit_x + blit_w, rect.top, dst_w - blit_x - blit_w, dst_h); if(blit_h != dst_h) - pipe->clear_render_target(pipe, dst_surface, black, rect.left, rect.top + blit_y + blit_h, dst_w, dst_h - blit_y - blit_h); + pipe->clear_render_target(pipe, dst_surface, &black, rect.left, rect.top + blit_y + blit_h, dst_w, dst_h - blit_y - blit_h); } if(dst_surface) diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h index d43fdeab963..fcb82a19624 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h @@ -1594,7 +1594,12 @@ changed: { SYNCHRONIZED; GalliumD3D11RenderTargetView* view = ((GalliumD3D11RenderTargetView*)render_target_view); - pipe->clear_render_target(pipe, view->object, color, 0, 0, view->object->width, view->object->height); + union pipe_color_union cc; + cc.f[0] = color[0]; + cc.f[1] = color[1]; + cc.f[2] = color[2]; + cc.f[3] = color[3]; + pipe->clear_render_target(pipe, view->object, &cc, 0, 0, view->object->width, view->object->height); } virtual void STDMETHODCALLTYPE ClearDepthStencilView( |