[Mesa-dev] [PATCH] gl.h: define GLeglImageOES depending on GL_EXT_EGL_image_storage

2018-08-07 Thread Brian Paul
To avoid duplicate typedef with the definition in glext.h V2: test for both GL_OES_EGL_image and GL_EXT_EGL_image_storage in case both the GL and GLES headers are included. Per Emil. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107488 Tested-by: Vinson Lee --- include/GL/gl.h | 2 +-

[Mesa-dev] [PATCH 1/3] svga: add TGSI_SEMANTIC_FACE switch case in svga_swtnl_update_vdecl()

2018-08-07 Thread Brian Paul
Fixes failed assertion running Piglit polygon-mode-face test. Though, the test still does not pass. Reviewed-by: Neha Bhende Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_swtnl_state.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Mesa-dev] [PATCH] xlib: remove unused Fake_glXGetAGPOffsetMESA() function

2018-08-07 Thread Brian Paul
To silence compiler warning. --- src/mesa/drivers/x11/fakeglx.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 233b6e2..b946521 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@

[Mesa-dev] [PATCH] gl.h: define GLeglImageOES depending on GL_EXT_EGL_image_storage

2018-08-07 Thread Brian Paul
To avoid duplicate typedef with the definition in glext.h Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107488 Tested-by: Vinson Lee --- include/GL/gl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/GL/gl.h b/include/GL/gl.h index f5bac36..0f7ae70 100644

Re: [Mesa-dev] [PATCH] util: return 0 for NaNs in float_to_ubyte

2018-08-02 Thread Brian Paul
0f; return (ubyte) tmp.i; } Looks good. Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] mesa: add switch case for GL 2.0 in _mesa_compute_version()

2018-08-02 Thread Brian Paul
Previously, I added a switch case for GL 2.1 (ed7a0770b881791dd697f3). I don't know of any driver which only supports GL 2.0, but adding this switch case avoids a failure if the app queries GL_SHADING_LANGUAGE_VERSION. --- src/mesa/main/version.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [Mesa-dev] [PATCH 0/8] GL_AMD_framebuffer_multisample_advanced for RadeonSI

2018-08-02 Thread Brian Paul
On 08/01/2018 05:25 PM, Marek Olšák wrote: Hi, This implements GL_AMD_framebuffer_multisample_advanced, which is AMD EQAA. I have also sent out a piglit test that tests the new API. Please review. I did a quick read-through and it looks OK to me. Reviewed-by: Brian Paul

Re: [Mesa-dev] [PATCH 1/6] glsl: use util_snprintf()

2018-08-01 Thread Brian Paul
Series looks good. Thanks for doing this. Reviewed-by: Brian Paul On 08/01/2018 12:53 PM, Andres Gomez wrote: Instead of plain snprintf(). To fix the MSVC 2013 build. Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Cc: Marek

[Mesa-dev] [PATCH] xlib: fix build break from _swrast_map_soft_renderbuffer() call

2018-07-27 Thread Brian Paul
We need to pass the new flip_y argument. --- src/mesa/drivers/x11/xm_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index 97c7814..9c5383b 100644 --- a/src/mesa/drivers/x11/xm_buffer.c +++

Re: [Mesa-dev] [PATCH] gallium/auxiliary: Extern "c" fixes.

2018-07-27 Thread Brian Paul
Reviewed-by: Brian Paul On 07/27/2018 02:20 PM, Alexander von Gluck IV wrote: Used by C++ code such as Haiku's renderer. --- src/gallium/auxiliary/driver_ddebug/dd_public.h | 8 src/gallium/auxiliary/driver_noop/noop_public.h | 8 .../auxiliary/target

[Mesa-dev] [PATCH 1/2] mesa: add switch case for GL 2.1 in _mesa_compute_version()

2018-07-27 Thread Brian Paul
The xlib/swrast driver only supports GL 2.1. This patch fixes a crash if the app calls glGetString(GL_SHADING_LANGUAGE_VERSION). --- src/mesa/main/version.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 58e68b4..2c5bd77 100644 ---

[Mesa-dev] [PATCH 2/2] swrast: fix crash in AA line code when there's no texture

2018-07-27 Thread Brian Paul
Fixes a crash running the Piglit polygon-mode-facing test (and probably others). --- src/mesa/swrast/s_aalinetemp.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index bebb131..64767a3 100644 ---

[Mesa-dev] [PATCH 1/2] mesa: remove unneeded free() call in texstore_rgba()

2018-07-27 Thread Brian Paul
The pointer will always be NULL since that's what we just tested for. --- src/mesa/main/texstore.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 31163f6..c7a459e 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@

[Mesa-dev] [PATCH 2/2] mesa: move var decls in texstore_rgba()

2018-07-27 Thread Brian Paul
Move them closer to where they're first used. --- src/mesa/main/texstore.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index c7a459e..55f66c5 100644 --- a/src/mesa/main/texstore.c +++

