[Mesa-dev] [PATCH] glsl: s/unsigned/glsl_base_type/ in glsl type code

2017-11-06 Thread Brian Paul
Declare glsl_type::sampled_type as glsl_base_type as we do for the base_type field. And make base_type a bitfield to save a few bytes. Update glsl_type constructor to take glsl_base_type intead of unsigned and pass GLSL_TYPE_VOID instead of zero. No Piglit regressions with llvmpipe. ---

[Mesa-dev] [PATCH 1/2] st/mesa: use enum types instead of int/unsigned

2017-11-06 Thread Brian Paul
Use the proper enum types for various variables. Makes life in gdb a little nicer. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 7 --- src/mesa/state_tracker/st_glsl_to_tgsi_private.h | 6 +++--- src/mesa/state_tracker/st_mesa_to_tgsi.c | 6 +++---

[Mesa-dev] [PATCH 2/2] st/mesa: whitespace clean-up in st_mesa_to_tgsi.c

2017-11-06 Thread Brian Paul
Remove trailing whitespace, fix indentation, wrap lines to 78 columns, etc. --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 336 --- 1 file changed, 169 insertions(+), 167 deletions(-) diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c

Re: [Mesa-dev] [PATCH] gallium: increase pipe_sampler_view::target bitfield size for MSVC

2017-11-01 Thread Brian Paul
Scheidegger <srol...@vmware.com> Thanks. -Brian Am 01.11.2017 um 15:45 schrieb Brian Paul: MSVC treats enums as being signed. The 4-bit target field isn't large enough to correctly store the value 8 (for PIPE_TEXTURE_CUBE_ARRAY). The bitfield value 0x8 was being interpreted as -8 so ma

[Mesa-dev] [PATCH] gallium: increase pipe_sampler_view::target bitfield size for MSVC

2017-11-01 Thread Brian Paul
MSVC treats enums as being signed. The 4-bit target field isn't large enough to correctly store the value 8 (for PIPE_TEXTURE_CUBE_ARRAY). The bitfield value 0x8 was being interpreted as -8 so matching the target with PIPE_TEXTURE_CUBE_ARRAY in switch statements, etc. was failing. To keep the

[Mesa-dev] [PATCH] scons: fix OSMesa driver build

2017-10-27 Thread Brian Paul
Fixes: ea53d9a8eb5d4b2 "glapi: include generated headers without path" --- src/mesa/drivers/osmesa/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/osmesa/SConscript b/src/mesa/drivers/osmesa/SConscript index 7280314..9391dc3 100644 ---

[Mesa-dev] [PATCH] scons: fix scons build to find generated glapitable.h

2017-10-27 Thread Brian Paul
Fixes: ea53d9a8eb5d4b2 "glapi: include generated headers without path" --- src/mapi/glapi/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript index 994778a..08fed6c 100644 --- a/src/mapi/glapi/SConscript +++

[Mesa-dev] [PATCH] gallium; s/unsigned/enum pipe_prim_type/

2017-10-27 Thread Brian Paul
In the vbuf_render::set_primitive() functions. --- src/gallium/auxiliary/draw/draw_vbuf.h | 3 ++- src/gallium/drivers/i915/i915_prim_vbuf.c| 2 +- src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 2 +- src/gallium/drivers/nouveau/nv30/nv30_draw.c | 2 +-

Re: [Mesa-dev] [PATCH 1/7] svga: Use __asm__ instead of asm

2017-10-27 Thread Brian Paul
us to remove the explicit request for GNU extensions aka -std=gnu99 Sounds good. I tested with MinGW too. Reviewed-by: Brian Paul <bri...@vmware.com> Tested-by: Brian Paul <bri...@vmware.com> ___ mesa-dev mailing list mesa-dev@lis

Re: [Mesa-dev] [PATCH] draw: don't cull tris with zero aera

2017-10-26 Thread Brian Paul
In subject and comments: s/aera/area/ I'm not sure about DX line rasterization, but IIRC for GL, if a line's endpoints are identical, nothing should be drawn. I can see how this is relevant for point mode though. Reviewed-by: Brian Paul <bri...@vmware.com> On 10/26/2017 01:24 PM

Re: [Mesa-dev] [PATCH 03/25] threads: update for late C11 changes

2017-10-26 Thread Brian Paul
On 10/25/2017 10:55 PM, Jose Fonseca wrote: On 23/10/17 20:15, Emil Velikov wrote: Hi Nicolai, On 22 October 2017 at 20:07, Nicolai Hähnle wrote: From: Nicolai Hähnle C11 threads were changed to use struct timespec instead of xtime, and

Re: [Mesa-dev] [PATCH] gallium/util: remove some block alignment assertions

2017-10-25 Thread Brian Paul
On 10/25/2017 09:54 AM, Roland Scheidegger wrote: Am 25.10.2017 um 16:57 schrieb Roland Scheidegger: Am 25.10.2017 um 16:29 schrieb Brian Paul: On 10/24/2017 07:06 PM, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> These assertions were revisited a couple of

