Mesa (master): egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-12-03 Thread Chad Versace
Module: Mesa
Branch: master
Commit: a057b837ddd1c725a7504eedc53c6df05a012773
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a057b837ddd1c725a7504eedc53c6df05a012773

Author: Tapani Pälli tapani.pa...@intel.com
Date:   Sun Dec  1 11:53:55 2013 +0200

egl: add HAVE_LIBDRM define, fix EGL X11 platform

Commit a594cec broke EGL X11 backend by adding dependency between
X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11.

This patch fixes the issue by adding additional define for libdrm
detection independent of which backend is being compiled. Tested by
compiling Mesa with '--with-egl-platforms=x11' and running es2gears_x11
+ glbenchmark2.7 successfully.

v2: return true for dri2_auth if running without libdrm (Samuel)
v3: check libdrm when building EGL drm platform + AM_CFLAGS fix (Emil)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72062
Signed-off-by: Tapani Pälli tapani.pa...@intel.com
Reviewed-by: Emil Velikov emil.l.veli...@gmail.com
Reviewed-by: Chad Versace chad.vers...@linux.intel.com
Cc: Samuel Thibault samuel.thiba...@ens-lyon.org
Cc: mesa-sta...@lists.freedesktop.org

---

 configure.ac|5 +
 src/egl/drivers/dri2/platform_x11.c |9 +++--
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c52535..91a5817 100644
--- a/configure.ac
+++ b/configure.ac
@@ -761,6 +761,9 @@ AC_SUBST([MESA_LLVM])
 # Check for libdrm
 PKG_CHECK_MODULES([LIBDRM], [libdrm = $LIBDRM_REQUIRED],
   [have_libdrm=yes], [have_libdrm=no])
+if test x$have_libdrm = xyes; then
+   DEFINES=$DEFINES -DHAVE_LIBDRM
+fi
 
 PKG_CHECK_MODULES([LIBUDEV], [libudev = $LIBUDEV_REQUIRED],
   have_libudev=yes, have_libudev=no)
@@ -1439,6 +1442,8 @@ for plat in $egl_platforms; do
drm)
test x$enable_gbm = xno 
AC_MSG_ERROR([EGL platform drm needs gbm])
+   test x$have_libdrm != xyes 
+   AC_MSG_ERROR([EGL platform drm requires libdrm = 
$LIBDRM_REQUIRED])
;;
 
android|fbdev|gdi|null)
diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index c56a413..04cb62b 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -33,7 +33,7 @@
 #include fcntl.h
 #include errno.h
 #include unistd.h
-#ifdef HAVE_DRM_PLATFORM
+#ifdef HAVE_LIBDRM
 #include xf86drm.h
 #endif
 #include sys/types.h
@@ -608,7 +608,7 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
 static EGLBoolean
 dri2_authenticate(_EGLDisplay *disp)
 {
-#ifdef HAVE_DRM_PLATFORM
+#ifdef HAVE_LIBDRM
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
drm_magic_t magic;
 
@@ -621,11 +621,8 @@ dri2_authenticate(_EGLDisplay *disp)
   _eglLog(_EGL_WARNING, DRI2: failed to authenticate);
   return EGL_FALSE;
}
-
-   return EGL_TRUE;
-#else
-   return EGL_FALSE;
 #endif
+   return EGL_TRUE;
 }
 
 static EGLBoolean

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium: add support for AMD_vertex_shader_layer

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 1a02bb71ddbf7312a84ac1693f562cca191a7d42
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a02bb71ddbf7312a84ac1693f562cca191a7d42

Author: Marek Olšák marek.ol...@amd.com
Date:   Thu Nov 21 15:25:55 2013 +0100

gallium: add support for AMD_vertex_shader_layer

---

 src/gallium/docs/source/screen.rst   |2 ++
 src/gallium/drivers/freedreno/freedreno_screen.c |1 +
 src/gallium/drivers/i915/i915_screen.c   |1 +
 src/gallium/drivers/ilo/ilo_screen.c |2 ++
 src/gallium/drivers/llvmpipe/lp_screen.c |2 ++
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   |1 +
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   |2 ++
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |2 ++
 src/gallium/drivers/r300/r300_screen.c   |1 +
 src/gallium/drivers/r600/r600_pipe.c |1 +
 src/gallium/drivers/radeonsi/radeonsi_pipe.c |1 +
 src/gallium/drivers/softpipe/sp_screen.c |2 ++
 src/gallium/drivers/svga/svga_screen.c   |1 +
 src/gallium/include/pipe/p_defines.h |3 ++-
 src/mesa/state_tracker/st_extensions.c   |7 +++
 src/mesa/state_tracker/st_program.c  |4 
 16 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/src/gallium/docs/source/screen.rst 
b/src/gallium/docs/source/screen.rst
index 035309d..ce96f688 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -176,6 +176,8 @@ The integer capabilities:
 * ``PIPE_CAP_MIXED_FRAMEBUFFER_SIZES``: Whether it is allowed to have
   different sizes for fb color/zs attachments. This controls whether
   ARB_framebuffer_object is provided.
+* ``PIPE_CAP_TGSI_VS_LAYER``: Whether TGSI_SEMANTIC_LAYER is supported
+  as a vertex shader output.
 
 
 .. _pipe_capf:
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index 5dafa92..4031f55 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -197,6 +197,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_USER_INDEX_BUFFERS:
case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
+case PIPE_CAP_TGSI_VS_LAYER:
return 0;
 
/* Stream output. */
diff --git a/src/gallium/drivers/i915/i915_screen.c 
b/src/gallium/drivers/i915/i915_screen.c
index 5e1e18d..abb9796 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -222,6 +222,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap 
cap)
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
+   case PIPE_CAP_TGSI_VS_LAYER:
return 0;
 
case PIPE_CAP_GLSL_FEATURE_LEVEL:
diff --git a/src/gallium/drivers/ilo/ilo_screen.c 
b/src/gallium/drivers/ilo/ilo_screen.c
index d6e3f94..a76966f 100644
--- a/src/gallium/drivers/ilo/ilo_screen.c
+++ b/src/gallium/drivers/ilo/ilo_screen.c
@@ -431,6 +431,8 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap 
param)
   return PIPE_ENDIAN_LITTLE;
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
   return true;