Re: [Mesa-dev] [PATCH] libGLw: Use newly introduced GLAPIVAR for variables

2018-07-18 Thread Brian Paul
On 07/17/2018 06:47 PM, Stefan Dirsch wrote: On Tue, Jul 17, 2018 at 04:57:26PM -0600, Brian Paul wrote: Reviewed-by: Brian Paul Do you need me to push this for you? I'm afraid the answer is yes. Tried it but push hangs forever after this # git push --verbose Pushing to ssh

Re: [Mesa-dev] [PATCH] libGLw: Use newly introduced GLAPIVAR for variables

2018-07-17 Thread Brian Paul
GLwDrawingAreaClassPart glwDrawingArea_class; } GLwDrawingAreaClassRec; -GLAPI GLwDrawingAreaClassRec glwDrawingAreaClassRec; +GLAPIVAR GLwDrawingAreaClassRec glwDrawingAreaClassRec; #endif Reviewed-by: Brian Paul Do you need me to push this for you? -Brian __

Re: [Mesa-dev] [PATCH] libGLw: Use newly introduced GLAPIVAR for variables

2018-07-17 Thread Brian Paul
On 07/17/2018 07:31 AM, Stefan Dirsch wrote: GLAPI doesn't have an 'extern' in some circumstances. This way, variable declarations become definitions (fdo #100916). Signed-off-by: Stefan Dirsch --- GLwDrawA.h | 12 ++-- GLwDrawAP.h | 4 ++-- 2 files changed, 12 insertions(+), 4

Re: [Mesa-dev] [PATCH v2 1/4] softpipe: Add assert verifying successful pipe_transfer_map

2018-07-17 Thread Brian Paul
height, >transfer[i]); +assert(tc->transfer_map[i]); } } else { Looks OK to me. Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] st/wgl: check for NULL piAttribList in wglCreatePbufferARB()

2018-07-07 Thread Brian Paul
Thanks for investigating that one! Reviewed-by: Brian Paul On Fri, Jul 6, 2018 at 5:09 PM, Charmaine Lee wrote: > Java2d opengl pipeline passes NULL piAttribList to > wglCreatePbufferARB(). So skip parsing the attribute list > if it is NULL. > --- > src/gallium/sta

Re: [Mesa-dev] [PATCH v2 1/9] util/macros: Import ALIGN_POT from ralloc.c

2018-07-02 Thread Brian Paul
On 07/02/2018 10:50 AM, Jason Ekstrand wrote: On Mon, Jul 2, 2018 at 9:23 AM, Brian Paul <mailto:bri...@vmware.com>> wrote: On 07/02/2018 09:00 AM, Jason Ekstrand wrote: On Mon, Jul 2, 2018 at 6:33 AM, Brian Paul mailto:bri...@vmware.com> <mailto:br

Re: [Mesa-dev] [PATCH v2 1/9] util/macros: Import ALIGN_POT from ralloc.c

2018-07-02 Thread Brian Paul
On 07/02/2018 09:00 AM, Jason Ekstrand wrote: On Mon, Jul 2, 2018 at 6:33 AM, Brian Paul <mailto:bri...@vmware.com>> wrote: On 06/29/2018 06:13 PM, Jason Ekstrand wrote: ---   src/util/macros.h | 3 +++   src/util/ralloc.c | 2 --   2 files c

Re: [Mesa-dev] [PATCH 1/2] mesa: fix error msg typo

2018-07-02 Thread Brian Paul
inPerfMonitor(not active)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glEndPerfMonitor(not active)"); return; } Reviewed-by: Brian Paul ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.free

Re: [Mesa-dev] [PATCH 2/2] mesa: don't double incr/decr ActiveCounters

2018-07-02 Thread Brian Paul
On 07/02/2018 09:13 AM, Rob Clark wrote: Frameretrace ends up w/ excess calls to SelectPerfMonitorCountersAMD() which ends up re-enabling already enabled counters. Which causes ActiveCounters[group] to be double incremented for the same counter. This causes BeginPerfMonitorAMD() to fail. The

Re: [Mesa-dev] [PATCH v2 1/9] util/macros: Import ALIGN_POT from ralloc.c

2018-07-02 Thread Brian Paul
On 06/29/2018 06:13 PM, Jason Ekstrand wrote: --- src/util/macros.h | 3 +++ src/util/ralloc.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/macros.h b/src/util/macros.h index 6d3df904082..95b86c7a31a 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@

Re: [Mesa-dev] [PATCH 1/1] mesa/st: draw_vbo: initialize restart_index too

2018-07-02 Thread Brian Paul
first, then drop the =0 assignments. That'd help future-proof the code too. Otherwise, this is OK. Reviewed-by: Brian Paul -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] st/mesa: add missing switch cases in glsl_to_tgsi_visitor::visit()

2018-06-14 Thread Brian Paul
To silence compiler warning about unhandled switch cases. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index b321112..673c0f6 100644 ---