Re: [Mesa-dev] [PATCH] gallium/util: remove some block alignment assertions

2017-10-25 Thread Brian Paul
.x + src_box.width <= u_minify(src->width0, src_level)); Would one alternative be to put the assertions inside a conditional testing that the texture is at least 4x4? That'd keep the checking in place for common cases. Either way, Reviewed-by: Brian

Re: [Mesa-dev] [PATCH] gallium/util: use util_snprintf() in u_socket_connect()

2017-10-24 Thread Brian Paul
On 10/24/2017 06:57 AM, Eric Engestrom wrote: On Monday, 2017-10-23 15:27:31 -0600, Brian Paul wrote: Instead of plain snprintf(). To fix the MSVC build. snprintf() is used in various places in Mesa/gallium, but apparently, not in code built with MSVC. Not sure I understand this sentence

Re: [Mesa-dev] [PATCH 3/5] compiler: define endian for FreeBSD

2017-10-23 Thread Brian Paul
think "compiler:" in the subject line could be just "mesa:". Otherwise, for patches 3,4,5: Reviewed-by: Brian Paul <bri...@vmware.com> I'll leave 1,2 to others. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org htt

[Mesa-dev] [PATCH] gallium/util: use util_snprintf() in u_socket_connect()

2017-10-23 Thread Brian Paul
Instead of plain snprintf(). To fix the MSVC build. snprintf() is used in various places in Mesa/gallium, but apparently, not in code built with MSVC. --- src/gallium/auxiliary/util/u_network.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH] llvmpipe: handle shader sample mask output

2017-10-17 Thread Brian Paul
LGTM. Reviewed-by: Brian Paul <bri...@vmware.com> On 10/17/2017 01:58 PM, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> This probably isn't all that useful for GL, but there are apis where sample_mask is a valid output even without msaa. Just disca

[Mesa-dev] [PATCH 5/5] gallium/util: don't call close() on Windows in u_tests.c

2017-10-17 Thread Brian Paul
--- src/gallium/auxiliary/util/u_tests.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 3cc79af..2548b46 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -567,6

[Mesa-dev] [PATCH 3/5] mesa: use util_strdup() macro in symbol_table.c

2017-10-17 Thread Brian Paul
--- src/mesa/program/symbol_table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/program/symbol_table.c b/src/mesa/program/symbol_table.c index 37066c9..f5dacbb 100644 --- a/src/mesa/program/symbol_table.c +++ b/src/mesa/program/symbol_table.c @@ -24,6 +24,7

[Mesa-dev] [PATCH 1/5] gallium/util: replace gethostbyname() with getaddrinfo()

2017-10-17 Thread Brian Paul
Compiling with MSVC options /we4995 /we4996 (a subset of /sdl) generates a warning that the gethostbyname() function is deprecated in favor of getaddrinfo() or GetAddrInfoW(). Replace the call with getaddrinfo(). Untested. There are no callers to u_socket_connect() in Gallium. ---

[Mesa-dev] [PATCH 4/5] mesa: use util_strdup() macro in u_debug_symbol.c

2017-10-17 Thread Brian Paul
--- src/gallium/auxiliary/util/u_debug_symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c index 4b55523..8476043 100644 --- a/src/gallium/auxiliary/util/u_debug_symbol.c +++

[Mesa-dev] [PATCH 2/5] util: add util_strdup() wrapper macro

2017-10-17 Thread Brian Paul
To work around MSVC warning that strdup() is a deprecated POSIX function. --- src/util/u_string.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index fa0241e..ce45430 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -203,6 +203,7 @@

Re: [Mesa-dev] [PATCH mesa 2/2] svga: format the version string like the rest of mesa

2017-10-16 Thread Brian Paul
HA1 ")" +#endif + , log_prefix, PACKAGE_VERSION); svga_host_log(host_log); /* If the SVGA_EXTRA_LOGGING env var is set, log the process's command For both, Reviewed-by: Brian Paul <bri...@vmware.com>

Re: [Mesa-dev] [PATCH] svga: fix format_conversion_table breakage

2017-10-16 Thread Brian Paul
On 10/16/2017 08:07 AM, Emil Velikov wrote: On 16 October 2017 at 11:24, Eric Engestrom <eric.engest...@imgtec.com> wrote: On Saturday, 2017-10-14 16:52:29 +, Brian Paul wrote: The new A1B5G5R5_UNORM, X1B5G5R5_UNORM formats were added in the wrong place Can you explain why this was

Re: [Mesa-dev] [PATCH] svga: fix format_conversion_table breakage

