[Mesa-dev] [PATCH 08/10] tgsi: s/unsigned/enum pipe_shader_type/ in ureg code

2018-02-07 Thread Brian Paul
And add a default switch case to silence a compiler warning. --- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 9 ++--- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c

[Mesa-dev] [PATCH 10/10] tgsi: use TGSI_INTERPOLATE_x arguments instead of zeros in ureg code

2018-02-07 Thread Brian Paul
TGSI_INTERPOLATE_CONSTANT and TGSI_INTERPOLATE_LOC_CENTER have the value zero so there's no change in behavior. It seems funny to declare these fs input registers with constant interpolation. But it looks like ureg_DECL_input_layout() is not called anywhere and ureg_DECL_input() is only called

[Mesa-dev] [PATCH 09/10] gallium/util: s/uint/enum tgsi_semantic/ in simple shader code

2018-02-07 Thread Brian Paul
--- src/gallium/auxiliary/util/u_simple_shaders.c | 4 ++-- src/gallium/auxiliary/util/u_simple_shaders.h | 4 ++-- src/gallium/auxiliary/util/u_tests.c | 2 +- src/gallium/tests/trivial/quad-tex.c | 4 ++-- src/gallium/tests/trivial/tri.c | 8 5 files

[Mesa-dev] [PATCH 04/10] gallium/util: trivial whitespace/formatting fixes in u_blit.c