Re: [Mesa-dev] [PATCH] llvmpipe: improve rasterization discard logic

2018-05-21 Thread Brian Paul
On 05/21/2018 07:34 PM, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> This unifies the explicit rasterization dicard as well as the implicit "discard" Looks OK to me. Minor nits below. Reviewed-by: Brian Paul <bri...@vmware.com> raster

Re: [Mesa-dev] [PATCH] draw: get rid of special logic to not emit null tris

2018-05-17 Thread Brian Paul
hink this logic was hiding bugs elsewhere. It should - * be possible now to always emit all tris. - */ - if (tri_null && tri_emitted) { - continue; - } - tri_emitted = TRUE; - if (!edgeflags[i-1]) { header.flags &= ~edge_middle; } Reviewed

[Mesa-dev] [PATCH] tgsi: fix incorrect tgsi_shader_info::num_tokens computation

2018-05-17 Thread Brian Paul
We were incrementing num_tokens in each loop iteration while parsing the shader. But each call to tgsi_parse_token() can consume more than one token (and often does). Instead, just call the tgsi_num_tokens() function. Luckily, this issue doesn't seem to effect any current users of this field

Re: [Mesa-dev] [PATCH 2/4] mesa: Remove flush_vertrices argument from VAO methods.

2018-05-17 Thread Brian Paul
In the subject line "flush_vertices" For this series, Reviewed-by: Brian Paul <bri...@vmware.com> More nice clean-ups! -Brian On 05/17/2018 12:37 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich <mathias.froehl...@web.de> The flush_vertices argument

Re: [Mesa-dev] [PATCH v2 1/2] cast the "GLenum16" to "GLint" to avoid compile warning on android

2018-05-16 Thread Brian Paul
) p)[0])); break; case TYPE_INT_N: Reviewed-by: Brian Paul <bri...@vmware.com> I'll clean up the commit message a bit and commit this soon. Thanks. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: fix glGetInteger/Float/etc queries for vertex arrays attribs

2018-05-11 Thread Brian Paul
On 05/11/2018 03:51 AM, Juan A. Suarez Romero wrote: On Wed, 2018-05-09 at 19:51 -0600, Brian Paul wrote: The vertex array Size and Stride attributes are now ubyte and short, respectively. The glGet code needed to be updated to handle those types, but wasn't. Fixes the new piglit test gl-1.5

Re: [Mesa-dev] [PATCH v2 0/5] Implement ARB_sample_locations for nvc0

2018-05-10 Thread Brian Paul
For 1-3,5: Reviewed-by: Brian Paul <bri...@vmware.com> On 05/10/2018 10:28 AM, Rhys Perry wrote: This patch set adds support for GL_ARB_sample_locations in mesa core, gallium, the mesa OpenGL state tracker and the nvc0 driver. Changes in v2: - various minor changes/cleanups (mostly form

Re: [Mesa-dev] [PATCH] gallium: remove aux_vertex_buffer_slot code

2018-05-10 Thread Brian Paul
etions(-) Looks OK to me. Reviewed-by: Brian Paul <bri...@vmware.com> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] mesa: revert GL_[SECONDARY_]COLOR_ARRAY_SIZE glGet type to TYPE_INT

2018-05-10 Thread Brian Paul
Since size can be 3, 4 or GL_BGRA we need to keep these glGet types as TYPE_INT, not TYPE_UBYTE. Fixes: d07466fe18522 ("mesa: fix glGetInteger/Float/etc queries for vertex arrays attribs") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106462 cc: mesa-sta...@lists.freedesktop.org ---

[Mesa-dev] [PATCH] mesa: fix glGetInteger/Float/etc queries for vertex arrays attribs

2018-05-09 Thread Brian Paul
The vertex array Size and Stride attributes are now ubyte and short, respectively. The glGet code needed to be updated to handle those types, but wasn't. Fixes the new piglit test gl-1.5-get-array-attribs test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106450 Fixes: d5f42f96e16

Re: [Mesa-dev] [PATCH 04/11] st/mesa: Use Array._DrawVAO in st_atom_array.c.

2018-05-08 Thread Brian Paul
Two minor nits below. -Brian On 05/07/2018 12:14 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich Finally make use of the binding information in the VAO when setting up arrays for draw. v2: Emit less relocations also for interleaved userspace arrays.

Re: [Mesa-dev] [PATCH 11/11] mesa/vbo/tnl: Move gl_vertex_array related stuff to tnl.

2018-05-08 Thread Brian Paul
One comment needs updating below. On 05/07/2018 12:15 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich The only remaining users of gl_vertex_array are tnl based drivers. So move everything related to that into tnl and rename it accordingly. Signed-off-by:

Re: [Mesa-dev] [PATCH 01/11] mesa: Compute effective buffer bindings in the vao.

