VERSION | 2 debian/changelog | 6 debian/patches/01_hurd.diff | 20 + debian/patches/series | 1 docs/relnotes/10.0.2.html | 158 ++++++++++++++ include/GL/glx.h | 1 include/HaikuGL/GLRenderer.h | 76 +++++++ include/HaikuGL/GLView.h | 193 ++++++++++++++++++ include/HaikuGL/OpenGLKit.h | 10 include/HaikuGL/README | 28 ++ include/pci_ids/r600_pci_ids.h | 2 src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 5 src/gallium/drivers/llvmpipe/lp_state_sampler.c | 6 src/gallium/drivers/nouveau/nv50/nv50_context.c | 2 src/gallium/drivers/r600/evergreen_compute.c | 22 +- src/gallium/drivers/r600/evergreen_compute_internal.h | 4 src/gallium/drivers/r600/r600_pipe.c | 2 src/gallium/drivers/r600/sb/sb_bc_finalize.cpp | 16 + src/gallium/drivers/radeon/radeon_llvm_util.c | 16 - src/gallium/drivers/radeon/radeon_llvm_util.h | 9 src/gallium/drivers/radeonsi/radeonsi_compute.c | 13 - src/gallium/state_trackers/clover/llvm/invocation.cpp | 1 src/gallium/state_trackers/vdpau/device.c | 1 src/glsl/ast_function.cpp | 2 src/glsl/glcpp/glcpp-parse.y | 23 ++ src/glsl/glcpp/glcpp.h | 1 src/glsl/glcpp/tests/118-multiple-else.c | 6 src/glsl/glcpp/tests/118-multiple-else.c.expected | 8 src/glsl/glcpp/tests/119-elif-after-else.c | 6 src/glsl/glcpp/tests/119-elif-after-else.c.expected | 8 src/glsl/ir_clone.cpp | 3 src/glsl/ir_hv_accept.cpp | 6 src/glsl/ir_variable_refcount.cpp | 21 + src/glsl/ir_variable_refcount.h | 1 src/glsl/loop_controls.cpp | 2 src/mesa/drivers/dri/common/dri_util.c | 11 - src/mesa/drivers/dri/common/dri_util.h | 3 src/mesa/drivers/dri/i915/i830_context.c | 3 src/mesa/drivers/dri/i915/i830_context.h | 1 src/mesa/drivers/dri/i915/i915_context.c | 3 src/mesa/drivers/dri/i915/i915_context.h | 1 src/mesa/drivers/dri/i915/i915_fragprog.c | 1 src/mesa/drivers/dri/i915/intel_context.c | 1 src/mesa/drivers/dri/i915/intel_context.h | 1 src/mesa/drivers/dri/i915/intel_screen.c | 10 src/mesa/drivers/dri/i965/brw_context.c | 2 src/mesa/drivers/dri/i965/gen6_blorp.cpp | 15 + src/mesa/drivers/dri/i965/gen7_urb.c | 2 src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 src/mesa/drivers/dri/r200/r200_context.c | 2 src/mesa/drivers/dri/radeon/radeon_context.c | 2 src/mesa/drivers/dri/swrast/swrast.c | 2 src/mesa/main/clear.c | 31 ++ src/mesa/main/condrender.c | 4 src/mesa/state_tracker/st_atom_texture.c | 2 src/mesa/state_tracker/st_cb_clear.c | 34 --- 56 files changed, 738 insertions(+), 76 deletions(-)
New commits: commit e4ea2973f5273e5da9943794fb149c7fb4be56fd Author: Julien Cristau <jcris...@debian.org> Date: Sat Jan 25 10:44:28 2014 +0100 Upload to experimental diff --git a/debian/changelog b/debian/changelog index c1d28e7..94224fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mesa (10.0.2-1) UNRELEASED; urgency=low +mesa (10.0.2-1) experimental; urgency=low [ Maarten Lankhorst ] * Stop building libgl1-mesa-dri-experimental (Closes: #685104). @@ -11,7 +11,7 @@ mesa (10.0.2-1) UNRELEASED; urgency=low * ... and attempt to fix FTBFS on hurd. * New upstream stable release. - -- Julien Cristau <jcris...@debian.org> Sat, 25 Jan 2014 10:43:57 +0100 + -- Julien Cristau <jcris...@debian.org> Sat, 25 Jan 2014 10:44:22 +0100 mesa (10.0.1-1) experimental; urgency=low commit a371d3f909002e09e0e212f74d448a9e4e271034 Author: Julien Cristau <jcris...@debian.org> Date: Sat Jan 25 10:44:17 2014 +0100 Bump changelog diff --git a/debian/changelog b/debian/changelog index 1811a58..c1d28e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mesa (10.0.1-2) UNRELEASED; urgency=low +mesa (10.0.2-1) UNRELEASED; urgency=low [ Maarten Lankhorst ] * Stop building libgl1-mesa-dri-experimental (Closes: #685104). @@ -9,8 +9,9 @@ mesa (10.0.1-2) UNRELEASED; urgency=low [ Julien Cristau ] * Fix FTBFS on kfreebsd. * ... and attempt to fix FTBFS on hurd. + * New upstream stable release. - -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 19 Dec 2013 12:52:05 +0100 + -- Julien Cristau <jcris...@debian.org> Sat, 25 Jan 2014 10:43:57 +0100 mesa (10.0.1-1) experimental; urgency=low commit 8ff0c0529a953d620c0daef9dc1d90df59218bcd Author: Julien Cristau <jcris...@debian.org> Date: Sat Jan 25 10:05:27 2014 +0100 Attempt to fix FTBFS on hurd. diff --git a/debian/changelog b/debian/changelog index bdec0ca..1811a58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ mesa (10.0.1-2) UNRELEASED; urgency=low [ Julien Cristau ] * Fix FTBFS on kfreebsd. + * ... and attempt to fix FTBFS on hurd. -- Maarten Lankhorst <maarten.lankho...@ubuntu.com> Thu, 19 Dec 2013 12:52:05 +0100 diff --git a/debian/patches/01_hurd.diff b/debian/patches/01_hurd.diff new file mode 100644 index 0000000..5d64cdf --- /dev/null +++ b/debian/patches/01_hurd.diff @@ -0,0 +1,20 @@ +diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c +index b50a202..95560cb 100644 +--- a/src/glx/dri2_query_renderer.c ++++ b/src/glx/dri2_query_renderer.c +@@ -20,6 +20,9 @@ + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ ++ ++#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) ++ + #include "glxclient.h" + #include "glx_error.h" + #include "xf86drm.h" +@@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute, + + return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value); + } ++ ++#endif /* GLX_DIRECT_RENDERING */ diff --git a/debian/patches/series b/debian/patches/series index 70b9414..327e298 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +01_hurd.diff 02_gbm_no_undefined.diff 04_osmesa_version.diff commit 108e50c3bc6b7c92f4f0086399d0619dc7a70456 Author: Carl Worth <cwo...@cworth.org> Date: Thu Jan 9 11:49:28 2014 -0800 docs: Add release notes for 10.0.2 release. Which will happen today. diff --git a/docs/relnotes/10.0.2.html b/docs/relnotes/10.0.2.html new file mode 100644 index 0000000..7ff1968 --- /dev/null +++ b/docs/relnotes/10.0.2.html @@ -0,0 +1,158 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>Mesa Release Notes</title> + <link rel="stylesheet" type="text/css" href="../mesa.css"> +</head> +<body> + +<div class="header"> + <h1>The Mesa 3D Graphics Library</h1> +</div> + +<iframe src="../contents.html"></iframe> +<div class="content"> + +<h1>Mesa 10.0.2 Release Notes / (January 9, 2014)</h1> + +<p> +Mesa 10.0.2 is a bug fix release which fixes bugs found since the 10.0.1 release. +</p> +<p> +Mesa 10.0.2 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is <strong>only</strong> available if requested at context creation +because compatibility contexts not supported. +</p> + + +<h2>MD5 checksums</h2> +<pre> +</pre> + + +<h2>New features</h2> +<p>None</p> + +<h2>Bug fixes</h2> + +<p>This list is likely incomplete.</p> + +<ul> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70740">Bug 70740</a> - HiZ on SNB causes GPU hang with WebGL web app</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72026">Bug 72026</a> - SIGSEGV in fs_visitor::visit(ir_dereference_variable*)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72264">Bug 72264</a> - GLSL error reporting</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72369">Bug 72369</a> - glitches in serious sam 3 with the sb shader backend</li> + +</ul> + +<h2>Changes</h2> + +<p>The full set of changes can be viewed by using the following git command:</p> + +<pre> + git log mesa-10.0.1..mesa-10.0.2 +</pre> + +<p>Aaron Watry (8):</p> +<ul> + <li>clover: Remove unused variable</li> + <li>pipe_loader/sw: close dev->lib when initialization fails</li> + <li>radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcode</li> + <li>r600/compute: Free compiled kernels when deleting compute state</li> + <li>r600/compute: Use the correct FREE macro when deleting compute state</li> + <li>radeon/llvm: Free target data at end of optimization</li> + <li>st/vdpau: Destroy context when initialization fails</li> + <li>r600/pipe: Stop leaking context->start_compute_cs_cmd.buf on EG/CM</li> +</ul> + +<p>Alex Deucher (1):</p> +<ul> + <li>r600g: fix SUMO2 pci id</li> +</ul> + +<p>Alexander von Gluck IV (1):</p> +<ul> + <li>Haiku: Add in public GL kit headers</li> +</ul> + +<p>Anuj Phogat (1):</p> +<ul> + <li>mesa: Fix error code generation in glBeginConditionalRender()</li> +</ul> + +<p>Carl Worth (2):</p> +<ul> + <li>docs: Add md5sums for the 10.0.1 release.</li> + <li>Update version to 10.0.2</li> +</ul> + +<p>Chad Versace (1):</p> +<ul> + <li>i965/gen6: Fix HiZ hang in WebGL Google Maps</li> +</ul> + +<p>Erik Faye-Lund (1):</p> +<ul> + <li>glcpp: error on multiple #else/#elif directives</li> +</ul> + +<p>Henri Verbeet (1):</p> +<ul> + <li>i915: Add support for gl_FragData[0] reads.</li> +</ul> + +<p>Ilia Mirkin (1):</p> +<ul> + <li>nv50: fix a small leak on context destroy</li> +</ul> + +<p>Jonathan Liu (2):</p> +<ul> + <li>st/mesa: use pipe_sampler_view_release()</li> + <li>llvmpipe: use pipe_sampler_view_release() to avoid segfault</li> +</ul> + +<p>Kenneth Graunke (2):</p> +<ul> + <li>i965: Fix 3DSTATE_PUSH_CONSTANT_ALLOC_PS packet creation.</li> + <li>Revert "mesa: Remove GLXContextID typedef from glx.h."</li> +</ul> + +<p>Kevin Rogovin (1):</p> +<ul> + <li>Use line number information from entire function expression</li> +</ul> + +<p>Kristian Høgsberg (1):</p> +<ul> + <li>dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context</li> +</ul> + +<p>Marek Olšák (2):</p> +<ul> + <li>mesa: fix interpretation of glClearBuffer(drawbuffer)</li> + <li>st/mesa: fix glClear with multiple colorbuffers and different formats</li> +</ul> + +<p>Paul Berry (2):</p> +<ul> + <li>glsl: Teach ir_variable_refcount about ir_loop::counter variables.</li> + <li>glsl: Fix inconsistent assumptions about ir_loop::counter.</li> +</ul> + +<p>Vadim Girlin (1):</p> +<ul> + <li>r600g/sb: fix stack size computation on evergreen</li> +</ul> + +</div> +</body> +</html> commit 44dfcf6e88fefcfd6b0c237e17bf165070188e00 Author: Carl Worth <cwo...@cworth.org> Date: Thu Jan 9 11:45:18 2014 -0800 Update version to 10.0.2 In preparation for the upcoming 10.0.2 release. diff --git a/VERSION b/VERSION index 1532420..7e2df97 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.0.1 +10.0.2 commit e833368e04fd4e73a74852854993bebe0f076c87 Author: Alexander von Gluck IV <kallis...@unixzen.com> Date: Sat Dec 14 11:46:05 2013 -0600 Haiku: Add in public GL kit headers * These make up the base of what C++ GL Haiku applications use for 3D rendering. * Not placed in includes/GL to prevent Haiku headers from getting installed on non-Haiku systems. Acked-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 56d920a5c1b64868e77a97604c01d3a63916a6ca) diff --git a/include/HaikuGL/GLRenderer.h b/include/HaikuGL/GLRenderer.h new file mode 100644 index 0000000..7ffcc34 --- /dev/null +++ b/include/HaikuGL/GLRenderer.h @@ -0,0 +1,76 @@ +/* + * Copyright 2006, Philippe Houdoin. All rights reserved. + * Distributed under the terms of the MIT License. + + * This header defines BGLRenderer, the base class making up + * the Haiku GL renderer add-ons (essentially selfcontained C++ + * shared libraries that do the actual rendering such as + * libswpipe.so and libswrast.so) + */ +#ifndef GLRENDERER_H +#define GLRENDERER_H + + +#include <BeBuild.h> +#include <GLView.h> + + +class BGLDispatcher; +class GLRendererRoster; + +typedef unsigned long renderer_id; + +class BGLRenderer +{ + // Private unimplemented copy constructors + BGLRenderer(const BGLRenderer &); + BGLRenderer & operator=(const BGLRenderer &); + +public: + BGLRenderer(BGLView *view, ulong bgl_options, + BGLDispatcher *dispatcher); + virtual ~BGLRenderer(); + + void Acquire(); + void Release(); + + virtual void LockGL(); + virtual void UnlockGL(); + + virtual void SwapBuffers(bool VSync = false); + virtual void Draw(BRect updateRect); + virtual status_t CopyPixelsOut(BPoint source, BBitmap *dest); + virtual status_t CopyPixelsIn(BBitmap *source, BPoint dest); + + virtual void FrameResized(float width, float height); + + virtual void DirectConnected(direct_buffer_info *info); + virtual void EnableDirectMode(bool enabled); + + inline int32 ReferenceCount() const { return fRefCount; }; + inline ulong Options() const { return fOptions; }; + inline BGLView* GLView() { return fView; }; + inline BGLDispatcher* GLDispatcher() { return fDispatcher; }; + +private: + friend class GLRendererRoster; + + virtual status_t _Reserved_Renderer_0(int32, void *); + virtual status_t _Reserved_Renderer_1(int32, void *); + virtual status_t _Reserved_Renderer_2(int32, void *); + virtual status_t _Reserved_Renderer_3(int32, void *); + virtual status_t _Reserved_Renderer_4(int32, void *); + + volatile int32 fRefCount; // How much we're still usefull? + BGLView* fView; // Never forget who is the boss! + ulong fOptions; // Keep that tune in memory + BGLDispatcher* fDispatcher;// Our personal GL API call dispatcher + + GLRendererRoster* fOwningRoster; + renderer_id fID; +}; + +extern "C" _EXPORT BGLRenderer* instantiate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher); + + +#endif // GLRENDERER_H diff --git a/include/HaikuGL/GLView.h b/include/HaikuGL/GLView.h new file mode 100644 index 0000000..b848578 --- /dev/null +++ b/include/HaikuGL/GLView.h @@ -0,0 +1,193 @@ +/* + * Copyright 2008-2013, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * This header defines BGLView, the base class making up + * the Haiku GL Kit. + * + */ +#ifndef BGLVIEW_H +#define BGLVIEW_H + + +#include <GL/gl.h> + +#define BGL_RGB 0 +#define BGL_INDEX 1 +#define BGL_SINGLE 0 +#define BGL_DOUBLE 2 +#define BGL_DIRECT 0 +#define BGL_INDIRECT 4 +#define BGL_ACCUM 8 +#define BGL_ALPHA 16 +#define BGL_DEPTH 32 +#define BGL_OVERLAY 64 +#define BGL_UNDERLAY 128 +#define BGL_STENCIL 512 + +#ifdef __cplusplus + +#include <AppKit.h> +#include <Bitmap.h> +#include <DirectWindow.h> +#include <View.h> +#include <Window.h> +#include <WindowScreen.h> + + +struct glview_direct_info; +class BGLRenderer; +class GLRendererRoster; + +class BGLView : public BView { +public: + BGLView(BRect rect, const char* name, + ulong resizingMode, ulong mode, + ulong options); + virtual ~BGLView(); + + void LockGL(); + void UnlockGL(); + void SwapBuffers(); + void SwapBuffers(bool vSync); + + BView* EmbeddedView(); // deprecated, returns NULL + void* GetGLProcAddress(const char* procName); + + status_t CopyPixelsOut(BPoint source, BBitmap *dest); + status_t CopyPixelsIn(BBitmap *source, BPoint dest); + + // Mesa's GLenum is uint where Be's ones was ulong! + virtual void ErrorCallback(unsigned long errorCode); + + virtual void Draw(BRect updateRect); + virtual void AttachedToWindow(); + virtual void AllAttached(); + virtual void DetachedFromWindow(); + virtual void AllDetached(); + + virtual void FrameResized(float newWidth, float newHeight); + virtual status_t Perform(perform_code d, void *arg); + + virtual status_t Archive(BMessage *data, bool deep = true) const; + + virtual void MessageReceived(BMessage *message); + virtual void SetResizingMode(uint32 mode); + + virtual void Show(); + virtual void Hide(); + + virtual BHandler* ResolveSpecifier(BMessage *msg, int32 index, + BMessage *specifier, int32 form, + const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + + void DirectConnected(direct_buffer_info *info); + void EnableDirectMode(bool enabled); + + void* getGC() { return fGc; } // ??? + + virtual void GetPreferredSize(float* width, float* height); + +private: + + virtual void _ReservedGLView1(); + virtual void _ReservedGLView2(); + virtual void _ReservedGLView3(); + virtual void _ReservedGLView4(); + virtual void _ReservedGLView5(); + virtual void _ReservedGLView6(); + virtual void _ReservedGLView7(); + virtual void _ReservedGLView8(); + + BGLView(const BGLView &); + BGLView &operator=(const BGLView &); + + void _DitherFront(); + bool _ConfirmDither(); + void _Draw(BRect rect); + void _CallDirectConnected(); + + void* fGc; + uint32 fOptions; + uint32 fDitherCount; + BLocker fDrawLock; + BLocker fDisplayLock; + glview_direct_info* fClipInfo; + + BGLRenderer* fRenderer; + GLRendererRoster* fRoster; + + BBitmap* fDitherMap; + BRect fBounds; + int16* fErrorBuffer[2]; + uint64 _reserved[8]; + + void _LockDraw(); + void _UnlockDraw(); + +// BeOS compatibility +private: + BGLView(BRect rect, char* name, + ulong resizingMode, ulong mode, + ulong options); +}; + + +class BGLScreen : public BWindowScreen { +public: + BGLScreen(char* name, + ulong screenMode, ulong options, + status_t *error, bool debug=false); + ~BGLScreen(); + + void LockGL(); + void UnlockGL(); + void SwapBuffers(); + // Mesa's GLenum is uint where Be's ones was ulong! + virtual void ErrorCallback(unsigned long errorCode); + + virtual void ScreenConnected(bool connected); + virtual void FrameResized(float width, float height); + virtual status_t Perform(perform_code code, void *arg); + + virtual status_t Archive(BMessage *data, bool deep = true) const; + virtual void MessageReceived(BMessage *message); + + virtual void Show(); + virtual void Hide(); + + virtual BHandler* ResolveSpecifier(BMessage *message, + int32 index, + BMessage *specifier, + int32 form, + const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + +private: + + virtual void _ReservedGLScreen1(); + virtual void _ReservedGLScreen2(); + virtual void _ReservedGLScreen3(); + virtual void _ReservedGLScreen4(); + virtual void _ReservedGLScreen5(); + virtual void _ReservedGLScreen6(); + virtual void _ReservedGLScreen7(); + virtual void _ReservedGLScreen8(); + + BGLScreen(const BGLScreen &); + BGLScreen &operator=(const BGLScreen &); + + void* fGc; + long fOptions; + BLocker fDrawLock; + + int32 fColorSpace; + uint32 fScreenMode; + + uint64 _reserved[7]; +}; + +#endif // __cplusplus + +#endif // BGLVIEW_H diff --git a/include/HaikuGL/OpenGLKit.h b/include/HaikuGL/OpenGLKit.h new file mode 100644 index 0000000..f482871 --- /dev/null +++ b/include/HaikuGL/OpenGLKit.h @@ -0,0 +1,10 @@ +/* + * Master include file for the Haiku OpenGL Kit. + */ + +#include <GL/gl.h> +#include <GLView.h> + +// Projects needing GL/glu.h and GL/glut.h should now +// include these headers independently as glu and glut +// are no longe core parts of mesa diff --git a/include/HaikuGL/README b/include/HaikuGL/README new file mode 100644 index 0000000..0f8503f --- /dev/null +++ b/include/HaikuGL/README @@ -0,0 +1,28 @@ +These headers make up the Haiku Op*nGL kit. + +Headers in this directory preserve some BeOS™ compatibility +compatibility, so changes should be mentioned to the Haiku +project mailing list. + +http://haiku-os.org + +Normal Haiku Op*enGL layout: + + * headers/os/OpenGLKit.h + * headers/os/opengl/GLView.h + * headers/os/opengl/GLRenderer.h + * headers/os/opengl/GL/gl.h + * headers/os/opengl/GL/gl_mangle.h + * headers/os/opengl/GL/glext.h + * headers/os/opengl/GL/osmesa.h (needed?) + +Extras: + + * headers/os/opengl/GL/glu.h + * headers/os/opengl/GL/glut.h + +OpenGL™ is a trademark of SGI. The usage of this trademark +in the Haiku GL Kit is not a sign of any certification or +endorsement by SGI or its affiliates. Usage is purely to +allow legacy compatibility with the BeOS™ and its 3D GL +rendering subsystem. commit 3efc2bbf075dc9f828fe87167eef1d2bf862f7aa Author: Ilia Mirkin <imir...@alum.mit.edu> Date: Fri Nov 29 04:36:41 2013 -0500 nv50: fix a small leak on context destroy Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> (cherry picked from commit f50a45452a4fd4f7cece8fe37c394edac0808136) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index b6bdf79..11afc48 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c @@ -114,6 +114,8 @@ nv50_destroy(struct pipe_context *pipe) draw_destroy(nv50->draw); #endif + FREE(nv50->blit); + nouveau_context_destroy(&nv50->base); } commit d46a58703ad9321614e701c909455f5f2aeff18e Author: Paul Berry <stereotype...@gmail.com> Date: Tue Nov 26 14:19:49 2013 -0800 glsl: Fix inconsistent assumptions about ir_loop::counter. The compiler back-ends (i965's fs_visitor and brw_visitor, ir_to_mesa_visitor, and glsl_to_tgsi_visitor) assume that when ir_loop::counter is non-null, it points to a fresh ir_variable that should be used as the loop counter (as opposed to an ir_variable that exists elsewhere in the instruction stream). However, previous to this patch: (1) loop_control_visitor did not create a new variable for ir_loop::counter; instead it re-used the existing ir_variable. This caused the loop counter to be double-incremented (once explicitly by the body of the loop, and once implicitly by ir_loop::increment). (2) ir_clone did not clone ir_loop::counter properly, resulting in the cloned ir_loop pointing to the source ir_loop's counter. (3) ir_hierarchical_visitor did not visit ir_loop::counter, resulting in the ir_variable being missed by reparenting. Additionally, most optimization passes (e.g. loop unrolling) assume that the variable mentioned by ir_loop::counter is not accessed in the body of the loop (an assumption which (1) violates). The combination of these factors caused a perfect storm in which the code worked properly nearly all of the time: for loops that got unrolled, (1) would introduce a double-increment, but loop unrolling would fail to notice it (since it assumes that ir_loop::counter is not accessed in the body of the loop), so it would unroll the loop the correct number of times. For loops that didn't get unrolled, (1) would introduce a double-increment, but then later when the IR was cloned for linking, (2) would prevent the loop counter from being cloned properly, so it would look to further analysis stages like an independent variable (and hence the double-increment would stop occurring). At the end of linking, (3) would prevent the loop counter from being reparented, so it would still belong to the shader object rather than the linked program object. Provided that the client program didn't delete the shader object, the memory would never get reclaimed, and so the shader would function properly. However, for loops that didn't get unrolled, if the client program did delete the shader object, and the memory belonging to the loop counter got re-used, this could cause a use-after-free bug, leading to a crash. This patch fixes loop_control_visitor, ir_clone, and ir_hierarchical_visitor to treat ir_loop::counter the same way the back-ends treat it: as a freshly allocated ir_variable that needs to be visited and cloned independently of other ir_variables. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72026 Reviewed-by: Eric Anholt <e...@anholt.net> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> (cherry picked from commit d6eb4321d0e62b6b391ad88ce390bd6e23d79747) diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 40ed33a..8f57499 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -163,7 +163,8 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const new_loop->to = this->to->clone(mem_ctx, ht); if (this->increment) new_loop->increment = this->increment->clone(mem_ctx, ht); - new_loop->counter = counter; + if (this->counter) + new_loop->counter = this->counter->clone(mem_ctx, ht); foreach_iter(exec_list_iterator, iter, this->body_instructions) { ir_instruction *ir = (ir_instruction *)iter.get(); diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp index 941b25e..a0fe3b9 100644 --- a/src/glsl/ir_hv_accept.cpp +++ b/src/glsl/ir_hv_accept.cpp @@ -87,6 +87,12 @@ ir_loop::accept(ir_hierarchical_visitor *v) if (s != visit_continue) return (s == visit_continue_with_parent) ? visit_continue : s; + if (this->counter) { + s = this->counter->accept(v); + if (s != visit_continue) + return (s == visit_continue_with_parent) ? visit_continue : s; + } + s = visit_list_elements(v, &this->body_instructions); if (s == visit_stop) return s; diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp index 2648193..0eb103f 100644 --- a/src/glsl/loop_controls.cpp +++ b/src/glsl/loop_controls.cpp @@ -254,7 +254,7 @@ loop_control_visitor::visit_leave(ir_loop *ir) ir->from = init->clone(ir, NULL); ir->to = limit->clone(ir, NULL); ir->increment = lv->increment->clone(ir, NULL); - ir->counter = lv->var; + ir->counter = lv->var->clone(ir, NULL); ir->cmp = cmp; max_iterations = iterations; commit 8eee788bd69ad510de8b405848428feba6c3d972 Author: Paul Berry <stereotype...@gmail.com> Date: Tue Nov 26 14:37:57 2013 -0800 glsl: Teach ir_variable_refcount about ir_loop::counter variables. If an ir_loop has a non-null "counter" field, the variable referred to by this field is implicitly read and written by the loop. We need to account for this in ir_variable_refcount, otherwise there is a danger we will try to dead-code-eliminate the loop counter variable. Note: at the moment the dead code elimination bug doesn't occur due to a bug in ir_hierarchical_visitor: it doesn't visit the "counter" field, so dead code elimination doesn't treat it as a candidate for elimination. But the patch to follow will fix that bug, so we need to fix ir_variable_refcount first in order to avoid breaking dead code elimination. Reviewed-by: Eric Anholt <e...@anholt.net> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> (cherry picked from commit 9d2951ea0acdcd219ad28831ac9e7112737d9ca3) diff --git a/src/glsl/ir_variable_refcount.cpp b/src/glsl/ir_variable_refcount.cpp index 923eb1a..425ed81 100644 --- a/src/glsl/ir_variable_refcount.cpp +++ b/src/glsl/ir_variable_refcount.cpp @@ -132,3 +132,24 @@ ir_variable_refcount_visitor::visit_leave(ir_assignment *ir) return visit_continue; } + + +ir_visitor_status +ir_variable_refcount_visitor::visit_leave(ir_loop *ir) +{ + /* If the loop has a counter variable, it is implicitly referenced and + * assigned to. Note that since the LHS of an assignment is counted as a + * reference, we actually have to increment referenced_count by 2 so that + * later code will know that the variable isn't just assigned to. + */ + if (ir->counter != NULL) { + ir_variable_refcount_entry *entry = + this->get_variable_entry(ir->counter); + if (entry) { + entry->referenced_count += 2; + entry->assigned_count++; + } + } + + return visit_continue; +} diff --git a/src/glsl/ir_variable_refcount.h b/src/glsl/ir_variable_refcount.h index c15e811..03fa7b5 100644 --- a/src/glsl/ir_variable_refcount.h +++ b/src/glsl/ir_variable_refcount.h @@ -60,6 +60,7 @@ public: virtual ir_visitor_status visit_enter(ir_function_signature *); virtual ir_visitor_status visit_leave(ir_assignment *); + virtual ir_visitor_status visit_leave(ir_loop *); ir_variable_refcount_entry *get_variable_entry(ir_variable *var); commit 9ccb6cc7b7466687813c651b75d84598a7789321 Author: Chad Versace <chad.vers...@linux.intel.com> Date: Fri Dec 20 04:39:03 2013 -0800 i965/gen6: Fix HiZ hang in WebGL Google Maps Emitting flushes before depth and hiz resolves at the top of blorp's state emission fixes the hang. Marchesin and I found the fix experimentally, as opposed to adhering to a documented hardware workaround. A more minimal fix likely exists, but this gets the job done. Fixes HiZ hangs in the new WebGL Google maps on Sandybridge Chrome OS. Tested by zooming in and out continuously for 2 hours. This patch is based on https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/8bc07bb70163c3706fb4ba5f980e57dc942f56dd CC: mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70740 Signed-off-by: Stéphane Marchesin <marc...@chromium.org> Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> Reviewed-by: Paul Berry <stereotype...@gmail.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> (cherry picked from commit 1a928816a1b717201f3b3cc998a42731b280e6ba) diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp index 8fb8ca1..ccb09e7 100644 --- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp @@ -1012,6 +1012,19 @@ gen6_blorp_emit_primitive(struct brw_context *brw, ADVANCE_BATCH(); } +static void +gen6_emit_hiz_workaround(struct brw_context *brw, enum gen6_hiz_op hiz_op) +{ + /* This fixes a HiZ hang in WebGL Google Maps. A more minimal fix likely + * exists, but this gets the job done. + */ + if (hiz_op == GEN6_HIZ_OP_DEPTH_RESOLVE || + hiz_op == GEN6_HIZ_OP_HIZ_RESOLVE) { + brw->batch.need_workaround_flush = true; + intel_emit_post_sync_nonzero_flush(brw); + intel_emit_depth_stall_flushes(brw); + } +} /** * \brief Execute a blit or render pass operation. @@ -1034,6 +1047,8 @@ gen6_blorp_exec(struct brw_context *brw, uint32_t wm_bind_bo_offset = 0; uint32_t prog_offset = params->get_wm_prog(brw, &prog_data); + + gen6_emit_hiz_workaround(brw, params->hiz_op); gen6_emit_3dstate_multisample(brw, params->num_samples); gen6_emit_3dstate_sample_mask(brw, params->num_samples, 1.0, false, ~0u); gen6_blorp_emit_state_base_address(brw, params); commit 4d7961e95e53f80196c24a26309ae7ba9765297c Author: Marek Olšák <marek.ol...@amd.com> Date: Wed Dec 4 00:39:52 2013 +0100 st/mesa: fix glClear with multiple colorbuffers and different formats Cc: 10.0 9.2 9.1 <mesa-sta...@lists.freedesktop.org> (cherry picked from commit 0612005aa66f211753f44bb4ffdfdcc9316281ac) diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 8da664a..391118a 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -205,7 +205,6 @@ clear_with_quad(struct gl_context *ctx, const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax / fb_width * 2.0f - 1.0f; const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin / fb_height * 2.0f - 1.0f; const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax / fb_height * 2.0f - 1.0f; - union pipe_color_union clearColor; /* printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__, @@ -308,18 +307,13 @@ clear_with_quad(struct gl_context *ctx, set_vertex_shader(st); cso_set_geometry_shader_handle(st->cso_context, NULL); - if (ctx->DrawBuffer->_ColorDrawBuffers[0]) { - struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; - GLboolean is_integer = _mesa_is_enum_format_integer(rb->InternalFormat); - - st_translate_color(&ctx->Color.ClearColor, - &clearColor, - ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat, - is_integer); - } + /* We can't translate the clear color to the colorbuffer format, + * because different colorbuffers may have different formats. + */ /* draw quad matching scissor rect */ - draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, &clearColor); + draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, + (union pipe_color_union*)&ctx->Color.ClearColor); /* Restore pipe state */ cso_restore_blend(st->cso_context); -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1w709s-0003t2...@moszumanska.debian.org