2018-02-07 Thread Brian Paul
/auxiliary/util/u_blit.c @@ -28,7 +28,7 @@ /** * @file * Copy/blit pixel rect between surfaces - * + * * @author Brian Paul */ @@ -180,12 +180,12 @@ set_fragment_shader(struct blit_state *ctx, assert(stype == TGSI_RETURN_TYPE_FLOAT); idx = 3; if (!ctx->fs[pipe_tex][

[Mesa-dev] [PATCH 06/10] st/mesa: s/unsigned/enum tgsi_semantic/ st_cb_drawpixels.c

2018-02-07 Thread Brian Paul
--- src/mesa/state_tracker/st_cb_drawpixels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index ff3eb9b..c855a90 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++

[Mesa-dev] [PATCH 01/10] st/mesa: rename some vars related to indirect draw count

2018-02-07 Thread Brian Paul
'indirect_params' was a bit vague. Use the names that we use in gallium's pipe_draw_indirect_info. --- src/mesa/state_tracker/st_draw.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index

[Mesa-dev] [PATCH 02/10] cso: add a couple sanity check assertions in cso_draw_vbo()

2018-02-07 Thread Brian Paul
--- src/gallium/auxiliary/cso_cache/cso_context.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index dd9821e..1b5d4b5 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++

[Mesa-dev] [PATCH 05/10] vbo: add a comment on vbo_draw_transform_feedback()

2018-02-07 Thread Brian Paul
--- src/mesa/vbo/vbo_exec_array.c | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 9ce0aa3..25abe09 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -1416,6 +1416,14 @@

[Mesa-dev] [PATCH 03/10] vbo: improve comments on vbo_draw_func()

2018-02-07 Thread Brian Paul
And rename a parameter name. --- src/mesa/vbo/vbo.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index a04f9b8..d594ba8 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -149,9 +149,10 @@ vbo_save_EndCallList(struct

Re: [Mesa-dev] [PATCH] glxinfo/wglinfo: query/print more GL limits

2018-02-07 Thread Brian Paul
On 02/07/2018 10:12 AM, Eric Engestrom wrote: On Wednesday, 2018-02-07 08:48:06 -0700, Brian Paul wrote: Query/print limits for GL 3.0 through GL 4.6, plus GL_ARB_transform_feedback3. Also, print the GL extension or GL version for each set of queries to make it more readable. --- src/xdemos

Re: [Mesa-dev] [PATCH] mesa: add glsl version query (v2)

2018-02-07 Thread Brian Paul
On 02/07/2018 03:01 AM, Vadym Shovkoplias wrote: Add support for GL_NUM_SHADING_LANGUAGE_VERSIONS and glGetStringi for GL_SHADING_LANGUAGE_VERSION v2: - Combine similar functionality into _mesa_get_shading_language_version() function. - Cahnge GLSL version return mechanism.

[Mesa-dev] [PATCH] glxinfo/wglinfo: query/print more GL limits

2018-02-07 Thread Brian Paul
Query/print limits for GL 3.0 through GL 4.6, plus GL_ARB_transform_feedback3. Also, print the GL extension or GL version for each set of queries to make it more readable. --- src/xdemos/glinfo_common.c | 127 - 1 file changed, 125 insertions(+), 2

[Mesa-dev] [PATCH 1/3] st/mesa: rename some vars related to indirect draw count

2018-02-06 Thread Brian Paul
'indirect_params' was a bit vague. Use the names that we use in gallium's pipe_draw_indirect_info. --- src/mesa/state_tracker/st_draw.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index

[Mesa-dev] [PATCH 3/3] vbo: improve comments on vbo_draw_func()

2018-02-06 Thread Brian Paul
And rename a parameter name. --- src/mesa/vbo/vbo.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index a04f9b8..d594ba8 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -149,9 +149,10 @@ vbo_save_EndCallList(struct

[Mesa-dev] [PATCH 2/3] cso: add a couple sanity check assertions in cso_draw_vbo()

2018-02-06 Thread Brian Paul
--- src/gallium/auxiliary/cso_cache/cso_context.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index dd9821e..1b5d4b5 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++

[Mesa-dev] [PATCH 1/6] gallium/util: replace unsigned with tgsi enum types

2018-02-06 Thread Brian Paul
--- src/gallium/auxiliary/util/u_simple_shaders.c | 36 ++- src/gallium/auxiliary/util/u_simple_shaders.h | 29 ++--- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c

[Mesa-dev] [PATCH 3/6] st/mesa: use TGSI enum types in st_glsl_to_tgsi.cpp

2018-02-06 Thread Brian Paul
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index c92b1d9..5e1674c 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp

[Mesa-dev] [PATCH 6/6] tgsi: use tgsi_semantic enum type in ureg code

2018-02-06 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 24 src/gallium/auxiliary/tgsi/tgsi_ureg.h | 22 +++--- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index

[Mesa-dev] [PATCH 2/6] gallium/util: replace uint with tgsi enum types

2018-02-06 Thread Brian Paul
--- src/gallium/auxiliary/util/u_blit.c | 9 + src/gallium/auxiliary/util/u_blit.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index 3f92476..7178e89 100644 ---

[Mesa-dev] [PATCH 4/6] tgsi: use TGSI enum types in ureg code

2018-02-06 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 62 ++ src/gallium/auxiliary/tgsi/tgsi_ureg.h | 44 2 files changed, 55 insertions(+), 51 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c

[Mesa-dev] [PATCH 5/6] st/mesa: use tgsi_semantic enum type

2018-02-06 Thread Brian Paul
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 10 ++ src/mesa/state_tracker/st_glsl_to_tgsi.h | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 5e1674c..39a81fa

Re: [Mesa-dev] [PATCH 2/2] u_blit, u_simple_shaders: add shader to convert from xrbias format

2018-02-06 Thread Brian Paul
unsigned tex_target); + extern void * util_make_fragment_tex_shader_writemask(struct pipe_context *pipe, unsigned tex_target, Looks fine otherwise. Reviewed-by: Brian Paul <bri...@vmware.com> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] u_simple_shaders: fix mask handling in util_make_fragment_tex_shader_writemask

2018-02-06 Thread Brian Paul
ontext *pipe, if (writemask != TGSI_WRITEMASK_XYZW) { struct ureg_src imm = ureg_imm4f( ureg, 0, 0, 0, 1 ); - ureg_MOV( ureg, out, imm ); + ureg_MOV(ureg, temp, imm); } if (tex_target == TGSI_TEXTURE_BUFFER) Reviewed-by: Brian Paul <bri...@v

Re: [Mesa-dev] [PATCH] mesa: add glsl version query

2018-02-06 Thread Brian Paul
On 02/06/2018 09:32 AM, Vadym Shovkoplias wrote: From: Vadym Shovkoplias Add support for GL_NUM_SHADING_LANGUAGE_VERSIONS and glGetStringi for GL_SHADING_LANGUAGE_VERSION Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104915 Signed-off-by: Andriy

[Mesa-dev] [PATCH 2/2] mesa: minor whitespace fixes, line wrapping in texcompress.c

2018-02-06 Thread Brian Paul
--- src/mesa/main/texcompress.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index 1cc13a5..1c128e4 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -361,25

[Mesa-dev] [PATCH 1/2] mesa: simplify _mesa_get_compressed_formats()

2018-02-06 Thread Brian Paul
Instead of testing for formats==NULL everywhere, just point formats at a dummy array which will be discarded. --- src/mesa/main/texcompress.c | 200 ++-- 1 file changed, 83 insertions(+), 117 deletions(-) diff --git a/src/mesa/main/texcompress.c

Re: [Mesa-dev] [PATCH] mesa: Factor out _mesa_disable_vertex_array_attrib.

2018-02-06 Thread Brian Paul
All three look good to me. Reviewed-by: Brian Paul <bri...@vmware.com> On 02/06/2018 12:59 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich <mathias.froehl...@web.de> Hi, Simple code deduplication and factoring out a function that will be usefull soon. please re

Re: [Mesa-dev] [PATCH v2] util: remove redundant check for the __clang__ macro

2018-02-06 Thread Brian Paul
-# if defined(__GNUC__) || defined(__clang__) +# if defined(__GNUC__) #define ALWAYS_INLINE inline __attribute__((always_inline)) # elif defined(_MSC_VER) #define ALWAYS_INLINE __forceinline Thanks! Reviewed-by: Brian Paul <bri...@vmware.com> Do you need me to push this f

Re: [Mesa-dev] [PATCH 0/3] Fix and tweak to the VAO v2

2018-02-05 Thread Brian Paul
On 02/05/2018 03:19 PM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich Hi Brian, Actually after incorporating your review requests to set gl_vertex_array::Size and gl_vertex_array::Ptr to zero, radeonsi started to assert in Bitmap/CopyPixels/DrawPixels.

Re: [Mesa-dev] [PATCH] util: remove redundant check for the __clang__ macro

2018-02-05 Thread Brian Paul
as __attribute__(...), code only checks for __GNUC__. Should I add comments there as well? 2018-02-05 22:51 GMT+02:00 Brian Paul <bri...@vmware.com>: On 02/05/2018 01:44 PM, Vlad Golovkin wrote: Clang defines __GNUC__ macro, so one doesn't need to check __clang__ macro in this particular case. P

Re: [Mesa-dev] [PATCH] util: remove redundant check for the __clang__ macro

2018-02-05 Thread Brian Paul
On 02/05/2018 01:44 PM, Vlad Golovkin wrote: Clang defines __GNUC__ macro, so one doesn't need to check __clang__ macro in this particular case. Perhaps mention that in a comment below so there's no confusion. -Brian --- src/util/macros.h | 2 +- 1 file changed, 1 insertion(+), 1

[Mesa-dev] [PATCH] mesa: rename gl_vertex_array_object::_VertexAttrib -> _VertexArray

2018-02-05 Thread Brian Paul
Since the type is gl_vertex_array. Update comment to explain that these arrays are only used by the VBO module. Also rename some local variables in _mesa_update_vao_derived_arrays(). --- src/mesa/main/arrayobj.c | 13 ++--- src/mesa/main/attrib.c| 2 +-

[Mesa-dev] [PATCH 2/3] st/mesa: refactor st_bufferobj_map_range()

2018-02-05 Thread Brian Paul
Use a new helper function, st_access_flags_to_transfer_flags(), to convert the GL_MAP_x flags to PIPE_TRANSFER_x flags. We'll be able to use this function in a couple other places. --- src/mesa/state_tracker/st_cb_bufferobjects.c | 38

[Mesa-dev] [PATCH 3/3] st/mesa: use st_access_flags_to_transfer_flags() helper in more places

2018-02-05 Thread Brian Paul
--- src/mesa/state_tracker/st_cb_fbo.c | 18 +- src/mesa/state_tracker/st_cb_texture.c | 17 - 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 3a5c03c..0800f5b

[Mesa-dev] [PATCH 1/3] st/mesa: refactor bufferobj_data()

2018-02-05 Thread Brian Paul
Split out some of the code into three new helper functions: buffer_target_to_bind_flags(), storage_flags_to_buffer_flags(), buffer_usage() to make the code more managable. --- src/mesa/state_tracker/st_cb_bufferobjects.c | 191 +++ 1 file changed, 104 insertions(+), 87

Re: [Mesa-dev] [PATCH 2/2] mesa: Only update enabled VAO gl_vertex_array entries.

2018-02-05 Thread Brian Paul
(ctx, >BufferObj, NULL); Maybe also set dst->Ptr = NULL here so that we're more likely to catch any bugs where we might reference stale array state. Maybe set dst->Size=0 too. I'd also put a comment to the effect that the dst values should not be consumed by anything when !attribs->Enabled. Otherwise, for both: Reviewed-by: Brian Paul <bri...@vmware.com> + } } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/4] mesa: (trivial) remove unused ignore_sample_qualifier_parameter

2018-02-05 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 02/04/2018 04:01 PM, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> This parameter for _mesa_get_min_incations_per_fragment() was once used by the intel driver, but it's long gone. --- src/mesa/progr

[Mesa-dev] [PATCH] gallivm/llvmpipe: add const qualifiers on sampler variables

2018-02-01 Thread Brian Paul
Once a lp_build_sampler_soa or lp_build_sampler_aos object is created, it should never be modified. Found by inspection. --- src/gallium/auxiliary/draw/draw_llvm.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 8 src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 2

Re: [Mesa-dev] [PATCH 0/8] Partly untangle pos/generic0 aliasing dependencies v2.

2018-02-01 Thread Brian Paul
deonsi, i965 and classical swrast. The v2 version incorporating the reiview comments was not yet run on piglit. Please review. Looks good. Reviewed-by: Brian Paul <bri...@vmware.com> I don't remember, do you need me to push these for you? -Brian

Re: [Mesa-dev] [PATCH 3/4] vbo: add comments on the VBO draw function typedefs

2018-02-01 Thread Brian Paul
On 02/01/2018 03:49 AM, Ilia Mirkin wrote: On Wed, Jan 31, 2018 at 10:39 PM, Brian Paul <bri...@vmware.com> wrote: And rename indirect_params -> indirect_draw_count_buffer and indirect_params_offset -> indirect_draw_count_offset to be more specific. --- src/mesa/vb

[Mesa-dev] [PATCH 2/4] vbo: s/drawcount/drawcount_offset

2018-01-31 Thread Brian Paul
This parameter (from the glMultiDrawArraysIndirectCountARB function) is poorly named. It's an offset into the buffer which contains the number of primitives to draw. --- src/mesa/vbo/vbo_exec_array.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCH 4/4] vbo: change an argument in vbo_draw_indirect_prims()

2018-01-31 Thread Brian Paul
In vbo_draw_indirect_prims() pass the 'indirect_data' argument to vbo->draw_prims(). All the callers are passing ctx->DrawIndirectBuffer so this should be no functional change. Add a (temporary) assertion to be sure. --- src/mesa/vbo/vbo_context.c | 17 - 1 file changed, 12

[Mesa-dev] [PATCH 1/4] vbo: use vbo local var for draw call in vbo_save_playback_vertex_list()

2018-01-31 Thread Brian Paul
--- src/mesa/vbo/vbo_save_draw.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 906ed22..859c605 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -282,13 +282,13 @@

[Mesa-dev] [PATCH 3/4] vbo: add comments on the VBO draw function typedefs

2018-01-31 Thread Brian Paul
And rename indirect_params -> indirect_draw_count_buffer and indirect_params_offset -> indirect_draw_count_offset to be more specific. --- src/mesa/vbo/vbo.h | 57 -- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH] util/draw: draw_count not supported in util_draw_indirect()

