Marek Olšák | 1 Jan 2012 13:04
Picon

[PATCH] gallium/translate: implement converting into half floats in the generic path

---
 .../auxiliary/translate/translate_generic.c        |   21 ++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c
index e4e1c86..516a1ef 100644
--- a/src/gallium/auxiliary/translate/translate_generic.c
+++ b/src/gallium/auxiliary/translate/translate_generic.c
 <at>  <at>  -32,6 +32,7  <at>  <at> 

 #include "util/u_memory.h"
 #include "util/u_format.h"
+#include "util/u_half.h"
 #include "util/u_math.h"
 #include "pipe/p_state.h"
 #include "translate.h"
 <at>  <at>  -105,6 +106,7  <at>  <at>  emit_##NAME(const float *attrib, void *ptr)		\

 #define TO_64_FLOAT(x)   ((double) x)
 #define TO_32_FLOAT(x)   (x)
+#define TO_16_FLOAT(x)   util_float_to_half(x)

 #define TO_8_USCALED(x)  ((unsigned char) x)
 #define TO_16_USCALED(x) ((unsigned short) x)
 <at>  <at>  -135,6 +137,11  <at>  <at>  ATTRIB( R32G32B32_FLOAT,      3, float, TO_32_FLOAT )
 ATTRIB( R32G32_FLOAT,         2, float, TO_32_FLOAT )
 ATTRIB( R32_FLOAT,            1, float, TO_32_FLOAT )

+ATTRIB( R16G16B16A16_FLOAT,   4, ushort, TO_16_FLOAT )
+ATTRIB( R16G16B16_FLOAT,      3, ushort, TO_16_FLOAT )
(Continue reading)

Marek Olšák | 1 Jan 2012 18:27
Picon

[PATCH] gallium: fix behavior of pipe_buffer_map_range

To match what transfer_map returns. Really, subtracting the offset leads
to bugs if someone expects it to work exactly like transfer_map.
---
 src/gallium/auxiliary/util/u_inlines.h       |    7 ++-----
 src/gallium/auxiliary/util/u_upload_mgr.c    |    4 +++-
 src/gallium/drivers/svga/svga_state_vs.c     |    1 +
 src/mesa/state_tracker/st_cb_bufferobjects.c |    4 ----
 src/mesa/state_tracker/st_draw.c             |   11 ++++++-----
 5 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index 4428390..9660cdc 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
 <at>  <at>  -252,10 +252,7  <at>  <at>  pipe_buffer_map_range(struct pipe_context *pipe,
       return NULL;
    }

-   /* Match old screen->buffer_map_range() behaviour, return pointer
-    * to where the beginning of the buffer would be:
-    */
-   return (void *)((char *)map - offset);
+   return map;
 }

 
 <at>  <at>  -374,7 +371,7  <at>  <at>  pipe_buffer_read(struct pipe_context *pipe,
 					 &src_transfer);

    if (map)
(Continue reading)

Marek Olšák | 1 Jan 2012 18:28
Picon

[PATCH] u_upload_mgr: remove the 'flushed' parameter

Not used by anybody.
---
 src/gallium/auxiliary/util/u_upload_mgr.c        |   15 ++++-----------
 src/gallium/auxiliary/util/u_upload_mgr.h        |    7 ++-----
 src/gallium/auxiliary/util/u_vbuf.c              |    6 ++----
 src/gallium/drivers/r300/r300_render_translate.c |    7 +++----
 src/gallium/drivers/r300/r300_screen_buffer.c    |    3 +--
 src/gallium/drivers/r600/r600_buffer.c           |    8 +++-----
 src/gallium/drivers/r600/r600_translate.c        |    3 +--
 src/gallium/drivers/svga/svga_draw_elements.c    |    4 +---
 src/gallium/drivers/svga/svga_pipe_draw.c        |    4 +---
 9 files changed, 18 insertions(+), 39 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index 936e881..b4b4c91 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
 <at>  <at>  -158,7 +158,6  <at>  <at>  enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
                                 unsigned size,
                                 unsigned *out_offset,
                                 struct pipe_resource **outbuf,
-                                boolean *flushed,
                                 void **ptr )
 {
    unsigned alloc_size = align( size, upload->alignment );
 <at>  <at>  -172,10 +171,6  <at>  <at>  enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
                                                   alloc_offset + alloc_size);
       if (ret != PIPE_OK)
          return ret;