2018-05-08 Thread Brian Paul
Minor nit-picks below and on patches 4 and 11. I skimmed the i965 changes, but otherwise everything looks OK AFAICT. Nice work! Reviewed-by: Brian Paul <bri...@vmware.com> On 05/07/2018 12:14 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich <mathias.froehl...@web.de&

[Mesa-dev] [PATCH] glsl: change ast_type_qualifier bitset size to work around GCC 5.4 bug

2018-05-08 Thread Brian Paul
Change the size of the bitset from 128 bits to 96. This works around an apparent GCC 5.4 bug in which bad SSE code is generated, leading to a crash in ast_type_qualifier::validate_in_qualifier() (ast_type.cpp:654). This can be repro'd with the Piglit test tests/spec/glsl-1.50/execution/

Re: [Mesa-dev] gcc bug / crash in ast_type_qualifier::validate_in_qualifier()?

2018-05-08 Thread Brian Paul
On 05/07/2018 09:45 PM, Matt Turner wrote: On Mon, May 7, 2018 at 8:02 PM, Brian Paul <bri...@vmware.com> wrote: I don't know when this started happening (I'll try bisecting tomorrow) but we're seeing a crash in ast_type_qualifier::validate_in_qualifier() in -O3 builds with gcc 5.4.0 on

[Mesa-dev] gcc bug / crash in ast_type_qualifier::validate_in_qualifier()?

2018-05-07 Thread Brian Paul
I don't know when this started happening (I'll try bisecting tomorrow) but we're seeing a crash in ast_type_qualifier::validate_in_qualifier() in -O3 builds with gcc 5.4.0 on Ubuntu 16.04. Specifically, at ast_type.cpp:654: if ((this->flags.i & ~valid_in_mask.flags.i) != 0) { It seems

Re: [Mesa-dev] [PATCH 1/5] mesa: add support for ARB_sample_locations

2018-05-07 Thread Brian Paul
A bunch of nit-picks below. On 05/04/2018 06:09 AM, Rhys Perry wrote: Signed-off-by: Rhys Perry --- src/mapi/glapi/gen/gl_API.xml | 52 +++ src/mesa/main/config.h | 7 + src/mesa/main/dd.h | 7 +

Re: [Mesa-dev] [PATCH 2/5] gallium: add support for programmable sample locations

2018-05-07 Thread Brian Paul
On 05/04/2018 06:09 AM, Rhys Perry wrote: Signed-off-by: Rhys Perry --- src/gallium/auxiliary/cso_cache/cso_context.c| 31 +++ src/gallium/auxiliary/cso_cache/cso_context.h| 5 src/gallium/auxiliary/util/u_framebuffer.c | 32

Re: [Mesa-dev] [PATCH 3/5] st/mesa: add support for ARB_sample_locations

2018-05-07 Thread Brian Paul
More nit-picks below. On 05/04/2018 06:09 AM, Rhys Perry wrote: Signed-off-by: Rhys Perry --- src/mesa/state_tracker/st_atom_framebuffer.c | 64 src/mesa/state_tracker/st_cb_msaa.c | 22 ++

[Mesa-dev] [PATCH] glsl/tests: add GLSL_TYPE_UINT8, GLSL_TYPE_INT8 cases to switch statements

2018-04-30 Thread Brian Paul
To silence warnings about unhandled switch values. Untested otherwise. --- src/compiler/glsl/tests/uniform_initializer_utils.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/glsl/tests/uniform_initializer_utils.cpp b/src/compiler/glsl/tests/uniform_initializer_utils.cpp

[Mesa-dev] [PATCH] tgsi: use enums instead of unsigned in ureg code

2018-04-30 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 14 +++--- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 10 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 393e015..7d2b9af 100644

Re: [Mesa-dev] [PATCH v7 0/4] Implement Various Conservative Rasterization Extensions

2018-04-30 Thread Brian Paul
On 04/27/2018 11:34 AM, Rhys Perry wrote: This patch-set adds support for GL_NV_conservative_raster and GL_NV_conservative_raster_dilate on GM2xx and newer. It also adds support for GL_NV_conservative_raster_pre_snap_triangles on GP1xx. In doing so, it implements various functions in mesa core,

Re: [Mesa-dev] [PATCH v6 0/4] Implement Various Conservative Rasterization Extensions

2018-04-27 Thread Brian Paul
On 04/27/2018 08:43 AM, Rhys Perry wrote: This patch-set adds support for GL_NV_conservative_raster and GL_NV_conservative_raster_dilate on GM2xx and newer. It also adds support for GL_NV_conservative_raster_pre_snap_triangles on GP1xx. In doing so, it implements various functions in mesa core,

Re: [Mesa-dev] [PATCH v5 1/4] mesa: add support for nvidia conservative rasterization extensions