2017-10-16 Thread Brian Paul
On 10/16/2017 04:24 AM, Eric Engestrom wrote: On Saturday, 2017-10-14 16:52:29 +, Brian Paul wrote: The new A1B5G5R5_UNORM, X1B5G5R5_UNORM formats were added in the wrong place Can you explain why this was wrong, so that one doesn't make the same mistake next time? Maybe add

[Mesa-dev] [PATCH] svga: fix format_conversion_table breakage

2017-10-14 Thread Brian Paul
The new A1B5G5R5_UNORM, X1B5G5R5_UNORM formats were added in the wrong place in commit ef874ee450b18e "gallium: Add support for 5551 with the 1-bit field in the low bit." --- src/gallium/drivers/svga/svga_format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH] mesa: minor simplification in test_attachment_completeness()

2017-10-13 Thread Brian Paul
We already have a pointer to the texture object. Use it here. --- src/mesa/main/fbobject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index db8c207..71e91f9 100644 --- a/src/mesa/main/fbobject.c +++

[Mesa-dev] [PATCH 2/2] mesa: move _mesa_half_is_negative() to half_float.h

2017-10-09 Thread Brian Paul
v2: use !! in the function to be explicit about type conversion. Though, gcc generates the same code with or without the logical !!. --- src/mesa/main/imports.h | 6 -- src/util/half_float.h | 8 2 files changed, 8 insertions(+), 6 deletions(-) diff --git

[Mesa-dev] [PATCH 1/2] mesa: move _mesa_exec_malloc/free() prototypes to their own header

2017-10-09 Thread Brian Paul
c51a8c --- /dev/null +++ b/src/mesa/main/execmem.h @@ -0,0 +1,37 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation

[Mesa-dev] [PATCH] git_sha1_gen: accept MESA_GIT_SHA1_OVERRIDE env var

2017-10-09 Thread Brian Paul
If one uses a parent build script to download/build Mesa we may not have a full git repository (maybe a tar archive) so the 'git rev-parse' command will fail. This updates the script to look for a MESA_GIT_SHA1_OVERRIDE env var. If it's set, use that sha1 instead of using git rev-parse. With

Re: [Mesa-dev] [PATCH 2/3] mesa: move _mesa_half_is_negative() to half_float.h

2017-10-09 Thread Brian Paul
On 10/09/2017 03:24 PM, Ilia Mirkin wrote: On Mon, Oct 9, 2017 at 5:07 PM, Roland Scheidegger <srol...@vmware.com> wrote: Am 09.10.2017 um 22:56 schrieb Brian Paul: --- src/mesa/main/imports.h | 6 -- src/util/half_float.h | 8 2 files changed, 8 insertions(+), 6 del

Re: [Mesa-dev] [PATCH 2/3] mesa: move _mesa_half_is_negative() to half_float.h

2017-10-09 Thread Brian Paul
On 10/09/2017 03:07 PM, Roland Scheidegger wrote: Am 09.10.2017 um 22:56 schrieb Brian Paul: --- src/mesa/main/imports.h | 6 -- src/util/half_float.h | 8 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index

[Mesa-dev] [PATCH 2/3] mesa: move _mesa_half_is_negative() to half_float.h

2017-10-09 Thread Brian Paul
--- src/mesa/main/imports.h | 6 -- src/util/half_float.h | 8 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index a4964a3..51fa72c 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -333,12

[Mesa-dev] [PATCH] git_sha1_gen: accept MESA_GIT_SHA1_OVERRIDE env var

2017-10-09 Thread Brian Paul
If one uses a parent build script to download/build Mesa we may not have a full git repository (maybe a tar archive) so the 'git rev-parse' command will fail. This updates the script to look for a MESA_GIT_SHA1_OVERRIDE env var. If it's set, use that sha1 instead of using git rev-parse. With

[Mesa-dev] [PATCH 1/3] mesa: move _mesa_exec_malloc/free() prototypes to their own header

2017-10-09 Thread Brian Paul
rts.h" +#include "execmem.h" diff --git a/src/mesa/main/execmem.h b/src/mesa/main/execmem.h new file mode 100644 index 000..bc51a8c --- /dev/null +++ b/src/mesa/main/execmem.h @@ -0,0 +1,37 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 1999-2005 Brian Paul

Re: [Mesa-dev] [PATCH 1/6] gallium: plumb context priority through to driver

2017-10-04 Thread Brian Paul
On 10/04/2017 09:44 AM, Rob Clark wrote: Signed-off-by: Rob Clark --- src/gallium/drivers/etnaviv/etnaviv_screen.c| 1 + src/gallium/drivers/freedreno/freedreno_screen.c| 1 + src/gallium/drivers/i915/i915_screen.c | 1 +

Re: [Mesa-dev] [PATCH] Replace byte-swapping code with builtins in pack.c