2018-01-31 Thread Brian Paul
So assert that and add a comment about it. It would be a simple project for someone to add support for both draw_count and the indirect_draw_count buffer. --- src/gallium/auxiliary/util/u_draw.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/util/u_draw.c

[Mesa-dev] [PATCH] st/mesa: rename some vars related to indirect draw count

2018-01-31 Thread Brian Paul
'indirect_params' was a bit vague. Use the names that we use in gallium's pipe_draw_indirect_info. --- src/mesa/state_tracker/st_draw.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index

[Mesa-dev] [PATCH 4/4] svga: remove unneeded #includes in svga_pipe_draw.c

2018-01-31 Thread Brian Paul
--- src/gallium/drivers/svga/svga_pipe_draw.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c index 8cd7ab0..ee4a105 100644 --- a/src/gallium/drivers/svga/svga_pipe_draw.c +++

[Mesa-dev] [PATCH 2/4] svga: clean up retry_draw_range_elements(), retry_draw_arrays()

2018-01-31 Thread Brian Paul
Get rid of a bunch of goto spaghetti. Remove unneeded do_retry parameter. No Piglit changes. Also tested w/ Google Earth and other apps. --- src/gallium/drivers/svga/svga_pipe_draw.c | 81 +++ 1 file changed, 27 insertions(+), 54 deletions(-) diff --git