2018-04-27 Thread Brian Paul
On 04/26/2018 04:33 PM, Rhys Perry wrote: For Brian Paul: Since you seemed to have looked over v3 of this patch, you were Cc'd. Compared to v3, it fixes the style problems (including the CLAMP() thing) and adds ALWAYS_INLINE to conservative_raster_parameter(). A few more nit-picks

Re: [Mesa-dev] [PATCH] st/mesa: fix missing setting of _ElementSize in new_draw_rasterpos_stage

2018-04-26 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 04/26/2018 10:29 AM, Charmaine Lee wrote: With this patch, _ElementSize is initialized along with the rest of the vertex array attributes in new_draw_rasterpos_stage(). This fixes a crash in st_pipe_vertex_format() when running topogun-1.06-o

Re: [Mesa-dev] [PATCH 1/3] mesa: merge the driver functions DrawBuffers and DrawBuffer

2018-04-15 Thread Brian Paul
The series looks OK to me. Reviewed-by: Brian Paul <bri...@vmware.com> On 04/13/2018 10:45 PM, Timothy Arceri wrote: The extra params we unused by the drivers that used DrawBuffers. --- src/mesa/drivers/common/driverfuncs.c| 1 - src/mesa/drivers/dri/nouveau/nouveau_state

[Mesa-dev] [PATCH 4/5] gallium/util: put (void) in a few function signatures

2018-04-13 Thread Brian Paul
To match the header file. --- src/gallium/auxiliary/util/u_network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c index e74293b..89395f5 100644 --- a/src/gallium/auxiliary/util/u_network.c

[Mesa-dev] [PATCH 5/5] gallium/osmesa: link with winsock2 library on Windows

2018-04-13 Thread Brian Paul
To fix the MSVC build. The build broke because we started to compile the ddebug code on Windows after the mtypes.h changes. Building ddebug caused us to also use the u_network.c code for the first time. --- src/gallium/targets/osmesa/SConscript | 3 +++ 1 file changed, 3 insertions(+) diff

[Mesa-dev] [PATCH 1/5] mesa: remove unused 'i' in dimensions_error_check()

2018-04-13 Thread Brian Paul
--- src/mesa/main/texgetimage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 69521c5..0ab9ed4 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -913,7 +913,6 @@ dimensions_error_check(struct

[Mesa-dev] [PATCH 3/5] ddebug: add PIPE_OS_UNIX/LINUX checks to fix MSVC build

2018-04-13 Thread Brian Paul
Don't include Unix headers or use Unix functions when building with MSVC. --- src/gallium/auxiliary/driver_ddebug/dd_draw.c | 5 + src/gallium/auxiliary/driver_ddebug/dd_util.h | 9 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 2/5] mesa: protect #include of unistd.h with _MSV_VER check

2018-04-13 Thread Brian Paul
unistd.h is unix only. --- src/mesa/program/program_lexer.l | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/program/program_lexer.l b/src/mesa/program/program_lexer.l index 13eb902..c4973fd 100644 --- a/src/mesa/program/program_lexer.l +++ b/src/mesa/program/program_lexer.l @@

[Mesa-dev] [PATCH 1/3] mesa: remove snprintf macro in imports.h to fix MSVC build

2018-04-13 Thread Brian Paul
snprintf is a macro in the MSVC stdio.h header and we needed to include that header before imports.h where we also defined an snprintf macro. Otherwise, the MSVC build would fail. The recent mtypes.h removal patches seems to have exposed this issue. This patch simply removes our snprintf macro

[Mesa-dev] [PATCH 2/3] glsl: rename 'interface' var to 'iface' to fix MSVC build

2018-04-13 Thread Brian Paul
The recent mtypes.h removal patches seems to have exposed a MSVC issue where 'interface' is defined as a macro in an MSVC header file. --- src/compiler/glsl/linker.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/glsl/linker.cpp

[Mesa-dev] [PATCH 3/3] glsl: #undef THIS macro to fix MSVC build

2018-04-13 Thread Brian Paul
THIS is a macro in one of the MSVC header files. It's also a token in the GLSL lexer. This causes a compilation failure with MSVC. This issue seems to be newly exposed after the recent mtypes.h removal patches. --- src/compiler/glsl/glsl_parser_extras.h | 5 + 1 file changed, 5

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: call DrawBuffer(s) driver hook in update_framebuffer for windows-system FB

2018-04-13 Thread Brian Paul
On 04/13/2018 05:43 AM, Timothy Arceri wrote: On 02/02/17 10:58, Brian Paul wrote: On 01/20/2017 07:18 AM, Manolova, Plamena wrote: This looks good to me :) Reviewed-by: Plamena Manolova <plamena.manol...@intel.com <mailto:plamena.manol...@intel.com>> On Fri, Jan 20, 2017 at 9:

Re: [Mesa-dev] [PATCH 2/2] mesa: include mtypes.h less

2018-04-12 Thread Brian Paul
Dylan found an issue. 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 04/11] gallium: Use Array._DrawVAO in st_atom_array.c.