2017-10-03 Thread Brian Paul
On 10/03/2017 12:01 PM, Jochen Rollwagen wrote: From 4cebe50a9bade6717923e104c954f3fad75f71bb Mon Sep 17 00:00:00 2001 From: Jochen Rollwagen Date: Tue, 3 Oct 2017 19:54:10 +0200 Subject: [PATCH] Replace byte-swapping code with builtins in pack.c This patch replaces

[Mesa-dev] [PATCH 4/4] util: include string.h in u_string.h

2017-10-03 Thread Brian Paul
To fix MinGW compiler warning about missing strlen() prototype. Not sure how I missed this when fixing the malloc() / stdlib.h issue. --- src/util/u_string.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index 5a2a3e9..fa0241e 100644 ---

[Mesa-dev] [PATCH 2/4] mesa: silence 'variable may be used uninitialized' warning in teximage.c

2017-10-03 Thread Brian Paul
Found with MinGW optimized build. --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 0a3025a..bb22b9a 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4885,7 +4885,7 @@

[Mesa-dev] [PATCH 3/4] llvmpipe: silence 'variable may be used uninitialized' warnings

2017-10-03 Thread Brian Paul
--- src/gallium/auxiliary/gallivm/lp_bld_format_aos.c | 2 +- src/gallium/drivers/llvmpipe/lp_state_fs.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c index

[Mesa-dev] [PATCH 1/4] mesa: silence 'variable may be used uninitialized' warning in bufferobj.c

2017-10-03 Thread Brian Paul
Found with MinGW optimized build. --- src/mesa/main/bufferobj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 2da2128..0b98483 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -3287,6 +3287,7 @@

[Mesa-dev] [PATCH] util: include stdlib.h in u_string.h to silence MinGW warning

2017-10-02 Thread Brian Paul
Otherwise we don't get a prototype for malloc(). --- src/util/u_string.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index 48f1125..5a2a3e9 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -38,6 +38,7 @@ #if !defined(XF86_LIBC_H)

Re: [Mesa-dev] [PATCH 1/4] egl/dri2: don't use the template keyword

2017-09-29 Thread Brian Paul
For the series, Reviewed-by: Brian Paul <bri...@vmware.com> On 09/29/2017 03:27 PM, Marek Olšák wrote: From: Marek Olšák <marek.ol...@amd.com> for C++ editors --- src/egl/drivers/dri2/platform_wayland.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --g

Re: [Mesa-dev] MESA and KOTOR

2017-09-29 Thread Brian Paul
On 09/28/2017 11:25 AM, Federico Dossena wrote: Sorry if I insist on this again, but can someone who knows the internals of Mesa better than me please tell me which files implement pbuffers in gallium llvmpipe? Specifically, the parts that are involved in creating a pbuffer, its texture,

Re: [Mesa-dev] [PATCH 3/4] gallium: add PIPE_FORMAT_R10G10B10X2_UNORM

2017-09-29 Thread Brian Paul
On 09/29/2017 05:30 AM, Nicolai Hähnle wrote: From: Nicolai Hähnle --- src/gallium/auxiliary/util/u_format.csv | 1 + src/gallium/auxiliary/util/u_format_tests.c | 6 ++ src/gallium/include/pipe/p_format.h | 2 ++ 3 files changed, 9 insertions(+)

Re: [Mesa-dev] [PATCH 01/11] gallium: add PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS

2017-09-29 Thread Brian Paul
direct register indexing. "as an address" For patches 1-3, 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/2] gallium/util: use new util_vasprintf() function

2017-09-27 Thread Brian Paul
On 09/27/2017 11:18 AM, Nicolai Hähnle wrote: Didn't you send this already? It looks familiar, even in the v2. Yeah, but I neglected to cc my coworkers. Anyway, both patches: Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com> Thanks! -Brian On 27.09.2017 16:01, Brian Paul

[Mesa-dev] [PATCH 2/2] gallium/util: use new util_vasprintf() function

2017-09-27 Thread Brian Paul
--- src/gallium/auxiliary/util/u_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_log.c b/src/gallium/auxiliary/util/u_log.c index 359b3e1..dacbe05 100644 --- a/src/gallium/auxiliary/util/u_log.c +++ b/src/gallium/auxiliary/util/u_log.c @@

[Mesa-dev] [PATCH 1/2] util: add util_vasprintf() for Windows (v2)

2017-09-27 Thread Brian Paul
We don't have vasprintf() on Windows so we need to implement it ourselves. v2: compute actual length of output string, per Nicolai Hähnle. --- src/util/u_string.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index

[Mesa-dev] [PATCH] svga: add missing PIPE_SHADER_CAP_INT64_ATOMICS switch cases

2017-09-26 Thread Brian Paul
Silences a compiler warning. --- src/gallium/drivers/svga/svga_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 16e350c..4cf12c5 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++

[Mesa-dev] [PATCH 1/2] util: add util_vasprintf() for Windows (v2)

2017-09-25 Thread Brian Paul
We don't have vasprintf() on Windows so we need to implement it ourselves. v2: compute actual length of output string, per Nicolai Hähnle. --- src/util/u_string.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index