[Mesa-dev] [PATCH 3/4] svga: whitespace/formatting fixes in svga_pipe_draw.c

2018-01-31 Thread Brian Paul
--- src/gallium/drivers/svga/svga_pipe_draw.c | 67 --- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c index 42525c3..8cd7ab0 100644 ---

[Mesa-dev] [PATCH 1/4] svga: remove unused min/max_index params to draw_vgpu10()

2018-01-31 Thread Brian Paul
--- src/gallium/drivers/svga/svga_draw.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index 5771903..649bc22 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++

Re: [Mesa-dev] [PATCH 1/8] vbo: Correctly handle attribute offsets in dlist draw.

2018-01-31 Thread Brian Paul
On 01/31/2018 09:54 AM, Brian Paul wrote: Hi Matthias, Nice work!  It's nice to get rid of some of those attribute loops. The series looks good to me, just assorted nit-picks and comments on a few patches. Oh, and it might be good to write a new piglit test or two to exercise the POS

Re: [Mesa-dev] [PATCH 5/8] vbo: Use static const VERT_ATTRIB->VBO_ATTRIB maps.

2018-01-31 Thread Brian Paul
On 01/31/2018 12:55 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich Instead of each context having its own map instance for this purpose, use a global static const map. Signed-off-by: Mathias Fröhlich ---