2018-04-11 Thread Brian Paul
Hmm, in my experience, interleaved arrays are fairly common. I still haven't had much time to look at Mathias's latest patches. And I haven't looked this code in the state tracker recently, but I seem to recall there was some difference between interleaved arrays (in one VBO) vs. separate

Re: [Mesa-dev] [PATCH] mesa: Assert base format before truncating to unsigned short

2018-04-09 Thread Brian Paul
On 04/06/2018 08:26 AM, Topi Pohjolainen wrote: CID: 1433709 Fixes: ca721b3d8: mesa: use GLenum16 in a few more places CC: Marek Olšák <marek.ol...@amd.com> CC: Brian Paul <bri...@vmware.com> Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> --- src/mesa/m

Re: [Mesa-dev] [PATCH] Fix a typo in src/compiler/Makefile.nir.am

2018-04-09 Thread Brian Paul
\ - SConstript.spirv + SConscript.spirv Reviewed-by: Brian Paul <bri...@vmware.com> I'll check this in for you. Thanks! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] st/mesa: Also use PIPE_FORMAT_R8G8B8A8_SRGB for framebuffer_sRGB.

2018-04-03 Thread Brian Paul
8_SRGB, + PIPE_FORMAT_R8G8B8A8_SRGB }, GL_TRUE }, /* at least one format must be supported */ { { o(EXT_packed_float) }, LGTM. Reviewed-by: Brian Paul <bri...@vmware.com> ___ mesa-dev mailing list mesa-dev@lists.freedeskt

[Mesa-dev] [PATCH] glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2)

2018-03-30 Thread Brian Paul
This fixes a Windows build warning where the prototypes for the ES function in the header file don't match the prototypes in this file because the GL_API and GLAPI macros are defined differently. v2: defined GL_API to KEYWORD1 instead of GLAPI, per Mathias. --- src/mapi/glapi/glapi_dispatch.c |

Re: [Mesa-dev] [PATCH] glapi: define GL_API to be GLAPI in glapi_dispatch.c

2018-03-30 Thread Brian Paul
On 03/30/2018 09:39 AM, Mathias Fröhlich wrote: On Friday, 30 March 2018 16:42:43 CEST Brian Paul wrote: This fixes a Windows build warning where the prototypes for the ES function in the header file don't match the prototypes in this file because the GL_API and GLAPI macros are defined

Re: [Mesa-dev] [PATCH] spirv: Fix building with SCons

2018-03-30 Thread Brian Paul
OK, I just posted a series of patches which seems to fix everything on Windows/MSVC. Neil, I added fixes for the osmesa and libgl-gdi targets to your patch. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 4/6] nir/spirv: fix MSVC syntax error in vtn_handle_texture()

2018-03-30 Thread Brian Paul
--- src/compiler/spirv/spirv_to_nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 2550ef0..72ab426 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@

[Mesa-dev] [PATCH 5/6] nir/spirv: s/uint32_t/SpvOp/ in various functions

2018-03-30 Thread Brian Paul
The MSVC compiler warns when the function parameter types don't exactly match with respect to enum vs. uint32_t. Use SpvOp everywhere. Alternately, uint32_t could be used everywhere. There doesn't seem to be an advantage to one over the other. --- src/compiler/spirv/vtn_amd.c | 4 ++--

[Mesa-dev] [PATCH 1/6] spirv: Fix building with SCons

2018-03-30 Thread Brian Paul
Also add nir/spirv modules to osmesa and libgl-gdi targets. (Brian Paul) --- src/compiler/Makefile.nir.am | 3 +- src/compiler/SConscript | 1 + src/compiler/SConscript.spirv | 54 +++ src/gallium/targets/dri/SCon

[Mesa-dev] [PATCH 6/6] spirv: s/uint/unsigned/ to fix MSVC build

2018-03-30 Thread Brian Paul
--- src/compiler/spirv/vtn_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index 3d5de37..e7d2f9e 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -513,7 +513,7 @@

[Mesa-dev] [PATCH 2/6] nir/spirv: fix MSVC warning in vtn_align_u32()

2018-03-30 Thread Brian Paul
Fixes warning that "negation of an unsigned value results in an unsigned value". --- src/compiler/spirv/vtn_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index d8a00f9..269de92 100644 ---

[Mesa-dev] [PATCH 3/6] nir/spirv: move NORETURN annotation on _vtn_fail() prototype

2018-03-30 Thread Brian Paul
This needs to before the function, not after, to compile with MSVC. This works with gcc too. --- src/compiler/spirv/vtn_private.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 269de92..982b426

Re: [Mesa-dev] [PATCH] spirv: Fix building with SCons