[Mesa-dev] [PATCH 2/2] gallium/util: use new util_vasprintf() function

2017-09-25 Thread Brian Paul
--- src/gallium/auxiliary/util/u_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_log.c b/src/gallium/auxiliary/util/u_log.c index 359b3e1..dacbe05 100644 --- a/src/gallium/auxiliary/util/u_log.c +++ b/src/gallium/auxiliary/util/u_log.c @@

[Mesa-dev] [PATCH] glsl: silence signed/unsigned comparison warning

2017-09-19 Thread Brian Paul
--- src/compiler/glsl/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 49db56e..18bf1eb 100644 --- a/src/compiler/glsl/ir.cpp +++ b/src/compiler/glsl/ir.cpp @@ -1100,7 +1100,7 @@ ir_constant *

[Mesa-dev] [PATCH 1/2] util: add util_vasprintf() for Windows

2017-09-08 Thread Brian Paul
We don't have vasprintf() on Windows so we need to implement it ourselves. Since we don't know the length of the final string, take a guess at 1 chars. --- src/util/u_string.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/util/u_string.h b/src/util/u_string.h index

[Mesa-dev] [PATCH] st/mesa: don't call close() on Windows

2017-09-08 Thread Brian Paul
--- src/mesa/state_tracker/st_cb_memoryobjects.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_cb_memoryobjects.c b/src/mesa/state_tracker/st_cb_memoryobjects.c index a5764c3..7a43763 100644 --- a/src/mesa/state_tracker/st_cb_memoryobjects.c +++

[Mesa-dev] [PATCH 2/2] gallium/util: use new util_vasprintf() function

2017-09-08 Thread Brian Paul
--- src/gallium/auxiliary/util/u_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_log.c b/src/gallium/auxiliary/util/u_log.c index 359b3e1..dacbe05 100644 --- a/src/gallium/auxiliary/util/u_log.c +++ b/src/gallium/auxiliary/util/u_log.c @@

[Mesa-dev] [PATCH 2/2] mesa: whitespace, formatting fixes in teximage.c

2017-09-08 Thread Brian Paul
--- src/mesa/main/teximage.c | 110 +++ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 32ca172..d064205 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@

[Mesa-dev] [PATCH 1/2] mesa: provide more info in some texture image error messages

2017-09-08 Thread Brian Paul
--- src/mesa/main/teximage.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index e5dc469..32ca172 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1133,7 +1133,8 @@

Re: [Mesa-dev] [PATCH] gallivm: fix gather implementation a bit

2017-09-07 Thread Brian Paul
weight). But for gather, these tricks lead to incrorrect results. "incorrect" Reviewed-by: Brian Paul <bri...@vmware.com> Fix this for CLAMP_TO_EDGE, and add some comments to the other wrap functions which look broken (the 3 mirror_clamp plus mirror_repeat) (too complex to fix right now,

Re: [Mesa-dev] [PATCH 1/2] llvmpipe: enable PIPE_CAP_QUERY_PIPELINE_STATISTICS

2017-09-07 Thread Brian Paul
Both look OK to me. Reviewed-by: Brian Paul <bri...@vmware.com> On 09/07/2017 07:00 PM, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> This was implemented since forever, but not enabled. It passes all piglit tests except one, arb_pipeline_statistic

Re: [Mesa-dev] [PATCH] mesa/mtypes: repack gl_texture_object.

2017-09-05 Thread Brian Paul
On 09/04/2017 05:29 AM, Marek Olšák wrote: On Sun, Sep 3, 2017 at 1:18 PM, Dave Airlie wrote: From: Dave Airlie reduces size from 1144 to 1128. Signed-off-by: Dave Airlie --- src/mesa/main/mtypes.h | 10 +- 1 file

Re: [Mesa-dev] [PATCH 2/2] swr: Report format max_samples=1 to maintain support for "fake" msaa.

2017-08-31 Thread Brian Paul
I'm not familiar with this driver so I'll give this an Acked-by: Brian Paul <bri...@vmware.com> Roland gave me his R-b for the state tracker patch off-list. I'll commit that and you can take care of this one. Feel free to close the bug then. -Brian On 08/25/2017 01:59 PM, Bruce Ch

Re: [Mesa-dev] [PATCH] st/mesa: fix view template initialization in try_pbo_readpixels

2017-08-31 Thread Brian Paul
URE_3D) { templ.u.tex.first_layer = surface->u.tex.first_layer; - templ.u.tex.last_layer = templ.u.tex.last_layer; + templ.u.tex.last_layer = templ.u.tex.first_layer; } else { addr.constants.layer_offset = surface->u.tex.first_layer; } Review

Re: [Mesa-dev] [PATCH] vbo: fix offset in minmax cache key