-
(Continue reading)

Christoph Bumiller | 1 Jan 2012 18:46
Picon

Re: [PATCH] st/mesa: use SINT/UINT formats for VertexAttribIPointer

Ping ...

Integer attributes shouldn't be exposed with any drivers that don't
support native integers, so there shouldn't be any extra checks necessary.

On 12/19/2011 04:45 PM, Christoph Bumiller wrote:
> ---
>  src/mesa/state_tracker/st_draw.c          |   63 +++++++++++++++++++++++++++--
>  src/mesa/state_tracker/st_draw.h          |    2 +-
>  src/mesa/state_tracker/st_draw_feedback.c |    3 +-
>  3 files changed, 62 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
> index 87a9978..e8a7fe3 100644
> --- a/src/mesa/state_tracker/st_draw.c
> +++ b/src/mesa/state_tracker/st_draw.c
>  <at>  <at>  -102,6 +102,13  <at>  <at>  static GLuint uint_types_scale[4] = {
>     PIPE_FORMAT_R32G32B32A32_USCALED
>  };
>  
> +static GLuint uint_types_int[4] = {
> +   PIPE_FORMAT_R32_UINT,
> +   PIPE_FORMAT_R32G32_UINT,
> +   PIPE_FORMAT_R32G32B32_UINT,
> +   PIPE_FORMAT_R32G32B32A32_UINT
> +};
> +
>  static GLuint int_types_norm[4] = {
>     PIPE_FORMAT_R32_SNORM,
>     PIPE_FORMAT_R32G32_SNORM,
(Continue reading)

bugzilla-daemon | 1 Jan 2012 22:17

[Bug 43125] [bisected] Start screen in Amnesia too dark after "Rewrite the way uniforms are tracked and handled" commit

https://bugs.freedesktop.org/show_bug.cgi?id=43125

--- Comment #9 from Jure Repinc <jlp.bugs <at> gmail.com> 2012-01-01 13:17:29 PST ---
I also confirm that the patch fixes the problem

--

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Marek Olšák | 2 Jan 2012 01:22
Picon

[PATCH 1/2] gallium: remove deprecated PIPE_TRANSFER_DISCARD

PIPE_TRANSFER_DISCARD_RANGE is defined the same.
---
 src/gallium/auxiliary/vl/vl_compositor.c           |    6 +++---
 src/gallium/auxiliary/vl/vl_idct.c                 |    2 +-
 src/gallium/auxiliary/vl/vl_mpeg12_decoder.c       |    2 +-
 src/gallium/auxiliary/vl/vl_vertex_buffers.c       |    8 ++++----
 src/gallium/auxiliary/vl/vl_zscan.c                |    4 ++--
 src/gallium/drivers/nouveau/nouveau_winsys.h       |    2 +-
 src/gallium/drivers/r300/r300_screen_buffer.c      |    2 +-
 src/gallium/drivers/r600/r600_buffer.c             |    2 +-
 .../drivers/svga/svga_resource_buffer_upload.c     |    2 +-
 src/gallium/drivers/svga/svga_swtnl_backend.c      |    2 +-
 src/gallium/include/pipe/p_defines.h               |    1 -
 11 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index f20941b..3631145 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
 <at>  <at>  -502,14 +502,14  <at>  <at>  gen_vertex_data(struct vl_compositor *c, struct u_rect *dirty)
    assert(c);

    vb = pipe_buffer_map(c->pipe, c->vertex_buf.buffer,
-                        PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD | PIPE_TRANSFER_DONTBLOCK,
+                        PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | PIPE_TRANSFER_DONTBLOCK,
                         &buf_transfer);

    if (!vb) {
       // If buffer is still locked from last draw create a new one
       create_vertex_buffer(c);
(Continue reading)

Marek Olšák | 2 Jan 2012 01:22
Picon

[PATCH 2/2] gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY

Please see the diff for further info.

This paves the way for moving user buffer uploads out of drivers and should
allow to clean up the mess in u_upload_mgr in the meantime.

For now only allowed for buffers on r300 and r600.
---
 src/gallium/drivers/i915/i915_resource_buffer.c  |    7 ++++++-
 src/gallium/drivers/i915/i915_resource_texture.c |    7 ++++++-
 src/gallium/drivers/llvmpipe/lp_texture.c        |    4 ++++
 src/gallium/drivers/nouveau/nouveau_buffer.c     |    8 +++++++-
 src/gallium/drivers/nv50/nv50_transfer.c         |    2 +-
 src/gallium/drivers/nvc0/nvc0_transfer.c         |    2 +-
 src/gallium/drivers/nvfx/nvfx_transfer.c         |    3 +++
 src/gallium/drivers/r300/r300_transfer.c         |    4 ++++
 src/gallium/drivers/r600/r600_texture.c          |    4 ++++
 src/gallium/drivers/svga/svga_resource_buffer.c  |    4 ++++
 src/gallium/drivers/svga/svga_resource_texture.c |    2 +-
 src/gallium/include/pipe/p_defines.h             |   16 ++++++++++++++++
 12 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c
index 77c0345..c54e481 100644
--- a/src/gallium/drivers/i915/i915_resource_buffer.c
+++ b/src/gallium/drivers/i915/i915_resource_buffer.c
 <at>  <at>  -68,8 +68,13  <at>  <at>  i915_get_transfer(struct pipe_context *pipe,
                   const struct pipe_box *box)
 {
    struct i915_context *i915 = i915_context(pipe);
-   struct pipe_transfer *transfer = util_slab_alloc(&i915->transfer_pool);
(Continue reading)

bugzilla-daemon | 2 Jan 2012 02:35

[Bug 32678] egl_gallium driver doesn't support EGL_KHR_image_pixmap extension

https://bugs.freedesktop.org/show_bug.cgi?id=32678

Cristian Magherusan-Stanciu <cristi.magherusan <at> gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cristi.magherusan <at> gmail.com

--

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
bugzilla-daemon | 2 Jan 2012 02:44

[Bug 32678] egl_gallium driver doesn't support EGL_KHR_image_pixmap extension

https://bugs.freedesktop.org/show_bug.cgi?id=32678

--- Comment #3 from Cristian Magherusan-Stanciu <cristi.magherusan <at> gmail.com> 2012-01-01 17:44:30
PST ---
Hi,

I am interested in getting this EGL extension supported on the client side. I'm
playing with Mer/Nemo inside a Virtualbox image and it looks like I need this
for getting the compositor to work properly, because the UI is currently broken
without it.

So I would like to implement support for it, but I am completely new to Mesa or
X11 development(I know a bit of C, though) so I have no idea how to start. Can
you provide me any documentation, hints or examples on how I could get this
implemented? Any help would be appreciated.

Thanks,
Cristian

--

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Kenneth Graunke | 2 Jan 2012 11:33

Re: [PATCH] glsl/gallium: add a remove_output lowering pass

On 12/31/2011 03:52 PM, Vincent Lejeune wrote:
> Current glsl_to_tgsi::remove_output_read pass did not work properly when
> indirect addressing was involved ; this commit replaces it with
> a lowering pass that occurs before glsl_to_tgsi visitor is called.
> This patch fix varying-array related piglit test.
> ---
>  src/glsl/Makefile.sources                  |    1 +
>  src/glsl/lower_remove_output_read.cpp      |   97 ++++++++++++++++++++++++++++
>  src/glsl/lower_remove_output_read.h        |   62 ++++++++++++++++++
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp |   20 ++++--
>  4 files changed, 172 insertions(+), 8 deletions(-)
>  create mode 100644 src/glsl/lower_remove_output_read.cpp
>  create mode 100644 src/glsl/lower_remove_output_read.h

Vincent,

I like this!  I have a couple of comments below.  To save some trouble,
I've actually gone ahead and made the changes, and will send out a
proposed v2 of this patch shortly.

> diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
> index c65bfe4..6c80089 100644
> --- a/src/glsl/Makefile.sources
> +++ b/src/glsl/Makefile.sources
>  <at>  <at>  -60,6 +60,7  <at>  <at>  LIBGLSL_CXX_SOURCES := \
>  	lower_vec_index_to_cond_assign.cpp \
>  	lower_vec_index_to_swizzle.cpp \
>  	lower_vector.cpp \
> +	lower_remove_output_read.cpp \
>  	opt_algebraic.cpp \
(Continue reading)


Gmane