2018-03-30 Thread Brian Paul
On 03/30/2018 10:40 AM, Brian Paul wrote: OK, I'll have some patches soon but I'm stuck on one issue. Around spriv_to_nir.c:2090 we have   if (operands & SpvImageOperandsConstOffsetsMask) { gather_offsets = vtn_ssa_value(b, w[idx++]); (*p++) = (nir_tex

Re: [Mesa-dev] [PATCH] spirv: Fix building with SCons

2018-03-30 Thread Brian Paul
alid for MSVC (syntax error). I haven't figured out exactly what that's supposed to do. Replacing it with (*p++) = (nir_tex_src)0; works but I'm not sure that's correct. Ilia wrote the line in question. Ilia? -Brian On 03/30/2018 09:25 AM, Brian Paul wrote: Thanks, Neil. This fixes the S

Re: [Mesa-dev] [PATCH] spirv: Fix building with SCons

2018-03-30 Thread Brian Paul
Thanks, Neil. This fixes the SCons build on Linux, but on Windows there's a whole bunch of other issues: c:\users\brian\projects\mesa\src\compiler\spirv\vtn_private.h(232): error C2085: 'vtn_instruction_handler': not in formal parameter list

[Mesa-dev] [PATCH] mesa: fix MSVC bitshift overflow warnings

2018-03-30 Thread Brian Paul
In the BITFIELD_MASK() macro, if b==32 the expression evaluates to ~0u, but the compiler still sees the expression (1 << 32) in the unused part and issues a warning about integer bitshift overflow. Fix that by using (b) % 32 to ensure the max shift is 31 bits. This issue has been present for a

[Mesa-dev] [PATCH] glapi: define GL_API to be GLAPI in glapi_dispatch.c

2018-03-30 Thread Brian Paul
This fixes a Windows build warning where the prototypes for the ES function in the header file don't match the prototypes in this file because the GL_API and GLAPI macros are defined differently. --- src/mapi/glapi/glapi_dispatch.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Mesa-dev] [PATCH] st/mesa: add missing GLSL_TYPE_[U]INT8 cases in st_glsl_type_dword_size()

2018-03-30 Thread Brian Paul
Silences a compiler warning about unhandled enum switch cases. --- src/mesa/state_tracker/st_glsl_types.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_types.cpp b/src/mesa/state_tracker/st_glsl_types.cpp index baba2d4..42d4e9c 100644 ---

[Mesa-dev] [PATCH] nir: s/uint/unsigned/ to fix MSVC/MinGW build

2018-03-29 Thread Brian Paul
--- src/compiler/glsl/glsl_to_nir.cpp | 2 +- src/compiler/nir/nir_gather_info.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index c4a6d52..dbb58d8 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++

Re: [Mesa-dev] [PATCH] intel/compiler: Explicitly cast register type in switch

2018-03-29 Thread Brian Paul
: case BRW_REGISTER_TYPE_Q: return a->d64 == -b->d64; Reviewed-by: Brian Paul <bri...@vmware.com> Thanks. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] vbo: Use alloca for _vbo_draw_indirect.

2018-03-29 Thread Brian Paul
x_buffer *ib, + struct _mesa_prim *space) Can you just rename 'space' to 'prim' and rm the prim = space assignment below? Also, could you put a comment on this function to explain the draw_count and space/prim parameters, at least? Other than that, the series looks good. Review

Re: [Mesa-dev] [PATCH 6/8] vbo: Readd the arrays argument to the legacy draw methods.

2018-03-29 Thread Brian Paul
On 03/25/2018 12:42 PM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich The legacy draw paths from back before 2012 contained a gl_vertex_array array for the inputs to be used for draw. So all draw methods from legacy drivers and evereything that goes through

Re: [Mesa-dev] [PATCH] intel/compiler: fix return statement warning in brw_regs_negative_equal()

2018-03-29 Thread Brian Paul
On 03/29/2018 03:49 AM, Emil Velikov wrote: Hi Brian, On 29 March 2018 at 02:48, Brian Paul <bri...@vmware.com> wrote: Silence a gcc warning about missing return value in non-void function. For some reason, gcc 5.4.0 (at least) can't deduce that all else/if cases return a value. A

[Mesa-dev] [PATCH] glapi: define GL_API to be GLAPI in glapi_dispatch.c

2018-03-28 Thread Brian Paul
This fixes a Windows build warning where the prototypes for the ES function in the header file don't match the prototypes in this file because the GL_API and GLAPI macros are defined differently. --- src/mapi/glapi/glapi_dispatch.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Mesa-dev] [PATCH] gl.h: remove stale comment, trailing whitespace

2018-03-28 Thread Brian Paul
--- include/GL/gl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/GL/gl.h b/include/GL/gl.h index 5b28480..f5bac36 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -47,9 +47,9 @@ #define GLAPI __declspec(dllimport) # else /* for use with static link

[Mesa-dev] [PATCH] intel/compiler: fix return statement warning in brw_regs_negative_equal()

2018-03-28 Thread Brian Paul
Silence a gcc warning about missing return value in non-void function. For some reason, gcc 5.4.0 (at least) can't deduce that all else/if cases return a value. --- src/intel/compiler/brw_reg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/compiler/brw_reg.h