2017-08-31 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 08/30/2017 11:20 PM, Charmaine Lee wrote: Instead of saving primitive offset in the minmax cache key, save the actual buffer offset which is used in the cache lookup. Fixes rendering artifact seen with GoogleEarth when run with VMware

Re: [Mesa-dev] [PATCH] vbo: fix offset in minmax cache key

2017-08-30 Thread Brian Paul
On 08/30/2017 03:49 PM, Charmaine Lee wrote: Instead of saving primitive offset in the minmax cache key, save the actual buffer offset which is used in the cache lookup. Fixes rendering artifact seen with GoogleEarth when run with VMware driver. Wow, nice working finding that! Looks good to

[Mesa-dev] [PATCH] svga: include sample count in surface_size() computation

2017-08-30 Thread Brian Paul
Use MAX2() because sampleCount will be zero for non-MSAA surfaces. No Piglit regressions. --- src/gallium/drivers/svga/svga_screen_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_screen_cache.c

Re: [Mesa-dev] [PATCH] llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR

2017-08-30 Thread Brian Paul
On 08/30/2017 02:43 AM, Roland Scheidegger wrote: Am 30.08.2017 um 04:49 schrieb Brian Paul: On 08/29/2017 06:17 PM, Roland Scheidegger wrote: Looks good to me, thanks. Reviewed-by: Roland Scheidegger <srol...@vmware.com> Albeit I'm not quite sure why it is never set here? This part

Re: [Mesa-dev] [PATCH] llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR

2017-08-29 Thread Brian Paul
e tracker... Roland Am 28.08.2017 um 22:20 schrieb Brian Paul: If llvmpipe_set_scissor_states() is never called, we still need to be sure that derived scissor/clip state is updated. As of commit 743ad599a97d09b1 that function might not be called. Fixes regressed Piglit gl-1.0-scissor-offscreen -fbo -

Re: [Mesa-dev] [PATCH] st/mesa: fix XPD lowering - don't read dst

2017-08-28 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> On 08/28/2017 03:30 PM, Marek Olšák wrote: From: Marek Olšák <marek.ol...@amd.com> Bugzilla: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D102461=DwIGaQ=uilaK90D4T

[Mesa-dev] [PATCH] llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR

2017-08-28 Thread Brian Paul
If llvmpipe_set_scissor_states() is never called, we still need to be sure that derived scissor/clip state is updated. As of commit 743ad599a97d09b1 that function might not be called. Fixes regressed Piglit gl-1.0-scissor-offscreen -fbo -auto test. Bugzilla:

[Mesa-dev] [PATCH] gallium/vbuf: fix buffer reference bugs

2017-08-24 Thread Brian Paul
In two places we called pipe_resource_reference() to remove a reference to a vertex buffer resource. But we neglected to check if the buffer was a user buffer and not a pipe_resource. This caused us to pass an invalid pipe_resource pointer to pipe_resource_reference(). Instead of calling

[Mesa-dev] [PATCH] vbo: fix glVertexAttrib(index=0)

2017-08-22 Thread Brian Paul
Depending on which extension or GL spec you read the behavior of glVertexAttrib(index=0) either sets the current value for generic attribute 0, or it emits a vertex just like glVertex(). I believe it should do either, depending on context (see below). The piglit gl-2.0-vertex-const-attr test

Re: [Mesa-dev] [PATCH 3/5] tgsi: macro-ify the opcodes table

2017-08-22 Thread Brian Paul
On 08/22/2017 10:35 AM, Nicolai Hähnle wrote: On 22.08.2017 18:33, Brian Paul wrote: On 08/22/2017 09:32 AM, Nicolai Hähnle wrote: From: Nicolai Hähnle <nicolai.haeh...@amd.com> So we can easily re-arrange members of tgsi_opcode_info, and readers of the code don't have to guess wh

Re: [Mesa-dev] [PATCH 3/5] tgsi: macro-ify the opcodes table

2017-08-22 Thread Brian Paul
On 08/22/2017 09:32 AM, Nicolai Hähnle wrote: From: Nicolai Hähnle So we can easily re-arrange members of tgsi_opcode_info, and readers of the code don't have to guess what all the 0s mean. Mostly done with regex search --- src/gallium/auxiliary/Makefile.sources

Re: [Mesa-dev] [PATCH] tgsi/scan: fix uses_double

2017-08-22 Thread Brian Paul
On 08/22/2017 09:52 AM, Nicolai Hähnle wrote: On 22.08.2017 17:42, Marek Olšák wrote: From: Marek Olšák --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c

Re: [Mesa-dev] [PATCH 00/18] Gallium blitter optimizations