Re: [Mesa-dev] [PATCH 4/8] mesa: Track position/generic0 aliasing in the VAO.

2018-01-31 Thread Brian Paul
On 01/31/2018 12:55 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich Since the first material attribute no longer aliases with the generic0 attribute, only aliasing between generic0 and position is left and entirely dependent on the enabled state of the

Re: [Mesa-dev] [PATCH 1/8] vbo: Correctly handle attribute offsets in dlist draw.

2018-01-31 Thread Brian Paul
Hi Matthias, Nice work! It's nice to get rid of some of those attribute loops. The series looks good to me, just assorted nit-picks and comments on a few patches. -Brian On 01/31/2018 12:55 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich When

Re: [Mesa-dev] [PATCH 3/8] mesa: Put materials at the end of the generic block.

2018-01-31 Thread Brian Paul
On 01/31/2018 12:55 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich The materials are now moved to the end of the generic attributes block to the range 4-15. Before, the way the position and generic 0 attribute is handled was dependent on the presence and

Re: [Mesa-dev] misc pahole repacking

2018-01-31 Thread Brian Paul
On 01/31/2018 01:48 AM, Tapani Pälli wrote: Reviewed-by: Tapani Pälli (I verified the 1st one and I trust you on the 2nd one.) BTW I witnessed pahole crashing when processing visit() methods of ir_print_visitor class, did you experience that? My pahole version is

Re: [Mesa-dev] [PATCH] mesa: fix broken glGet*(GL_POLYGON_MODE) query