[Mesa-dev] [PATCH] st/mesa: add missing GLSL_TYPE_[U]INT8 cases in st_glsl_type_dword_size()

2018-03-28 Thread Brian Paul
Silences a compiler warning about unhandled enum switch cases. --- src/mesa/state_tracker/st_glsl_types.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_types.cpp b/src/mesa/state_tracker/st_glsl_types.cpp index ef7b7fa..9ad76c9 100644 ---

Re: [Mesa-dev] [PATCH] st: Don't try to finalize the texture in st_render_texture().

2018-03-28 Thread Brian Paul
.copy_tex_image_conversions.forbidden.* when trying to finalize an R8 texture image to the RG8 texture object's pt. Looks OK to me. Go ahead and check it in. The next time I do a piglit run with our driver, I'll be on the lookout for any unexpected regressions. Reviewed-by: Brian Paul <bri...@vmware.

Re: [Mesa-dev] [PATCH v3 3/4] st/mesa: add support for nvidia conservative rasterization extensions

2018-03-28 Thread Brian Paul
extensions->NV_conservative_raster_pre_snap_triangles = pre_snap_triangles; + extensions->NV_conservative_raster_pre_snap = +pre_snap_triangles && pre_snap_points_lines; + } + } } Other than that, patches 2&3 look OK to me. 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 v3 1/4] mesa: add support for nvidia conservative rasterization extensions

2018-03-28 Thread Brian Paul
Looks good overall. Just some style nit-picks below. -Brian On 03/28/2018 04:35 AM, Rhys Perry wrote: Although the specs are written against compatibility GL 4.3 and allows core profile and GLES2+, it is exposed for GL 1.0+ and GLES1 and GLES2+. --- src/mapi/glapi/gen/gl_API.xml |

Re: [Mesa-dev] [PATCH] mesa: Inherit texture view multi-sample information from the original texture images.

2018-03-27 Thread Brian Paul
LGTM. I guess we probably don't have much piglit coverage for texture_view + MSAA. Reviewed-by: Brian Paul <bri...@vmware.com> On 03/27/2018 07:52 AM, Henri Verbeet wrote: Found running "The Witness" in Wine. Without this patch, texture views created on multi-sample tex

[Mesa-dev] [PATCH] glapi: add glBlendBarrier(), glPrimitiveBoundingBox() prototypes

2018-03-26 Thread Brian Paul
in glapi_dispatch.c, as we have for many other GLES functions. Fixes a cross-compile issue (missing prototype) when GLES support is disabled. --- src/mapi/glapi/glapi_dispatch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mapi/glapi/glapi_dispatch.c b/src/mapi/glapi/glapi_dispatch.c

Re: [Mesa-dev] [PATCH] mesa/st/tests: Use tgsi opcode enum also in the test classes

2018-03-26 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> Sorry for the breakage. -Brian On 03/26/2018 02:17 AM, Gert Wollny wrote: Fixes: ec478cf9c31c3775a21cd7b5b4b5cdd9263bde9e st/mesa,tgsi: use enum tgsi_opcode Bugzilla: https://urldefense.proofpoint.com/v2/url?u

Re: [Mesa-dev] [PATCH 0/3] A fix and some asserts around the VAO changes.

2018-03-23 Thread Brian Paul
sa/vbo/vbo_save_api.c | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) Series looks good to me. Reviewed-by: Brian Paul <bri...@vmware.com> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/l

Re: [Mesa-dev] [PATCH 2/2] gallium/u_vbuf: Protect against overflow with large instance divisors.

2018-03-22 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 03/22/2018 04:18 PM, Eric Anholt wrote: GTF-GLES3.gtf.GL3Tests.instanced_arrays.instanced_arrays_divisor uses -1 as a divisor, so we would overflow to count=0 and upload no data, triggering the assert below. We want to upload 1 e

Re: [Mesa-dev] [PATCH 1/2] st: Allow accelerated CopyTexImage from RGBA to RGB.

2018-03-22 Thread Brian Paul
ams could be const-qualified. Looks great otherwise. Thanks. Reviewed-by: Brian Paul <bri...@vmware.com> +{ + GLenum tex_baseformat = _mesa_get_format_base_format(texImage->TexFormat); + + /* We don't blit to a teximage where the GL base format doesn't match the +* texture's c

Re: [Mesa-dev] [PATCH] gallium/u_vbuf: Protect against overflow with large instance divisors.

2018-03-22 Thread Brian Paul
On 03/21/2018 11:06 AM, Eric Anholt wrote: GTF-GLES3.gtf.GL3Tests.instanced_arrays.instanced_arrays_divisor uses -1 as a divisor, Since GL's vertex attrib instance divisor is a GLuint, we can alternately say the divisor is ~0, right? so we would overflow to count=0 and upload no data,

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