+   case PIPE_CAP_TGSI_VS_LAYER:
+  return 0;
 
default:
   return 0;
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c 
b/src/gallium/drivers/llvmpipe/lp_screen.c
index 81ebc69..742e7f2 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -234,6 +234,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum 
pipe_cap param)
   return PIPE_MAX_VIEWPORTS;
case PIPE_CAP_ENDIANNESS:
   return PIPE_ENDIAN_NATIVE;
+   case PIPE_CAP_TGSI_VS_LAYER:
+  return 0;
}
/* should only get here on unhandled cases */
debug_printf(Unexpected PIPE_CAP %d query\n, param);
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c 
b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 26ff681..2610330 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -126,6 +126,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
+   case PIPE_CAP_TGSI_VS_LAYER:
   return 0;
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c 
b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index f7dfc98..d8169f4 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -194,6 +194,8 @@ nv50_screen_get_param(struct 

Mesa (master): gallium/util: implement layered framebuffer clear in u_blitter

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 6b919b1b2d296f7d7410c2291b7e0332d7bef1a0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b919b1b2d296f7d7410c2291b7e0332d7bef1a0

Author: Marek Olšák marek.ol...@amd.com
Date:   Thu Nov 21 15:41:36 2013 +0100

gallium/util: implement layered framebuffer clear in u_blitter

All bound layers (from first_layer to last_layer) should be cleared.

This uses a vertex shader which outputs gl_Layer = gl_InstanceID, so each
instance goes to a different layer. By rendering a quad and setting
the instance count to the number of layers, it will trivially clear all
layers.

This requires AMD_vertex_shader_layer (or PIPE_CAP_TGSI_VS_LAYER), which only
radeonsi supports at the moment. r600 could do this too. Standard DX11
hardware will have to use a geometry shader though, which has higher overhead.

---

 src/gallium/auxiliary/util/u_blitter.c|   72 
 src/gallium/auxiliary/util/u_blitter.h|2 +-
 src/gallium/auxiliary/util/u_framebuffer.c|   24 
 src/gallium/auxiliary/util/u_framebuffer.h|5 ++
 src/gallium/auxiliary/util/u_simple_shaders.c |   26 +
 src/gallium/auxiliary/util/u_simple_shaders.h |2 +
 src/gallium/drivers/ilo/ilo_blitter_pipe.c|2 +-
 src/gallium/drivers/r300/r300_blit.c  |4 +-
 src/gallium/drivers/r600/r600_blit.c  |2 +-
 src/gallium/drivers/radeonsi/r600_blit.c  |1 +
 10 files changed, 110 insertions(+), 30 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c 
b/src/gallium/auxiliary/util/u_blitter.c
index b95cbab..bb1920a 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -65,6 +65,7 @@ struct blitter_context_priv
/* Vertex shaders. */
void *vs; /** Vertex shader which passes {pos, generic} to the output.*/
void *vs_pos_only; /** Vertex shader which passes pos to the output.*/
+   void *vs_layered; /** Vertex shader which sets LAYER = INSTANCEID. */
 
/* Fragment shaders. */
void *fs_empty;
@@ -295,6 +296,7 @@ struct blitter_context *util_blitter_create(struct 
pipe_context *pipe)
  util_make_vertex_passthrough_shader(pipe, 2, semantic_names,
  semantic_indices);
}
+
if (ctx-has_stream_out) {
   struct pipe_stream_output_info so;
   const uint semantic_names[] = { TGSI_SEMANTIC_POSITION };
@@ -310,6 +312,11 @@ struct blitter_context *util_blitter_create(struct 
pipe_context *pipe)
  semantic_indices, so);
}
 
+   if (pipe-screen-get_param(pipe-screen, PIPE_CAP_TGSI_INSTANCEID) 
+   pipe-screen-get_param(pipe-screen, PIPE_CAP_TGSI_VS_LAYER)) {
+  ctx-vs_layered = util_make_layered_clear_vertex_shader(pipe);
+   }
+
/* set invariant vertex coordinates */
for (i = 0; i  4; i++)
   ctx-vertices[i][0][3] = 1; /*v.w*/