2018-01-30 Thread Brian Paul
-by: Roland Scheidegger <srol...@vmware.com> Am 31.01.2018 um 03:35 schrieb Brian Paul: This reverts part of the patch which introduced the GLenum16 change. Fixes a conform regression found by Roland. Fixes: f96a69f916aed405 ("mesa: replace GLenum with GLenum16 in common structures (v4)&

[Mesa-dev] [PATCH 2/2] st/mesa: whitespace, formatting fixes in st_glsl_to_tgsi.cpp

2018-01-30 Thread Brian Paul
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 273 ++--- 1 file changed, 169 insertions(+), 104 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index a1e37cf..c92b1d9 100644 ---

[Mesa-dev] [PATCH 1/2] st/mesa: s/int/GLenum/ in st_glsl_to_tgsi.cpp

2018-01-30 Thread Brian Paul
--- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 84ed614..a1e37cf 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp

[Mesa-dev] [PATCH 1/2] svga: s/unsigned/VGPU10_OPCODE_TYPE/

2018-01-30 Thread Brian Paul
--- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 2f16935..da520be 100644 ---

[Mesa-dev] [PATCH 2/2] svga: use opcode local var to simplify some code

2018-01-30 Thread Brian Paul
--- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index da520be..73aa78b 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++

[Mesa-dev] [PATCH] mesa: fix broken glGet*(GL_POLYGON_MODE) query

2018-01-30 Thread Brian Paul
This reverts part of the patch which introduced the GLenum16 change. Fixes a conform regression found by Roland. Fixes: f96a69f916aed405 ("mesa: replace GLenum with GLenum16 in common structures (v4)") --- src/mesa/main/get_hash_params.py | 2 +- src/mesa/main/mtypes.h | 4 ++-- 2

Re: [Mesa-dev] [PATCH] mesa: fix glGet MAX_VERTEX_ATTRIB queries

2018-01-30 Thread Brian Paul
On 01/30/2018 07:25 PM, Roland Scheidegger wrote: FWIW the same commit also broke conform (completely - it will refuse to run even a single test due to failing mustpass). Default State test failed. State Report. (Current) <-> (Default) GL_POLYGON_MODE (State Information)

Re: [Mesa-dev] [PATCH] mesa: fix glGet MAX_VERTEX_ATTRIB queries

2018-01-30 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 01/30/2018 02:46 PM, Marek Olšák wrote: From: Marek Olšák <marek.ol...@amd.com> Broken by f96a69f916aed40519e755d0460a83940a587 --- src/mesa/main/get_hash_params.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: [Mesa-dev] [PATCH] mesa: remove invalid assertion in _mesa_enable_vertex_array_attrib()

2018-01-30 Thread Brian Paul
18:14 schrieb Brian Paul: The meta module passes some 0-based attrib values. Should fix Piglit regressions reported by Mark Janes. Bugzilla: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D104863=DwIGaQ=uilaK90D4TOVoH58JNXRgQ=

[Mesa-dev] [PATCH] mesa: remove invalid assertion in _mesa_enable_vertex_array_attrib()

2018-01-30 Thread Brian Paul
The meta module passes some 0-based attrib values. Should fix Piglit regressions reported by Mark Janes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104863 --- src/mesa/main/varray.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c

Re: [Mesa-dev] [PATCH 7/8] mesa: rename some 'client' array functions

2018-01-30 Thread Brian Paul
: Assertion `attrib >= VERT_ATTRIB_GENERIC0' failed. Should we revert the series? This needs to be corrected immediately. I'll post a patch to remove the assertion. It appears to be hit via the meta code, which is not used by gallium. -Brian Brian Paul <bri...@vmware.com> writes: A long

Re: [Mesa-dev] [PATCH 8/8] mesa: use gl_vert_attrib enum type in more places

2018-01-30 Thread Brian Paul
On 01/30/2018 01:38 AM, Gert Wollny wrote: Am Montag, den 29.01.2018, 13:42 -0700 schrieb Brian Paul: Slightly better readbility. --- src/mesa/main/arrayobj.c | 2 +- src/mesa/main/varray.c | 12 ++-- src/mesa/main/varray.h | 4 ++-- 3 files changed, 9 insertions(+), 9

[Mesa-dev] [PATCH] mesa: shrink size of gl_array_attributes (v2)

2018-01-29 Thread Brian Paul
Inspired by Marek's earlier patch, but even smaller. Sort fields from largest to smallest. Use bitfields for more fields (sometimes with an extra bit for MSVC). Reduce Stride field to GLshort. Note that some fields cannot be bitfields because they're accessed via pointers (such as for

[Mesa-dev] [PATCH] mesa: fix incorrect size/error test in _mesa_GetUnsignedBytevEXT()

2018-01-29 Thread Brian Paul
get_value_size() returns -1 for an error. The similar check in _mesa_GetUnsignedBytei_vEXT() is correct. Found by chance. There are apparently no Piglit tests which exercise glGetUnsignedBytei_vEXT() or glGetUnsignedBytevEXT(). --- src/mesa/main/get.c | 2 +- 1 file changed, 1 insertion(+), 1

[Mesa-dev] [PATCH 2/2] mesa: shrink size of gl_array_attribs

2018-01-29 Thread Brian Paul
Inspired by Marek's earlier patch, but even smaller. Sort fields from largest to smallest. Use bitfields for more fields. Reduce Stride field to GLshort. Reduces size from 48 to 24 bytes. Also reduces size of gl_vertex_array_object from 3632 to 2864 bytes. --- src/mesa/main/arrayobj.c | 4

[Mesa-dev] [PATCH 1/2] mesa: shrink gl_vertex_array

2018-01-29 Thread Brian Paul
Inspired by Marek's earlier patch, but goes a little further. Sort fields from largest to smallest. Use bitfields. Reduced from 48 bytes to 32. Also reduces size of gl_vertex_array_object from 4144 to 3632 --- src/mesa/main/mtypes.h | 21 +++-- 1 file changed, 11 insertions(+),

[Mesa-dev] [PATCH 7/8] mesa: rename some 'client' array functions

2018-01-29 Thread Brian Paul
A long time ago gl_vertex_array was gl_client_array. Update some function names to be consistent. --- src/mesa/main/arrayobj.c | 6 +++--- src/mesa/main/arrayobj.h | 4 ++-- src/mesa/main/attrib.c | 2 +- src/mesa/main/state.c| 2 +- src/mesa/main/varray.c | 4 ++--

[Mesa-dev] [PATCH 8/8] mesa: use gl_vert_attrib enum type in more places

2018-01-29 Thread Brian Paul
Slightly better readbility. --- src/mesa/main/arrayobj.c | 2 +- src/mesa/main/varray.c | 12 ++-- src/mesa/main/varray.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index ea9b316..1951638 100644 ---

[Mesa-dev] [PATCH 1/8] mesa: rename some vars in client_state()

2018-01-29 Thread Brian Paul
--- src/mesa/main/enable.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index c859a7a..0b3de52 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -64,46

[Mesa-dev] [PATCH 5/8] mesa: check/assert array index in _mesa_bind_vertex_buffer()

2018-01-29 Thread Brian Paul
--- src/mesa/main/varray.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index bda1c5a..2801a6f 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -166,6 +166,7 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx,

[Mesa-dev] [PATCH 2/8] mesa: add an assertion in _mesa_enable_vertex_array_attrib()

2018-01-29 Thread Brian Paul
Some of the enable/disable vertex array functions take a zero-based generic index, while others take a VERT_ATTRIB_GENERIC0-based value. Add an assertion to clarify that in one place. --- src/mesa/main/varray.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/varray.c

[Mesa-dev] [PATCH 6/8] mesa: s/src/attribs/ in _mesa_update_client_array()

2018-01-29 Thread Brian Paul
--- src/mesa/main/varray.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index 93f2f47..19506bf 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -55,19 +55,19 @@

[Mesa-dev] [PATCH 4/8] mesa: improve comment for gl_array_attributes::BufferBindingIndex

2018-01-29 Thread Brian Paul
--- src/mesa/main/mtypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b0eeeaf..95f6319 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1538,7 +1538,8 @@ struct gl_array_attributes GLboolean

[Mesa-dev] [PATCH 3/8] mesa: trivial comment typo fix in arrayobj.c

2018-01-29 Thread Brian Paul
--- src/mesa/main/arrayobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 2810647..b862f0f 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -222,7 +222,7 @@ _mesa_reference_vao_(struct

Re: [Mesa-dev] [PATCH 11/11] vbo: overhaul display list vertex array setup/binding code

2018-01-29 Thread Brian Paul
ays entries to save memory fails when skipping the masked out arrays. Can you provide a concrete example of what you mean? Thanks for reviewing! -Brian best Mathias On Thursday, 25 January 2018 00:20:35 CET Brian Paul wrote: Do more of the vertex array setup at display list compilation t

Re: [Mesa-dev] [PATCH 10/11] vbo: optimize loops in bind_vertex_list(), vbo_exec_bind_arrays()

2018-01-29 Thread Brian Paul
:34 CET Brian Paul wrote: Instead of looping over 32 attributes, just scan the enabled attrib bits. This involves manipulating the 'enabled' attributes variable depending on whether we're using legacy GL or a vertex shader. We can remove the varying_inputs variable since it's the same as the new

[Mesa-dev] [PATCH] mesa: replace GLenum with GLenum16 in common structures (v4)

2018-01-29 Thread Brian Paul
t = 22096 -> 20608 bytes Reviewed-by: Brian Paul <bri...@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com> --- src/mesa/drivers/common/meta.h | 2 +- src/mesa/drivers/dri/nouveau/nv04_state_frag.c | 4 +- src/mesa/drivers/dri/nouveau/nv10_state_frag.c

Re: [Mesa-dev] [PATCH 01/20] mesa: replace GLenum with GLenum16 in common structures (v2)

2018-01-29 Thread Brian Paul
Just FYI, I've rebased this patch to ToT Mesa and incorporated Ian's nit-picks. I checked with Marek and he's good with me pushing it. I'll do so today if there's no other concerns. -Brian On 11/22/2017 02:00 PM, Ian Romanick wrote: There are a couple small nits below. I haven't reviewed

Re: [Mesa-dev] [PATCH 7/8] mesa: Reduce ffvertex_prog state_key to 36 bytes.

2018-01-29 Thread Brian Paul
key. Signed-off-by: Mathias Fröhlich <mathias.froehl...@web.de> The series looks good tome. Reviewed-by: Brian Paul <bri...@vmware.com> Can you push this or do you need me to do it? -Brian --- src/mesa/main/ffvertex_prog.c | 29 +++-- 1 file changed, 15

Re: [Mesa-dev] [PATCH] mesa: Remove unused gl_fog_attrib::_Scale.

2018-01-29 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 01/27/2018 08:38 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich <mathias.froehl...@web.de> Hi all, The patch removes a variable that is only written to. Please review. best Mathias Signed-off-by: Mathias Fröhlich <

Re: [Mesa-dev] [PATCH] mesa/st/glsl_to_tgsi: Mark first write as unconditional when apropriate

2018-01-29 Thread Brian Paul
ord the write accordingly. I don't really understand the code, but the patch looks OK to me. Reviewed-by: Brian Paul <bri...@vmware.com> I can push this in a bit. Fixes: 807e2539e512ca6c96f059da855473eb7be99ba1 mesa/st/glsl_to_tgsi: Add tracking of ifelse writes in register merging Bugzill

[Mesa-dev] [PATCH 1/3] mesa: change gl_compile_status enums to uppercase

2018-01-26 Thread Brian Paul
To follow the convention of other enums. --- src/compiler/glsl/glsl_parser_extras.cpp | 14 +++--- src/compiler/glsl/shader_cache.cpp | 2 +- src/mesa/drivers/common/meta.c | 2 +- src/mesa/main/ff_fragment_shader.cpp | 2 +- src/mesa/main/glspirv.c

[Mesa-dev] [PATCH 3/3] mesa: remove MESA_FUNCTION

2018-01-26 Thread Brian Paul
Just use __func__ in the two macros where it was used. --- src/mesa/main/context.h | 4 ++-- src/mesa/main/mtypes.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 5d9e2ed..86be66f 100644 --- a/src/mesa/main/context.h

[Mesa-dev] [PATCH 2/3] mesa: change gl_link_status enums to uppercase

2018-01-26 Thread Brian Paul
follow the convention of other enums. --- src/compiler/glsl/linker.cpp | 6 +++--- src/compiler/glsl/shader_cache.cpp | 2 +- src/compiler/glsl/standalone.cpp | 2 +- src/mesa/drivers/dri/i965/brw_cs.c | 4 ++--

[Mesa-dev] [PATCH] mesa: silence MinGW 'may be unused uninitialized' warning in get.c

2018-01-25 Thread Brian Paul
The warning happens on line 2114 for the memcpy(data, p, size) call. I'm not sure why that generates the warning but not the earlier use of p in the code. --- src/mesa/main/get.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index

Re: [Mesa-dev] [PATCH] mesa: Fix function pointers initialization in status tracker

2018-01-25 Thread Brian Paul
functions->GetDeviceUuid = st_get_driver_uuid; + functions->GetDriverUuid = st_get_driver_uuid; + functions->GetDeviceUuid = st_get_device_uuid; /* GL_ARB_get_program_binary */ functions->GetProgramBinaryDriverSHA1 = st_get_program_binary_driver_sha1; Reviewed-by: Brian

[Mesa-dev] [PATCH] svga: s/Bool/SVGA3dBool/ in SVGA3dDevCapResult

2018-01-25 Thread Brian Paul
And fix whitespace. To sync up with in-house code. --- src/gallium/drivers/svga/include/svga3d_devcaps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/svga/include/svga3d_devcaps.h b/src/gallium/drivers/svga/include/svga3d_devcaps.h index

[Mesa-dev] [PATCH 3/3] mesa: whitespace fixes in varray.h

2018-01-25 Thread Brian Paul
--- src/mesa/main/varray.h | 55 ++ 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index 03d81d0..93f2f47 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -44,9

[Mesa-dev] [PATCH 2/3] mesa: include mtypes.h in varray.h

2018-01-25 Thread Brian Paul
We actually use some of the types from mtypes.h so include it directly instead of relying on indirectly including it via bufferobj.h --- src/mesa/main/varray.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index

[Mesa-dev] [PATCH 1/3] mesa: s/gl_vertex_attrib_array/gl_array_attributes/ in comments

2018-01-25 Thread Brian Paul
The structure type was renamed some time ago, but some comments were not updated. --- src/mesa/main/arrayobj.c | 2 +- src/mesa/main/mtypes.h | 2 +- src/mesa/main/varray.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/arrayobj.c

[Mesa-dev] [PATCH] st/mesa: expand glDrawPixels cache to handle multiple images

2018-01-25 Thread Brian Paul
The newest version of WSI Fusion makes several glDrawPixels calls per frame. By caching more than one image, we get better performance when panning/zomming the map. v2: move pixel unpack param checking out of cache search loop, per Roland --- src/mesa/state_tracker/st_cb_drawpixels.c | 196

Re: [Mesa-dev] [PATCH] st/mesa: expand glDrawPixels cache to handle multiple images

2018-01-25 Thread Brian Paul
On 01/24/2018 09:06 PM, Roland Scheidegger wrote: Am 25.01.2018 um 00:19 schrieb Brian Paul: The newest version of WSI Fusion makes several glDrawPixels calls per frame. By caching more than one image, we get better performance when panning/zomming the map. zooming --- src/mesa

Re: [Mesa-dev] [PATCH] mesa: simplify _mesa_delete_list() a bit, add some assertions

2018-01-25 Thread Brian Paul
On 01/24/2018 09:41 PM, Roland Scheidegger wrote: Am 25.01.2018 um 00:19 schrieb Brian Paul: All but two cases of the switch did the same n += InstSize[n[0].opcode] instruction. Just move it after the switch. Add some sanity check assertions. --- src/mesa/main/dlist.c | 39

[Mesa-dev] [PATCH 04/11] vbo: s/_API_NOOP_H/VBO_NOOP_H/ in vbo_noop.h

2018-01-24 Thread Brian Paul
--- src/mesa/vbo/vbo_noop.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo_noop.h b/src/mesa/vbo/vbo_noop.h index f61cd51..8aa17ce 100644 --- a/src/mesa/vbo/vbo_noop.h +++ b/src/mesa/vbo/vbo_noop.h @@ -23,8 +23,8 @@ * OTHER DEALINGS IN THE SOFTWARE.

<    1   2   3   4   5   6   7   8   9   10   >