2017-08-21 Thread Brian Paul
On 08/18/2017 10:25 AM, Marek Olšák wrote: On Fri, Aug 18, 2017 at 5:56 PM, Brian Paul <bri...@vmware.com> wrote: On 08/17/2017 12:31 PM, Marek Olšák wrote: Hi, Major u_blitter changes: - All draw calls except cubemap blits will now use the draw_rectangle callback. (cubemap

Re: [Mesa-dev] [PATCH 3/3] mesa: optimize _mesa_attr_zero_aliases_vertex()

2017-08-21 Thread Brian Paul
On 08/21/2017 01:09 PM, Samuel Pitoiset wrote: On 08/21/2017 08:56 PM, Brian Paul wrote: After the context is initialized, the API and context flags won't change. So, we can compute whether vertex attribute 0 aliases vertex position just once. This should make the glVertexAttrib

[Mesa-dev] [PATCH 3/3] mesa: optimize _mesa_attr_zero_aliases_vertex()

2017-08-21 Thread Brian Paul
After the context is initialized, the API and context flags won't change. So, we can compute whether vertex attribute 0 aliases vertex position just once. This should make the glVertexAttrib*() functions a little quicker. No Piglit regressions with llvmpipe. --- src/mesa/main/context.c | 17

[Mesa-dev] [PATCH 1/3] vbo: make vbo_bind_arrays() static

2017-08-21 Thread Brian Paul
--- src/mesa/vbo/vbo.h| 2 -- src/mesa/vbo/vbo_exec_array.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index c8e87d3..ffbb201 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -196,8 +196,6 @@ void

[Mesa-dev] [PATCH 2/3] vbo: use new _is_vertex_position() helper in vbo_attrib_tmp.h

2017-08-21 Thread Brian Paul
Makes the code a bit more understandable. --- src/mesa/vbo/vbo_attrib_tmp.h | 82 --- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h index 8328445..5718ac5 100644 ---

[Mesa-dev] [PATCH] svga: replace gotos with conditionals in array drawing code

2017-08-21 Thread Brian Paul
No Piglit regressions. --- src/gallium/drivers/svga/svga_draw_arrays.c | 36 +-- src/gallium/drivers/svga/svga_draw_elements.c | 28 ++--- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c

[Mesa-dev] mistake in "mesa/vbo: move some Draw checks out of validation"?

2017-08-18 Thread Brian Paul
Hi Timothy, I happened to be looking at the VBO vertex array code and I think I spotted a mistake in this commit: commit 4df2931a87fe082f90871564a89a09c826641f5b Author: Timothy Arceri Date: Mon Apr 3 16:38:18 2017 +1000 mesa/vbo: move some Draw checks out of

Re: [Mesa-dev] [PATCH 00/18] Gallium blitter optimizations

2017-08-18 Thread Brian Paul
On 08/17/2017 12:31 PM, Marek Olšák wrote: Hi, Major u_blitter changes: - All draw calls except cubemap blits will now use the draw_rectangle callback. (cubemap blits are not used if the driver supports texture views) - The VS POSITION output always covers the whole 2D clip space,

Re: [Mesa-dev] [PATCH] glsl: set old ldexp operand to NULL when lowering

2017-08-17 Thread Brian Paul
Reviewed-by: Brian Paul <bri...@vmware.com> Tested-by: Brian Paul <bri...@vmware.com> Thanks! On 08/17/2017 05:43 PM, Timothy Arceri wrote: This fixes an assert during IR validation in LLVMpipe. Fixes: e2e2c5abd279 (glsl: calculate number of operands in an expression once) Bugz

Re: [Mesa-dev] [PATCH] winsys/svga/drm: Include sys/types.h

2017-08-16 Thread Brian Paul
ga/drm/vmw_screen.h +++ b/src/gallium/winsys/svga/drm/vmw_screen.h @@ -41,6 +41,7 @@ #include "svga_winsys.h" #include "pipebuffer/pb_buffer_fenced.h" #include +#include #define VMW_GMR_POOL_SIZE (16*1024*1024) #define VMW_QUERY_POOL_SIZE (8192) Reviewed-by: Bri

Re: [Mesa-dev] [PATCH 2/2] gallium/os: fix os_time_get_nano() to roll over less

2017-08-16 Thread Brian Paul
On 08/16/2017 04:42 PM, Jose Fonseca wrote: On 16/08/17 23:37, Jose Fonseca wrote: On 16/08/17 14:22, Brian Paul wrote: From: Frank Richter <frank.rich...@dynardo.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241 Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Bria

[Mesa-dev] [PATCH 2/2] gallium/os: fix os_time_get_nano() to roll over less

2017-08-16 Thread Brian Paul
From: Frank Richter <frank.rich...@dynardo.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241 Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Brian Paul <bri...@vmware.com> --- src/gallium/auxiliary/os/os_time.c | 9 - 1 file changed, 8 insertions(+)

[Mesa-dev] [PATCH 1/2] st/wgl: check for negative delta in wait_swap_interval()

2017-08-16 Thread Brian Paul
From: Frank Richter <frank.rich...@dynardo.de> This can happen because of rollover. See bug report for details. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102241 Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Brian Paul <bri...@vmware.com> --- src/gallium/state_

Re: [Mesa-dev] [0/4] glx/dri: Attempt to fix GLX_OML_swap_method v2

2017-08-09 Thread Brian Paul
Hi Thomas, The series looks good to me. One formatting nit: in one of the patches there's unneeded space around the conditional in some the "if (" code. Reviewed-by: Brian Paul <bri...@vmware.com> On Wed, Aug 9, 2017 at 3:53 AM, Thomas Hellstrom <thellst...@vmware.com>

[Mesa-dev] [PATCH] st/mesa: fix handling of NumSamples=1 (v2)

2017-08-03 Thread Brian Paul
In Mesa we use the convention that if gl_renderbuffer::NumSamples or gl_texture_image::NumSamples is zero, it's a non-MSAA surface. Otherwise, it's an MSAA surface. But in gallium nr_samples=1 is a non-MSAA surface. Before, if the user called glRenderbufferStorageMultisample() or

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
Yes, I'm not proposing otherwise. -Brian On 08/02/2017 03:53 PM, Marek Olšák wrote: Can the issue be fixed such that gallium drivers keep getting nr_samples = 0? Marek On Wed, Aug 2, 2017 at 7:07 PM, Brian Paul <bri...@vmware.com> wrote: We pretty much use the conv

Re: [Mesa-dev] [Mesa-stable] [PATCH] st/mesa: add osmesa framebuffer iface hash table per st manager

2017-08-02 Thread Brian Paul
I'll let Charmaine review, but the subject line prefix should probably be "st/osmesa". -Brian On 08/02/2017 05:28 PM, Bruce Cherniak wrote: Commit bbc29393d3 didn't include osmesa state_tracker. This patch adds necessary initialization. Fixes crash in OSMesa initialization. Created-by:

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
On 08/02/2017 01:18 PM, Roland Scheidegger wrote: Am 02.08.2017 um 20:35 schrieb Brian Paul: On 08/02/2017 11:59 AM, Roland Scheidegger wrote: I think the problem here is that msaa surfaces with sample count 1 are not really supposed to exist in gallium. This is a rather awkward gl-ism, which

[Mesa-dev] [PATCH 2/2] calibrate_rast: add command line arguments

2017-08-02 Thread Brian Paul
To skip swapbuffers, or only test points/lines/quads. --- src/tests/calibrate_rast.c | 130 ++--- 1 file changed, 88 insertions(+), 42 deletions(-) diff --git a/src/tests/calibrate_rast.c b/src/tests/calibrate_rast.c index ae9ff10..0bbbf84 100644 ---

[Mesa-dev] [PATCH 1/2] calibrate_rast: add vertical line test

2017-08-02 Thread Brian Paul
Print GL_VERSION string. Call glutSwapBuffers() and fflush() more frequently so we can see what's happening. --- src/tests/calibrate_rast.c | 141 +++-- 1 file changed, 136 insertions(+), 5 deletions(-) diff --git a/src/tests/calibrate_rast.c

Re: [Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
tracker code for searching for a supported sample count is skipped so we pass pipe_resource::nr_sample=1 to resource_create() and we get a non-msaa surface. That's wrong. I'm pretty sure we need to do the search. -Brian Roland Am 02.08.2017 um 19:07 schrieb Brian Paul: We pretty much

Re: [Mesa-dev] [PATCH 3/3] gallium/docs: add more info about TXF and MSAA textures

2017-08-02 Thread Brian Paul
On 08/02/2017 12:03 PM, Roland Scheidegger wrote: Am 02.08.2017 um 19:07 schrieb Brian Paul: If the texture is multisampled, the coord.w component indicates which sample to fetch. --- src/gallium/docs/source/tgsi.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src

[Mesa-dev] [PATCH 3/3] gallium/docs: add more info about TXF and MSAA textures

2017-08-02 Thread Brian Paul
If the texture is multisampled, the coord.w component indicates which sample to fetch. --- src/gallium/docs/source/tgsi.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index d7817cc..5bf9e95 100644 ---

[Mesa-dev] [PATCH 2/3] svga: check for sample_count > 0 in svga_is_format_supported()

2017-08-02 Thread Brian Paul
See previous commit for more info. If sample_count=1, we want to return failure here since we don't support 1x MSAA. --- src/gallium/drivers/svga/svga_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_screen.c

[Mesa-dev] [PATCH 1/3] st/mesa: fix handling of NumSamples=1

2017-08-02 Thread Brian Paul
We pretty much use the convention that if gl_renderbuffer::NumSamples or gl_texture_image::NumSamples is zero, it's a non-MSAA surface. Otherwise, it's an MSAA surface. This patch changes the sample count checks in st_AllocTextureStorage() and st_renderbuffer_alloc_storage() to test for samples >

<    3   4   5   6   7   8   9   10   11   12   >