@@ -901,13 +908,14 @@ void util_blitter_cache_all_shaders(struct 
blitter_context *blitter)
 }
 
 static void blitter_set_common_draw_rect_state(struct blitter_context_priv 
*ctx,
-   boolean scissor)
+   boolean scissor,
+   boolean vs_layered)
 {
struct pipe_context *pipe = ctx-base.pipe;
 
pipe-bind_rasterizer_state(pipe, scissor ? ctx-rs_state_scissor
  : ctx-rs_state);
-   pipe-bind_vs_state(pipe, ctx-vs);
+   pipe-bind_vs_state(pipe, vs_layered ? ctx-vs_layered : ctx-vs);
if (ctx-has_geometry_shader)
   pipe-bind_gs_state(pipe, NULL);
if (ctx-has_stream_out)
@@ -915,19 +923,24 @@ static void blitter_set_common_draw_rect_state(struct 
blitter_context_priv *ctx,
 }
 
 static void blitter_draw(struct blitter_context_priv *ctx,
- int x1, int y1, int x2, int y2, float depth)
+ int x1, int y1, int x2, int y2, float depth,
+ unsigned num_instances)
 {
-   struct pipe_resource *buf = NULL;
-   unsigned offset = 0;
+   struct pipe_context *pipe = ctx-base.pipe;
+   struct pipe_vertex_buffer vb = {0};
 
blitter_set_rectangle(ctx, x1, y1, x2, y2, depth);
 
+   vb.stride = 8 * sizeof(float);
+
u_upload_data(ctx-upload, 0, sizeof(ctx-vertices), ctx-vertices,
- offset, buf);
+ vb.buffer_offset, vb.buffer);
u_upload_unmap(ctx-upload);
-   util_draw_vertex_buffer(ctx-base.pipe, NULL, buf, ctx-base.vb_slot,
-   offset, PIPE_PRIM_TRIANGLE_FAN, 4, 2);
-   pipe_resource_reference(buf, NULL);
+
+   pipe-set_vertex_buffers(pipe, ctx-base.vb_slot, 1, vb);
+   util_draw_arrays_instanced(pipe, PIPE_PRIM_TRIANGLE_FAN, 0, 4,
+  0, num_instances);
+   pipe_resource_reference(vb.buffer, NULL);
 }
 
 void util_blitter_draw_rectangle(struct blitter_context *blitter,
@@ -949,11 

Mesa (master): radeonsi: add driver support for layered rendering and AMD_vertex_shader_layer

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: d52791a708760dd114a53137caad211dc7cc4dfc
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d52791a708760dd114a53137caad211dc7cc4dfc

Author: Marek Olšák marek.ol...@amd.com
Date:   Thu Nov 21 15:21:38 2013 +0100

radeonsi: add driver support for layered rendering and AMD_vertex_shader_layer

Reviewed-by: Michel Dänzer michel.daen...@amd.com

---

 src/gallium/drivers/radeonsi/radeonsi_shader.c |   14 +-
 src/gallium/drivers/radeonsi/radeonsi_shader.h |1 +
 src/gallium/drivers/radeonsi/si_state.c|   23 ---
 src/gallium/drivers/radeonsi/si_state_draw.c   |1 +
 4 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c 
b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index ebe9125..96cc1aa 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -890,6 +890,7 @@ static void si_llvm_emit_epilogue(struct 
lp_build_tgsi_context * bld_base)
unsigned semantic_name;
unsigned param_count = 0;
int depth_index = -1, stencil_index = -1, psize_index = -1, 
edgeflag_index = -1;
+   int layer_index = -1;
int i;
 
if (si_shader_ctx-shader-selector-so.num_outputs) {
@@ -949,6 +950,11 @@ handle_semantic:
shader-vs_out_edgeflag = true;
edgeflag_index = index;
continue;
+   case TGSI_SEMANTIC_LAYER:
+   shader-vs_out_misc_write = true;
+   shader-vs_out_layer = true;
+   layer_index = index;
+   continue;
case TGSI_SEMANTIC_POSITION:
if (si_shader_ctx-type == 
TGSI_PROCESSOR_VERTEX) {
target = V_008DFC_SQ_EXP_POS;
@@ -1100,7 +1106,8 @@ handle_semantic:
if (shader-vs_out_misc_write) {
pos_args[1][0] = lp_build_const_int32(base-gallivm, /* 
writemask */
  
shader-vs_out_point_size |
- 
(shader-vs_out_edgeflag  1));
+ 
(shader-vs_out_edgeflag  1) |
+ 
(shader-vs_out_layer  2));
pos_args[1][1] = uint-zero; /* EXEC mask */
pos_args[1][2] = uint-zero; /* last export? */
pos_args[1][3] = lp_build_const_int32(base-gallivm, 
V_008DFC_SQ_EXP_POS + 1);
@@ -1130,6 +1137,11 @@ handle_semantic:
pos_args[1][6] = 
LLVMBuildBitCast(base-gallivm-builder, output,
  
base-elem_type, );
}
+
+   if (shader-vs_out_layer) {
+   pos_args[1][7] = 
LLVMBuildLoad(base-gallivm-builder,
+   
si_shader_ctx-radeon_bld.soa.outputs[layer_index][0], );
+   }
}
 
for (i = 0; i  4; i++)
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.h 
b/src/gallium/drivers/radeonsi/radeonsi_shader.h
index 5432a87..174035d 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.h
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.h
@@ -114,6 +114,7 @@ struct si_shader {
boolvs_out_misc_write;
boolvs_out_point_size;
boolvs_out_edgeflag;
+   boolvs_out_layer;
unsignednr_cbufs;
unsignednr_pos_exports;
unsignedclip_dist_write;
diff --git a/src/gallium/drivers/radeonsi/si_state.c 
b/src/gallium/drivers/radeonsi/si_state.c
index fd5d2c6..7bae72a 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1571,7 +1571,7 @@ static void si_cb(struct r600_context *rctx, struct 
si_pm4_state *pm4,
struct r600_surface *surf;
unsigned level = state-cbufs[cb]-u.tex.level;
unsigned pitch, slice;
-   unsigned color_info, color_attrib, color_pitch;
+   unsigned color_info, color_attrib, color_pitch, color_view;
unsigned tile_mode_index;
unsigned format, swap, ntype, endian;
uint64_t offset;
@@ -1584,10 +1584,19 @@ static void si_cb(struct r600_context *rctx, struct 
si_pm4_state *pm4,
rtex = (struct r600_texture*)state-cbufs[cb]-texture;
 
offset = rtex-surface.level[level].offset;
-   if (rtex-surface.level[level].mode  RADEON_SURF_MODE_1D) {
+
+   /* Layered rendering doesn't work with LINEAR_GENERAL.
+* 

Mesa (master): st/mesa: add support for layered framebuffers and consolidate code

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: d8d67d2e1f809ca62c99aab1db78429e2c9d9691
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8d67d2e1f809ca62c99aab1db78429e2c9d9691

Author: Marek Olšák marek.ol...@amd.com
Date:   Thu Nov 21 15:31:32 2013 +0100

st/mesa: add support for layered framebuffers and consolidate code

This is a subset of geometry shaders. It's all about setting first_layer and
last_layer correctly.

Also some code between st_render_texture and update_framebuffer_state is
consolidated. It doesn't use rtt_level and derives the level from dimensions
instead as the code in st_atom_framebuffer.c did.

---

 src/mesa/state_tracker/st_atom_framebuffer.c |   58 +--
 src/mesa/state_tracker/st_cb_drawpixels.c|   19 +++---
 src/mesa/state_tracker/st_cb_fbo.c   |   97 +++--
 src/mesa/state_tracker/st_cb_fbo.h   |   10 ++-
 src/mesa/state_tracker/st_cb_readpixels.c|4 +-
 src/mesa/state_tracker/st_cb_texture.c   |4 +-
 6 files changed, 99 insertions(+), 93 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c 
b/src/mesa/state_tracker/st_atom_framebuffer.c
index c752640..51f079c 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -44,56 +44,6 @@
 
 
 /**
- * When doing GL render to texture, we have to be sure that finalize_texture()
- * didn't yank out the pipe_resource that we earlier created a surface for.
- * Check for that here and create a new surface if needed.
- */
-static void
-update_renderbuffer_surface(struct st_context *st,
-struct st_renderbuffer *strb)
-{
-   struct pipe_context *pipe = st-pipe;
-   struct pipe_resource *resource = strb-rtt ? strb-rtt-pt : strb-texture;
-   int rtt_width = strb-Base.Width;
-   int rtt_height = strb-Base.Height;
-   enum pipe_format format = st-ctx-Color.sRGBEnabled ? resource-format : 
util_format_linear(resource-format);
-
-   if (!strb-surface ||
-   strb-surface-texture-nr_samples != strb-Base.NumSamples ||
-   strb-surface-format != format ||
-   strb-surface-texture != resource ||
-   strb-surface-width != rtt_width ||
-   strb-surface-height != rtt_height) {
-  GLuint level;
-  /* find matching mipmap level size */
-  for (level = 0; level = resource-last_level; level++) {
- if (u_minify(resource-width0, level) == rtt_width 
- u_minify(resource-height0, level) == rtt_height) {
-struct pipe_surface surf_tmpl;
-memset(surf_tmpl, 0, sizeof(surf_tmpl));
-surf_tmpl.format = format;
-surf_tmpl.u.tex.level = level;
-surf_tmpl.u.tex.first_layer = strb-rtt_face + strb-rtt_slice;
-surf_tmpl.u.tex.last_layer = strb-rtt_face + strb-rtt_slice;
-
-pipe_surface_reference(strb-surface, NULL);
-
-strb-surface = pipe-create_surface(pipe,
- resource,
- surf_tmpl);
-#if 0
-printf(-- alloc new surface %d x %d into tex %p\n,
-   strb-surface-width, strb-surface-height,
-   texture);
-#endif
-break;
- }
-  }
-   }
-}
-
-
-/**
  * Update framebuffer state (color, depth, stencil, etc. buffers)
  */
 static void
@@ -121,10 +71,10 @@ update_framebuffer_state( struct st_context *st )
 
   if (strb) {
  /*printf(- framebuffer surface rtt %p\n, strb-rtt);*/
- if (strb-rtt ||
+ if (strb-is_rtt ||
  (strb-texture  util_format_is_srgb(strb-texture-format))) {
 /* rendering to a GL texture, may have to update surface */
-update_renderbuffer_surface(st, strb);
+st_update_renderbuffer_surface(st, strb);
  }
 
  if (strb-surface) {
@@ -144,9 +94,9 @@ update_framebuffer_state( struct st_context *st )
 */
strb = st_renderbuffer(fb-Attachment[BUFFER_DEPTH].Renderbuffer);
if (strb) {
-  if (strb-rtt) {
+  if (strb-is_rtt) {
  /* rendering to a GL texture, may have to update surface */
- update_renderbuffer_surface(st, strb);
+ st_update_renderbuffer_surface(st, strb);
   }
   pipe_surface_reference(framebuffer-zsbuf, strb-surface);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c 
b/src/mesa/state_tracker/st_cb_drawpixels.c
index 2ce4728..3058dfb 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -878,7 +878,8 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint 
y,
}
 
stmap = pipe_transfer_map(pipe, strb-texture,
- strb-rtt_level, strb-rtt_face + strb-rtt_slice,
+ strb-surface-u.tex.level,
+ strb-surface-u.tex.first_layer,
  usage, x, y,

Mesa (master): mesa: expose AMD_vertex_shader_layer in the core profile only

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 0b3b901cff24392e7bceb17546db2754331d8429
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b3b901cff24392e7bceb17546db2754331d8429

Author: Marek Olšák marek.ol...@amd.com
Date:   Thu Nov 21 15:26:25 2013 +0100

mesa: expose AMD_vertex_shader_layer in the core profile only

It needs glFramebufferTexture, which isn't available in the compatibility
profile.

Reviewed-by: Ian Romanick ian.d.roman...@intel.com

---

 src/mesa/main/extensions.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 42da905..373cc76 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -302,7 +302,7 @@ static const struct extension extension_table[] = {
{ GL_AMD_performance_monitor, o(AMD_performance_monitor), 
GL, 2007 },
{ GL_AMD_seamless_cubemap_per_texture,
o(AMD_seamless_cubemap_per_texture),GL, 2009 },
{ GL_AMD_shader_stencil_export,   
o(ARB_shader_stencil_export),   GL, 2009 },
-   { GL_AMD_vertex_shader_layer, o(AMD_vertex_shader_layer), 
GL, 2012 },
+   { GL_AMD_vertex_shader_layer, o(AMD_vertex_shader_layer), 
GLC,2012 },
{ GL_APPLE_object_purgeable,  o(APPLE_object_purgeable),  
GL, 2006 },
{ GL_APPLE_packed_pixels, o(dummy_true),  
GLL,2002 },
{ GL_APPLE_texture_max_level, o(dummy_true),  
 ES1 | ES2, 2009 },

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): radeonsi: implement OpenGL edge flags

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 053606ddaed6354e8d26d0654d211b6d20051937
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=053606ddaed6354e8d26d0654d211b6d20051937

Author: Marek Olšák marek.ol...@amd.com
Date:   Tue Nov 19 22:07:30 2013 +0100

radeonsi: implement OpenGL edge flags

Reviewed-by: Michel Dänzer michel.daen...@amd.com

---

 src/gallium/drivers/radeonsi/radeonsi_shader.c |   52 +---
 src/gallium/drivers/radeonsi/radeonsi_shader.h |1 +
 src/gallium/drivers/radeonsi/si_state_draw.c   |1 +
 3 files changed, 48 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c 
b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 61e619a..ebe9125 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -889,7 +889,7 @@ static void si_llvm_emit_epilogue(struct 
lp_build_tgsi_context * bld_base)
LLVMValueRef pos_args[4][9] = { { 0 } };
unsigned semantic_name;
unsigned param_count = 0;
-   int depth_index = -1, stencil_index = -1;
+   int depth_index = -1, stencil_index = -1, psize_index = -1, 
edgeflag_index = -1;
int i;
 
if (si_shader_ctx-shader-selector-so.num_outputs) {
@@ -940,10 +940,15 @@ handle_semantic:
/* Select the correct target */
switch(semantic_name) {
case TGSI_SEMANTIC_PSIZE:
-   shader-vs_out_misc_write = 1;
-   shader-vs_out_point_size = 1;
-   target = V_008DFC_SQ_EXP_POS + 1;
-   break;
+   shader-vs_out_misc_write = true;
+   shader-vs_out_point_size = true;
+   psize_index = index;
+   continue;
+   case TGSI_SEMANTIC_EDGEFLAG:
+   shader-vs_out_misc_write = true;
+   shader-vs_out_edgeflag = true;
+   edgeflag_index = index;
+   continue;
case TGSI_SEMANTIC_POSITION:
if (si_shader_ctx-type == 
TGSI_PROCESSOR_VERTEX) {
target = V_008DFC_SQ_EXP_POS;
@@ -1018,7 +1023,6 @@ handle_semantic:
   
LLVMVoidTypeInContext(base-gallivm-context),
   args, 9);
}
-
}
 
if (semantic_name == TGSI_SEMANTIC_CLIPDIST) {
@@ -1092,6 +1096,42 @@ handle_semantic:
pos_args[0][8] = base-one;  /* W */
}
 
+   /* Write the misc vector (point size, edgeflag, layer, 
viewport). */
+   if (shader-vs_out_misc_write) {
+   pos_args[1][0] = lp_build_const_int32(base-gallivm, /* 
writemask */
+ 
shader-vs_out_point_size |
+ 
(shader-vs_out_edgeflag  1));
+   pos_args[1][1] = uint-zero; /* EXEC mask */
+   pos_args[1][2] = uint-zero; /* last export? */
+   pos_args[1][3] = lp_build_const_int32(base-gallivm, 
V_008DFC_SQ_EXP_POS + 1);
+   pos_args[1][4] = uint-zero; /* COMPR flag */
+   pos_args[1][5] = base-zero; /* X */
+   pos_args[1][6] = base-zero; /* Y */
+   pos_args[1][7] = base-zero; /* Z */
+   pos_args[1][8] = base-zero; /* W */
+
+   if (shader-vs_out_point_size) {
+   pos_args[1][5] = 
LLVMBuildLoad(base-gallivm-builder,
+   
si_shader_ctx-radeon_bld.soa.outputs[psize_index][0], );
+   }
+
+   if (shader-vs_out_edgeflag) {
+   LLVMValueRef output = 
LLVMBuildLoad(base-gallivm-builder,
+   
si_shader_ctx-radeon_bld.soa.outputs[edgeflag_index][0], );
+
+   /* The output is a float, but the hw expects an 
integer
+* with the first bit containing the edge flag. 
*/
+   output = 
LLVMBuildFPToUI(base-gallivm-builder, output,
+
bld_base-uint_bld.elem_type, );
+
+   output = lp_build_min(bld_base-int_bld, 
output, bld_base-int_bld.one);
+
+   /* The LLVM intrinsic expects a float. */
+   pos_args[1][6] = 
LLVMBuildBitCast(base-gallivm-builder, output,
+

Mesa (master): st/mesa: implement layered framebuffer clear for the clear_with_quad fallback

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: e47af58bb411c7779857ad96a7cc3306980311ae
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e47af58bb411c7779857ad96a7cc3306980311ae

Author: Marek Olšák marek.ol...@amd.com
Date:   Thu Nov 21 15:50:31 2013 +0100

st/mesa: implement layered framebuffer clear for the clear_with_quad fallback

Same approach as in u_blitter.

---

 src/gallium/auxiliary/cso_cache/cso_context.c |   20 +
 src/gallium/auxiliary/cso_cache/cso_context.h |5 ++
 src/mesa/state_tracker/st_cb_clear.c  |   58 ++---
 src/mesa/state_tracker/st_context.h   |1 +
 4 files changed, 68 insertions(+), 16 deletions(-)

diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c 
b/src/gallium/auxiliary/cso_cache/cso_context.c
index 33adee8..8d217a4 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1416,3 +1416,23 @@ cso_draw_arrays(struct cso_context *cso, uint mode, uint 
start, uint count)
 
cso_draw_vbo(cso, info);
 }
+
+void
+cso_draw_arrays_instanced(struct cso_context *cso, uint mode,
+  uint start, uint count,
+  uint start_instance, uint instance_count)
+{
+   struct pipe_draw_info info;
+
+   util_draw_init_info(info);
+
+   info.mode = mode;
+   info.start = start;
+   info.count = count;
+   info.min_index = start;
+   info.max_index = start + count - 1;
+   info.start_instance = start_instance;
+   info.instance_count = instance_count;
+
+   cso_draw_vbo(cso, info);
+}
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h 
b/src/gallium/auxiliary/cso_cache/cso_context.h
index 82c8e18..4b433b1 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -228,6 +228,11 @@ void
 cso_draw_vbo(struct cso_context *cso,
  const struct pipe_draw_info *info);
 
+void
+cso_draw_arrays_instanced(struct cso_context *cso, uint mode,
+  uint start, uint count,
+  uint start_instance, uint instance_count);
+
 /* helper drawing function */
 void
 cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count);
diff --git a/src/mesa/state_tracker/st_cb_clear.c 
b/src/mesa/state_tracker/st_cb_clear.c
index 8da664a..274cc47 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -51,6 +51,7 @@
 #include pipe/p_state.h
 #include pipe/p_defines.h
 #include util/u_format.h
+#include util/u_framebuffer.h
 #include util/u_inlines.h
 #include util/u_simple_shaders.h
 #include util/u_draw_quad.h
@@ -129,6 +130,26 @@ set_vertex_shader(struct st_context *st)
 }
 
 
+static void
+set_vertex_shader_layered(struct st_context *st)
+{
+   struct pipe_context *pipe = st-pipe;
+
+   if (!pipe-screen-get_param(pipe-screen, PIPE_CAP_TGSI_INSTANCEID) ||
+   !pipe-screen-get_param(pipe-screen, PIPE_CAP_TGSI_VS_LAYER)) {
+  assert(!Got layered clear, but the VS layer output is unsupported);
+  set_vertex_shader(st);
+  return;
+   }
+
+   if (!st-clear.vs_layered) {
+  st-clear.vs_layered = util_make_layered_clear_vertex_shader(pipe);
+   }
+
+   cso_set_vertex_shader_handle(st-cso_context, st-clear.vs_layered);
+}
+
+
 /**
  * Draw a screen-aligned quadrilateral.
  * Coords are clip coords with y=0=bottom.
@@ -136,15 +157,19 @@ set_vertex_shader(struct st_context *st)
 static void
 draw_quad(struct st_context *st,
   float x0, float y0, float x1, float y1, GLfloat z,
+  unsigned num_instances,
   const union pipe_color_union *color)
 {
-   struct pipe_context *pipe = st-pipe;
-   struct pipe_resource *vbuf = NULL;
-   GLuint i, offset;
+   struct cso_context *cso = st-cso_context;
+   struct pipe_vertex_buffer vb = {0};
+   GLuint i;
float (*vertices)[2][4];  /** vertex pos + color */
 
+   vb.stride = 8 * sizeof(float);
+
if (u_upload_alloc(st-uploader, 0, 4 * sizeof(vertices[0]),
-  offset, vbuf, (void **) vertices) != PIPE_OK) {
+  vb.buffer_offset, vb.buffer,
+  (void **) vertices) != PIPE_OK) {
   return;
}
 
@@ -174,16 +199,10 @@ draw_quad(struct st_context *st,
u_upload_unmap(st-uploader);
 
/* draw */
-   util_draw_vertex_buffer(pipe,
-   st-cso_context,
-   vbuf,
-   cso_get_aux_vertex_buffer_slot(st-cso_context),
-   offset,
-   PIPE_PRIM_TRIANGLE_FAN,
-   4,  /* verts */
-   2); /* attribs/vert */
-
-   pipe_resource_reference(vbuf, NULL);
+   cso_set_vertex_buffers(cso, cso_get_aux_vertex_buffer_slot(cso), 1, vb);
+   cso_draw_arrays_instanced(cso, PIPE_PRIM_TRIANGLE_FAN, 0, 4,
+ 0, num_instances);
+   pipe_resource_reference(vb.buffer, NULL);
 }
 
 
@@ -206,6 +225,8 

Mesa (master): configure.ac: require libdrm_radeon 2.4.50

2013-12-03 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 40e28561237302488daf7d750851c9d92020891e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=40e28561237302488daf7d750851c9d92020891e

Author: Marek Olšák marek.ol...@amd.com
Date:   Tue Dec  3 20:06:58 2013 +0100

configure.ac: require libdrm_radeon 2.4.50

---

 configure.ac |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 91a5817..c14d39a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AC_SUBST([OSMESA_VERSION])
 
 dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.24
-LIBDRM_RADEON_REQUIRED=2.4.49
+LIBDRM_RADEON_REQUIRED=2.4.50
 LIBDRM_INTEL_REQUIRED=2.4.49
 LIBDRM_NVVIEUX_REQUIRED=2.4.33
 LIBDRM_NOUVEAU_REQUIRED=2.4.33 libdrm = 2.4.41

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Brian Paul
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Brian Paul
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Emil Velikov
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Add missing null check in gxl/dri2_glx.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 03ef57950a8c8e69043a87511693ba8bdf4a73be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ef57950a8c8e69043a87511693ba8bdf4a73be

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 07:30:00 2013 -0700

glx: Add missing null check in gxl/dri2_glx.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/dri2_glx.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 3b33312..bfeebed 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -676,6 +676,10 @@ dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void 
*loaderPrivate)
psc = (struct dri2_screen *) pdraw-base.psc;
 
priv = __glXInitialize(psc-base.dpy);
+
+   if (priv == NULL)
+   return;
+
pdp = (struct dri2_display *) priv-dri2Display;
gc = __glXGetCurrentContext();
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/radeon: use PRIu64 macro for printing uint64_t

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 4c110994533c67f2e501cd32ee0c2f91060630e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c110994533c67f2e501cd32ee0c2f91060630e0

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sat Nov 30 19:53:53 2013 +

gallium/radeon: use PRIu64 macro for printing uint64_t

Reviewed-by: Michel Dänzer michel.daen...@amd.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/drivers/radeon/r600_pipe_common.c |3 ++-
 src/gallium/drivers/radeon/r600_texture.c |7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c 
b/src/gallium/drivers/radeon/r600_pipe_common.c
index 5674f81..9a4a3e0 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -28,6 +28,7 @@
 #include r600_cs.h
 #include tgsi/tgsi_parse.h
 #include util/u_format_s3tc.h
+#include inttypes.h
 
 static const struct debug_named_value common_debug_options[] = {
/* logging */
@@ -418,7 +419,7 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
util_range_set_empty(res-valid_buffer_range);
 
if (rscreen-debug_flags  DBG_VM  res-b.b.target == PIPE_BUFFER) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Buffer %u 
bytes\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | Buffer 
%u bytes\n,
r600_resource_va(rscreen-b, res-b.b),
r600_resource_va(rscreen-b, res-b.b) + 
res-buf-size,
res-buf-size);
diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index 5674f0b..99f8445 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -29,6 +29,7 @@
 #include util/u_format.h
 #include util/u_memory.h
 #include errno.h
+#include inttypes.h
 
 /* Same as resource_copy_region, except that both upsampling and downsampling 
are allowed. */
 static void r600_copy_region_with_blit(struct pipe_context *pipe,
@@ -578,7 +579,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (rscreen-debug_flags  DBG_VM) {
-   fprintf(stderr, VM start=0x%llX  end=0x%llX | Texture 
%ix%ix%i, %i levels, %i samples, %s\n,
+   fprintf(stderr, VM start=0x%PRIu64  end=0x%PRIu64 | 
Texture %ix%ix%i, %i levels, %i samples, %s\n,
r600_resource_va(screen, rtex-resource.b.b),
r600_resource_va(screen, rtex-resource.b.b) + 
rtex-resource.buf-size,
base-width0, base-height0, util_max_layer(base, 0)+1, 
base-last_level+1,
@@ -597,7 +598,7 @@ r600_texture_create_object(struct pipe_screen *screen,
   rtex-surface.bpe, rtex-surface.nsamples,
   rtex-surface.flags, 
util_format_short_name(base-format));
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  L %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  L %i: offset=%PRIu64, slice_size=%PRIu64, 
npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.level[i].offset,
@@ -613,7 +614,7 @@ r600_texture_create_object(struct pipe_screen *screen,
}
if (rtex-surface.flags  RADEON_SURF_SBUFFER) {
for (int i = 0; i = rtex-surface.last_level; i++) {
-   printf(  S %i: offset=%llu, slice_size=%llu, 
npix_x=%u, 
+   printf(  S %i: offset=%PRIu64, 
slice_size=%PRIu64, npix_x=%u, 
   npix_y=%u, npix_z=%u, nblk_x=%u, 
nblk_y=%u, 
   nblk_z=%u, pitch_bytes=%u, mode=%u\n,
   i, rtex-surface.stencil_level[i].offset,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glx: Check malloc return value before accessing memory in glx/clientattrib.c

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: b8875cb7c822ad366625a532dd9209d1647771af
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8875cb7c822ad366625a532dd9209d1647771af

Author: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com
Date:   Mon Dec  2 02:39:00 2013 -0700

glx: Check malloc return value before accessing memory in glx/clientattrib.c

Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com

Reviewed-by: Brian Paul bri...@vmware.com

---

 src/glx/clientattrib.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c
index 1b306ea..37f14c5 100644
--- a/src/glx/clientattrib.c
+++ b/src/glx/clientattrib.c
@@ -76,6 +76,10 @@ __indirect_glPushClientAttrib(GLuint mask)
if (spp  gc-attributes.stack[__GL_CLIENT_ATTRIB_STACK_DEPTH]) {
   if (!(sp = *spp)) {
  sp = malloc(sizeof(__GLXattribute));
+ if (sp == NULL) {
+__glXSetError(gc, GL_OUT_OF_MEMORY);
+return;
+ }
  *spp = sp;
   }
   sp-mask = mask;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: resolve typo DTXn/DXTn

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: bc2627a98a07ebb5f279add74fac5b88349f2fa9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc2627a98a07ebb5f279add74fac5b88349f2fa9

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 17:06:23 2013 +

mesa: resolve typo DTXn/DXTn

Reviewed-by: Kenneth Graunke kenn...@whitecape.org
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/mesa/main/teximage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 793c5d3..71865ae 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2870,7 +2870,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
}
 
/* If the application requested compression to an S3TC format but we don't
-* have the DTXn library, force a generic compressed format instead.
+* have the DXTn library, force a generic compressed format instead.
 */
if (internalFormat != format  format != GL_NONE) {
   const GLenum before = internalFormat;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): automake: include only one copy VERSION in tarball

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: 507c2356e3caa3b7da98787ae2de96c7bca0089e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507c2356e3caa3b7da98787ae2de96c7bca0089e

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Mon Dec  2 19:42:51 2013 +

automake: include only one copy VERSION in tarball

The VERSION file is tracked by git (git ls-files), thus
adding it to EXTRA_FILES will result in a duplicate copy
within the final tarball.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230
Cc: 10.0 mesa-sta...@lists.freedesktop.org
Reported-by: Patrick Steinhardt p...@pks.im
Tested-by: Patrick Steinhardt p...@pks.im
Reviewed-by: Matt Turner matts...@gmail.com
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 Makefile.am |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 361fb51..600adad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 EXTRA_FILES = \
aclocal.m4  \
configure   \
-   VERSION \
bin/ar-lib  \
bin/compile \
bin/config.sub  \

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: build llvmpipe on top of softpipe

2013-12-03 Thread Carl Worth
Module: Mesa
Branch: master
Commit: f60737a525fdd82c578eb3076f51a94bd63ba3b7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f60737a525fdd82c578eb3076f51a94bd63ba3b7

Author: Emil Velikov emil.l.veli...@gmail.com
Date:   Sun Nov 17 20:07:33 2013 +

pipe-loader: build llvmpipe on top of softpipe

One can select if they want to fallback to softpipe.
Current approach makes this not possible, whereas other
targets (dri-swrast) handle this approapriately.

Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++--
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1c2f31b..90b5760 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -148,16 +148,6 @@ pipe_vmwgfx_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
-if HAVE_GALLIUM_LLVMPIPE
-pipe_LTLIBRARIES += pipe_swrast.la
-pipe_swrast_la_SOURCES = pipe_swrast.c
-nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
-pipe_swrast_la_LIBADD = \
-   $(PIPE_LIBS) \
-   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
-   $(LLVM_LIBS)
-pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
-else
 if HAVE_GALLIUM_SOFTPIPE
 pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
@@ -165,5 +155,12 @@ pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_GALLIUM_LLVMPIPE
+nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
+
+pipe_swrast_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(LLVM_LIBS)
+pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): Revert i965: Move brw_emit_query_begin() to the render ring prelude.

2013-12-03 Thread Kenneth Graunke
Module: Mesa
Branch: master
Commit: e03994bf47f9741a7a3a6181eb4f4d0cf286f70f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e03994bf47f9741a7a3a6181eb4f4d0cf286f70f

Author: Kenneth Graunke kenn...@whitecape.org
Date:   Tue Nov 26 16:32:14 2013 -0800

Revert i965: Move brw_emit_query_begin() to the render ring prelude.

This reverts commit a4bf7f6b6e612626c4e4fc21507ac213a7ba4b00.
It breaks occlusion queries on Gen4-5.  Doing this right will likely
require larger changes, which should be done at a future date.

Some Piglit tests still passed due to other bugs; fixing those revealed
this problem.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
Reviewed-by: Eric Anholt e...@anholt.net

---

 src/mesa/drivers/dri/i965/brw_draw_upload.c   |2 ++
 src/mesa/drivers/dri/i965/intel_batchbuffer.c |8 +---
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c 
b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 89404b0..57b81df 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -614,6 +614,8 @@ static void brw_emit_vertices(struct brw_context *brw)
 
brw_prepare_vertices(brw);
 
+   brw_emit_query_begin(brw);
+
nr_elements = brw-vb.nr_enabled + brw-vs.prog_data-uses_vertexid;
 
/* If the VS doesn't read any inputs (calculating vertex position from
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c 
b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index 25aacd9..6b25c02 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -182,13 +182,7 @@ do_batch_dump(struct brw_context *brw)
 void
 intel_batchbuffer_emit_render_ring_prelude(struct brw_context *brw)
 {
-   /* Without hardware contexts, we need to capture the pipeline statistics
-* registers at the start and end of each render ring batch, so we can see
-* what that batch contributed.  Emit state packets to write them to a BO.
-*/
-   brw_emit_query_begin(brw);
-
-   /* We may also need to enable and snapshot OA counters. */
+   /* We may need to enable and snapshot OA counters. */
brw_perf_monitor_new_batch(brw);
 }
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965: Fix OACONTROL assertion failures on Ironlake.

2013-12-03 Thread Kenneth Graunke
Module: Mesa
Branch: master
Commit: da07e1b6837616ef101d1374dbff322694d6a7d9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=da07e1b6837616ef101d1374dbff322694d6a7d9

Author: Kenneth Graunke kenn...@whitecape.org
Date:   Tue Nov 26 16:32:13 2013 -0800

i965: Fix OACONTROL assertion failures on Ironlake.

I guarded half of the callers to start/stop_oa_counters with generation
checks, but missed the other half (which were added later).  OACONTROL
doesn't exist on Ironlake, so we better not write it.  Also, there's no
need---Ironlake's performance counters are always running.

This patch moves the generation checks into start/stop_oa_counters,
rather than requiring the caller to do them.

Fixes assertion failures in Piglit's AMD_performance_monitor/measure.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
Reviewed-by: Eric Anholt e...@anholt.net

---

 .../drivers/dri/i965/brw_performance_monitor.c |   12 
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_performance_monitor.c 
b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
index 9bddd8e..ff3cb97 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_monitor.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
@@ -642,6 +642,8 @@ start_oa_counters(struct brw_context *brw)
 
/* Pick the counter format which gives us all the counters. */
switch (brw-gen) {
+   case 5:
+  return; /* Ironlake counters are always running. */
case 6:
   counter_format = 1; /* 0b001 */
   break;
@@ -667,6 +669,10 @@ start_oa_counters(struct brw_context *brw)
 static void
 stop_oa_counters(struct brw_context *brw)
 {
+   /* Ironlake counters never stop. */
+   if (brw-gen == 5)
+  return;
+
BEGIN_BATCH(3);
OUT_BATCH(MI_LOAD_REGISTER_IMM | (3 - 2));
OUT_BATCH(OACONTROL);
@@ -1367,8 +1373,7 @@ brw_perf_monitor_new_batch(struct brw_context *brw)
if (brw-perfmon.oa_users == 0)
   return;
 
-   if (brw-gen = 6)
-  start_oa_counters(brw);
+   start_oa_counters(brw);
 
/* Make sure bookend_bo has enough space for a pair of snapshots.
 * If not, wrap the BO: gather up any results so far, and start from
@@ -1405,8 +1410,7 @@ brw_perf_monitor_finish_batch(struct brw_context *brw)
 
emit_bookend_snapshot(brw);
 
-   if (brw-gen = 6)
-  stop_oa_counters(brw);
+   stop_oa_counters(brw);
 }
 
 
/**/

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965: Fix BRW_BATCH_STRUCT to specify RENDER_RING, not UNKNOWN_RING.

2013-12-03 Thread Kenneth Graunke
Module: Mesa
Branch: master
Commit: 26b7b50afeea8ff252501b9c9b10385960b236f0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=26b7b50afeea8ff252501b9c9b10385960b236f0

Author: Kenneth Graunke kenn...@whitecape.org
Date:   Tue Nov 26 16:32:15 2013 -0800

i965: Fix BRW_BATCH_STRUCT to specify RENDER_RING, not UNKNOWN_RING.

I missed this in the boolean - enum conversion.  C cheerfully casts
false - 0 - UNKNOWN_RING.  On Gen4-5, this causes the render ring
prelude hook to get called in the middle of the batch, which is crazy.

BRW_BATCH_STRUCT is not used on Gen6+.

Fixes regressions since 395a32717df494353703f3581edcd3ba380f16d6
(i965: Introduce an UNKNOWN_RING state.).

Fixes fips -v glxgears on Ironlake.

Signed-off-by: Kenneth Graunke kenn...@whitecape.org
Reviewed-by: Eric Anholt e...@anholt.net

---

 src/mesa/drivers/dri/i965/brw_state.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state.h 
b/src/mesa/drivers/dri/i965/brw_state.h
index 2a4b23c..3f7831c 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -173,8 +173,8 @@ void brw_destroy_caches( struct brw_context *brw );
 /***
  * brw_state_batch.c
  */
-#define BRW_BATCH_STRUCT(brw, s) intel_batchbuffer_data(brw, (s), \
-   sizeof(*(s)), false)
+#define BRW_BATCH_STRUCT(brw, s) \
+   intel_batchbuffer_data(brw, (s), sizeof(*(s)), RENDER_RING)
 
 void *brw_state_batch(struct brw_context *brw,
  enum state_struct_type type,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): pipe-loader: Fix llvmpipe.la path

2013-12-03 Thread Michel Dänzer
Module: Mesa
Branch: master
Commit: 79e651262900c4234046f3661c4c3aa5431c4666
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=79e651262900c4234046f3661c4c3aa5431c4666

Author: Michel Dänzer michel.daen...@amd.com
Date:   Wed Dec  4 11:56:10 2013 +0900

pipe-loader: Fix llvmpipe.la path

Fixes

 make[3]: *** No rule to make target 
`.../src/gallium/drivers/softpipe/libllvmpipe.la', needed by `pipe_swrast.la'.  
Stop.

---

 src/gallium/targets/pipe-loader/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 90b5760..97733c1 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -159,7 +159,7 @@ if HAVE_GALLIUM_LLVMPIPE
 nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
 
 pipe_swrast_la_LIBADD += \
-   $(top_builddir)/src/gallium/drivers/softpipe/libllvmpipe.la \
+   $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
$(LLVM_LIBS)
 pipe_swrast_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit