[Mesa-dev] Choosing texture internal format in GLES

2013-09-27 Thread Wladimir
Hello, Mareko and me had a small discussion about this on IRC. Basically with GLES (1.0, 2.0 at least) the application has no way to control the exact internal format [1]. This is intentional give the hardware more leeway. See http://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml :

Re: [Mesa-dev] [PATCH] r600g/sb: Move variable dereference after null check.

2013-09-27 Thread Vadim Girlin
On 09/28/2013 10:08 AM, Vinson Lee wrote: Fixes "Deference before null check" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Vadim Girlin --- src/gallium/drivers/r600/sb/sb_ra_init.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium

[Mesa-dev] [PATCH] r600g: Prevent by invalid op overflows in release builds.

2013-09-27 Thread Vinson Lee
Fixes "Overflowed return value" defects reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/r600/r600_isa.h | 9 + 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/r600/r600_isa.h b/src/gallium/drivers/r600/r600_isa.h index c6bb869..5b9c3d0 100644 --

[Mesa-dev] [PATCH] r600g/sb: Move variable dereference after null check.

2013-09-27 Thread Vinson Lee
Fixes "Deference before null check" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/r600/sb/sb_ra_init.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/sb/sb_ra_init.cpp b/src/gallium/drivers/r600/sb/sb_ra_init.cpp

[Mesa-dev] [PATCH] util/u_format: Assert that format block size is at least 1 byte.

2013-09-27 Thread Vinson Lee
The block size for all formats is currently at least 1 byte. Add an assertion for this. This should silence several Coverity "Division or modulo by zero" defects. Signed-off-by: Vinson Lee --- src/gallium/auxiliary/util/u_format.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) dif

[Mesa-dev] [PATCH v2] i965: Initialize brw_blorp_const_color_program::prog_data.

2013-09-27 Thread Vinson Lee
Fixes "Uninitialized scalar field" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index f

[Mesa-dev] [PATCH v2] i915, i965: Fix memory leak in intel_miptree_create_for_bo.

2013-09-27 Thread Vinson Lee
Fixes "Resource leak" defects reported by Coverity. Signed-off-by: Vinson Lee --- src/mesa/drivers/dri/i915/intel_mipmap_tree.c | 4 +++- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_mipmap_

[Mesa-dev] [PATCH] i915: Fix memory leak in do_blit_readpixels.

2013-09-27 Thread Vinson Lee
Fixes "Resource leak" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/mesa/drivers/dri/i915/intel_pixel_read.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i915/intel_pixel_read.c b/src/mesa/drivers/dri/i915/intel_pixel_read.c index 26eb496..8fd1c8d 10

[Mesa-dev] [PATCH] draw: Add a null check for draw.

2013-09-27 Thread Vinson Lee
There is an earlier null check for draw so draw could be null here as well. Fixes "Dereference after null check" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/auxiliary/draw/draw_pipe_unfilled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gal

[Mesa-dev] [PATCH] i965/gs: Fix incorrect numbering of DWORDs in 3DSTATE_GS

2013-09-27 Thread Paul Berry
In commit 247f90c77e8f3894e963d796628246ba0bde27b5 (i965/gs: Set control data header size/format appropriately for EndPrimitive()), I incorrectly numbered the DWORDs in the 3DSTATE_GS command starting from 1 instead of starting from 0. This caused the control data format to be programmed into the

[Mesa-dev] [PATCH] nvc0: Remove unused pointer value cfg.

2013-09-27 Thread Vinson Lee
cfg is only used inside for loop so also move declaration there. Fixes "Unused pointer value" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/nouveau/nvc0/nvc0_query.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouve

[Mesa-dev] [PATCH] llvmpipe: Remove unnecessary null check of shader.

2013-09-27 Thread Vinson Lee
shader has already been dereferenced earlier so cannot be null here. Fixes "Dereference before null check" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/driver

[Mesa-dev] [PATCH v2] nv30: Clear dirty bit for processed samplers.

2013-09-27 Thread Vinson Lee
Otherwise, the while(dirty) loop will never exit. Fixes "Infinite loop" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/nouveau/nv30/nv40_verttex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv30/nv40_verttex.c b/src/gallium

[Mesa-dev] [PATCH] nouveau: Explicitly upcast operands so mulitplication is 64-bit.

2013-09-27 Thread Vinson Lee
Fixes "Unintentional integer overflow" defects reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/nouveau/nouveau_vp3_video.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.h b/src/gallium/drivers/nouvea

Re: [Mesa-dev] [PATCH 01/29] gallium/targets: Make use of prebuilt libdricommon.la.

2013-09-27 Thread Tom Stellard
On Sat, Sep 28, 2013 at 04:42:34AM +0100, Emil Velikov wrote: > On 28/09/13 04:36, Tom Stellard wrote: > > On Sun, Sep 22, 2013 at 09:29:24PM +0100, Emil Velikov wrote: > >> From: Johannes Obermayr > >> > >> libdricommon.la is available whenever a non swrast driver is built. > >> All the classic d

[Mesa-dev] [PATCH] nouveau/codegen: Initialize dst0 array in Converter::handleInstruction.

2013-09-27 Thread Vinson Lee
dst0 is not initialized if tgsi.dstCount() is false. Fixes "Uninitialized pointer read" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/

Re: [Mesa-dev] [PATCH 05/29] softpipe: consolidate C sources list into Makefile.sources

2013-09-27 Thread Tom Stellard
On Sun, Sep 22, 2013 at 09:29:28PM +0100, Emil Velikov wrote: > Signed-off-by: Emil Velikov As long as you have build tested these with both automake and scons and are prepared to deal with any fallout once they are committed. Patches 5 through 29 are: Reviewed-by: Tom Stellard > --- > src/g

Re: [Mesa-dev] [PATCH 01/29] gallium/targets: Make use of prebuilt libdricommon.la.

2013-09-27 Thread Emil Velikov
On 28/09/13 04:36, Tom Stellard wrote: > On Sun, Sep 22, 2013 at 09:29:24PM +0100, Emil Velikov wrote: >> From: Johannes Obermayr >> >> libdricommon.la is available whenever a non swrast driver is built. >> All the classic dri drivers make use of the prebuild library but all >> of the gallium ones

Re: [Mesa-dev] [PATCH 03/29] gallium/radeon: drop unused variable LIBGALLIUM_LIBS

2013-09-27 Thread Tom Stellard
On Sun, Sep 22, 2013 at 09:29:26PM +0100, Emil Velikov wrote: Reviewed-by: Tom Stellard > Signed-off-by: Emil Velikov > --- > src/gallium/drivers/radeon/Makefile.am | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/src/gallium/drivers/radeon/Makefile.am > b/src/gallium/drivers/radeon/

Re: [Mesa-dev] [PATCH 01/29] gallium/targets: Make use of prebuilt libdricommon.la.

2013-09-27 Thread Tom Stellard
On Sun, Sep 22, 2013 at 09:29:24PM +0100, Emil Velikov wrote: > From: Johannes Obermayr > > libdricommon.la is available whenever a non swrast driver is built. > All the classic dri drivers make use of the prebuild library but all > of the gallium ones rebuild it explicitly. > > While we're here

Re: [Mesa-dev] [PATCH 04/29] r600: use NEED_RADEON_LLVM over R600_NEED_RADEON_GALLIUM

2013-09-27 Thread Tom Stellard
On Sun, Sep 22, 2013 at 09:29:27PM +0100, Emil Velikov wrote: > libllvmradeon.la is available whenever NEED_RADEON_LLVM is set, using > R600_NEED_RADEON_GALLIUM is rather ambiguous and unnecessary. Drop it > in favour of NEED_RADEON_LLVM. > Reviewed-by: Tom Stellard > Signed-off-by: Emil Velikov

Re: [Mesa-dev] [PATCH] R600/SI: fix MIMG writemask adjustement

2013-09-27 Thread Tom Stellard
On Mon, Sep 23, 2013 at 09:09:14PM +0200, mar...@gmail.com wrote: > From: Marek Olšák > > This fixes piglit: > - shaders/glsl-fs-texture2d-masked > - shaders/glsl-fs-texture2d-masked-4 > > Signed-off-by: Marek Olšák > --- > lib/Target/R600/SIISelLowering.cpp | 27 +-- >

Re: [Mesa-dev] [PATCH] radeon/llvm: fix TGSI_OPCODE_UCMP

2013-09-27 Thread Tom Stellard
On Wed, Sep 25, 2013 at 08:14:43PM +0200, Marek Olšák wrote: > From: Marek Olšák > > This doesn't fix any known issue (I haven't run piglit with this yet), > but the code was obviously completely wrong. It looks like copy-pasted from > CMP. Reviewed-by: Tom Stellard > --- > src/gallium/drive

Re: [Mesa-dev] Janitorial work: no more intel_context.[ch]; tidying

2013-09-27 Thread Emil Velikov
On 28/09/13 00:45, Kenneth Graunke wrote: > This series combines brw_context.[ch] and intel_context.[ch], > and cleans up our context creation code quite a bit. A bunch of > functionality was awkwardly split between the two sets of files; > now it's all in one place. > > While this series is larg

[Mesa-dev] [PATCH] i965: Remove the "ARF" register file.

2013-09-27 Thread Matt Turner
The registers in the architecture register file don't share much in common, so there's no point in grouping them together. Use the HW_REG class instead. The vec4 backend already does this. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 -- src/mesa/drivers/dri/i965/brw_fs.h

[Mesa-dev] [PATCH 06/10] i965: Don't dead-code eliminate instructions that write to the accumulator.

2013-09-27 Thread Matt Turner
v2: Set destination register using brw_null_reg(). --- src/mesa/drivers/dri/i965/brw_fs.cpp | 15 ++- src/mesa/drivers/dri/i965/brw_vec4.cpp | 15 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/

[Mesa-dev] [PATCH 09/10] i965/fs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-27 Thread Matt Turner
v2: Check fixed_hw_reg.{file,nr} instead of dst.reg. --- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 103 +++ 2 files changed, 104 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri

[Mesa-dev] [PATCH 10/10] i965/vs: Add a peephole pass to combine ADD with ADDC/SUBB.

2013-09-27 Thread Matt Turner
v2: Check fixed_hw_reg.{file,nr} instead of dst.reg. --- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 103 + 2 files changed, 104 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers

Re: [Mesa-dev] [PATCH RESEND 0/3] gallium: replacing X11_CFLAGS with X11_INCLUDES

2013-09-27 Thread Emil Velikov
On 28/09/13 01:39, Gaetan Nadon wrote: > On 13-09-27 07:59 PM, Brian Paul wrote: >> On 09/27/2013 03:42 PM, Gaetan Nadon wrote: >>> The X11_CFLAGS variable is undefined (not defined in config.status). >>> It appears the intent was to use X11_INCLUDES defined in configure.ac. >>> >>> Gaetan Nadon (3

Re: [Mesa-dev] [PATCH] XXXgallium/common_dri: fix the scons build

2013-09-27 Thread Emil Velikov
On 28/09/13 01:41, Eric Anholt wrote: > Emil Velikov writes: > >> * clone the drienv to driswenv and adjust approapriately >> * export driswenv and use it in dri-swrast >> * ensure __NOT_HAVE_DRM_H is defined for drisw, similar >> to all other common_drisw users > > I'm confused where __NOT_HAVE

Re: [Mesa-dev] [PATCH] XXXgallium/common_dri: fix the scons build

2013-09-27 Thread Eric Anholt
Emil Velikov writes: > * clone the drienv to driswenv and adjust approapriately > * export driswenv and use it in dri-swrast > * ensure __NOT_HAVE_DRM_H is defined for drisw, similar > to all other common_drisw users I'm confused where __NOT_HAVE_DRM_H comes from. I don't see any references to

Re: [Mesa-dev] [PATCH RESEND 0/3] gallium: replacing X11_CFLAGS with X11_INCLUDES

2013-09-27 Thread Gaetan Nadon
On 13-09-27 07:59 PM, Brian Paul wrote: > On 09/27/2013 03:42 PM, Gaetan Nadon wrote: >> The X11_CFLAGS variable is undefined (not defined in config.status). >> It appears the intent was to use X11_INCLUDES defined in configure.ac. >> >> Gaetan Nadon (3): >>gallium/targets/libgl-xlib: X11/Xlib.

Re: [Mesa-dev] [PATCH] XXXgallium/common_dri: fix the scons build

2013-09-27 Thread Eric Anholt
Emil Velikov writes: > * clone the drienv to driswenv and adjust approapriately > * export driswenv and use it in dri-swrast > * ensure __NOT_HAVE_DRM_H is defined for drisw, similar > to all other common_drisw users > > Signed-off-by: Emil Velikov > --- > > With this patch building dri-swrast,

Re: [Mesa-dev] [PATCH 5/7] intel: Remove silly check for !bufmgr.

2013-09-27 Thread Eric Anholt
Ian Romanick writes: > On 09/26/2013 09:19 PM, Kenneth Graunke wrote: >> On 09/26/2013 08:36 PM, Eric Anholt wrote: >>> If bufmgr didn't get created, then screen creation failed, and we never >>> should have got here in the first place. This was added by Chris Wilson >>> in 2010 with no explanat

Re: [Mesa-dev] [PATCH RESEND 0/3] gallium: replacing X11_CFLAGS with X11_INCLUDES

2013-09-27 Thread Brian Paul
On 09/27/2013 03:42 PM, Gaetan Nadon wrote: The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. Gaetan Nadon (3): gallium/targets/libgl-xlib: X11/Xlib.h: No such file or directory gallium/state_trackers

[Mesa-dev] [PATCH 20/29] i965: Make brwInitFunctions take brw_context rather than intel_screen.

2013-09-27 Thread Kenneth Graunke
It actually just wants generation checking, and brw->gen is the usual way of doing that. In the future, we'll also want to check brw->hw_ctx, which isn't available from the screen. While we're changing the function signature, convert from studly caps to our usual naming conventions. Signed-off-b

[Mesa-dev] [PATCH 19/29] i965: Merge intelInitFunctions() and brwInitFunctions().

2013-09-27 Thread Kenneth Graunke
They do exactly the same thing. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 569e881..6b6bea8

[Mesa-dev] [PATCH 18/29] i965: Merge intel_context.c into brw_context.c.

2013-09-27 Thread Kenneth Graunke
There's no point in having two files for context functions. This patch moves the code from intel_context.c into brw_context.c unmodified (other than whitespace fixes). Right now, this looks silly; future patches will merge functions and tidy things up. Signed-off-by: Kenneth Graunke --- src/me

[Mesa-dev] [PATCH 17/29] i965: Move memset of TextureFormatSupported to brw_init_surface_formats.

2013-09-27 Thread Kenneth Graunke
brw_init_surface_formats already sets entries in TextureFormatsSupported to true; it may as well take care of initializing it to false too. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 ++ src/mesa/drivers/dri/i965/intel_context.c | 3 --- 2 files

[Mesa-dev] [PATCH 29/29] i965: Merge intel_context.h into brw_context.h.

2013-09-27 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 95 +++- src/mesa/drivers/dri/i965/intel_context.h | 142 -- 2 files changed, 93 insertions(+), 144 deletions(-) delete mode 100644 src/mesa/drivers/dri/i965/intel_context.

[Mesa-dev] [PATCH 27/29] i965: Delete our copy of likely/unlikely macros.

2013-09-27 Thread Kenneth Graunke
brw_context.h includes imports.h which includes compiler.h which already defines these. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_context.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 28/29] i965: Drop random 32-bit assembly implementation of memcpy().

2013-09-27 Thread Kenneth Graunke
This was only used for uploading batchbuffer data, and only on 32-bit systems. If this is actually useful, we might want to use it more widely. But more than likely, it isn't. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 2 +- src/mesa/drivers/dri/i965/in

[Mesa-dev] [PATCH 26/29] mesa: Move U_FIXED/S_FIXED macros from i965 to macros.h.

2013-09-27 Thread Kenneth Graunke
These make it easy to convert a floating point value to a fixed point numbers. The second parameter is the number of bits used for the fractional part of the number. It looks like core Mesa has similar functions already, but none that allows an arbitrary number of fractional bits. The more gener

[Mesa-dev] [PATCH 25/29] mesa: Move ROUND_DOWN_TO() macro from i915/i965 to macros.h.

2013-09-27 Thread Kenneth Graunke
This seems generally useful, so it may as well live in core Mesa. In fact, the comment for ALIGN() in macros.h actually says to "see also" ROUND_DOWN_TO, which...was in a driver somewhere. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i915/intel_context.h | 13 - src/mesa/

[Mesa-dev] [PATCH 24/29] i965: Move need_workaround_flush = true to intel_batchbuffer_init.

2013-09-27 Thread Kenneth Graunke
intel_batchbuffer_init() sets up initial batchbuffer state; it seems like a reasonable place to initialize this flag. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 2 -- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 2 ++ 2 files changed, 2 insertions(+), 2

[Mesa-dev] [PATCH 23/29] i965: Move DriverFlag initialization to brw_init_state().

2013-09-27 Thread Kenneth Graunke
Configuring which dirty flags we want sounds like a job for brw_init_state(). Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 4 src/mesa/drivers/dri/i965/brw_state_upload.c | 5 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/

[Mesa-dev] [PATCH 22/29] i965: Merge intelInitContext into brwCreateContext.

2013-09-27 Thread Kenneth Graunke
The split here was completely arbitrary. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 116 +++--- src/mesa/drivers/dri/i965/intel_context.h | 10 --- 2 files changed, 43 insertions(+), 83 deletions(-) diff --git a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 21/29] i965: Move viewport driver hook setup to brw_init_driver_functions.

2013-09-27 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 41117cb..0ad9ead 100644 --- a/src/mesa

[Mesa-dev] [PATCH 16/29] i965: Remove has_aa_line_parameters.

2013-09-27 Thread Kenneth Graunke
This flag is only used in one place, and is only set on one platform. Just check for original Gen4 in the relevant function. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c| 1 - src/mesa/drivers/dri/i965/brw_context.h| 1 - src/mesa/drivers/dri/i965/brw_misc_s

[Mesa-dev] [PATCH 15/29] i965: Move state setup from brwCreateContext to brw_init_state().

2013-09-27 Thread Kenneth Graunke
This seems like a better place for it, and helps clean up brwCreateContext (which is full of a lot of random stuff). Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 8 src/mesa/drivers/dri/i965/brw_state_upload.c | 8 2 files changed, 8 inserti

[Mesa-dev] [PATCH 14/29] i965: Remove the brw_context::emit_state_always flag.

2013-09-27 Thread Kenneth Graunke
This was always set to false, and is only used for debugging. To enable it, simply change the if (0) block and recompile. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 2 -- src/mesa/drivers/dri/i965/brw_context.h | 2 -- src/mesa/drivers/dri/i965/brw_sta

[Mesa-dev] [PATCH 13/29] i965: Move hardware feature flags to brw_device_info.

2013-09-27 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 7 +++ src/mesa/drivers/dri/i965/brw_device_info.c | 11 +++ src/mesa/drivers/dri/i965/brw_device_info.h | 4 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 12/29] i965: Move device quirks to brw_device_info.

2013-09-27 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 10 +++--- src/mesa/drivers/dri/i965/brw_device_info.c | 9 - src/mesa/drivers/dri/i965/brw_device_info.h | 16 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/mesa/d

[Mesa-dev] [PATCH 11/29] i965: Move hardware limits to brw_device_info.

2013-09-27 Thread Kenneth Graunke
Since each kind of device has its own brw_device_info structure, we can simply store the URB and thread limits there. This eliminates all the large if-ladders, and simplifies the context initialization code quite a bit. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c

[Mesa-dev] [PATCH 10/29] i965: Replace some intel_screen fields with brw_device_info references.

2013-09-27 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 39 +++- src/mesa/drivers/dri/i965/intel_fbo.c| 2 +- src/mesa/drivers/dri/i965/intel_screen.c | 34 +++- src/mesa/drivers/dri/i965/intel_screen.h | 9

[Mesa-dev] [PATCH 09/29] i965: Delete the INTEL_SEPARATE_STENCIL override.

2013-09-27 Thread Kenneth Graunke
This option was useful during initial development, but it's been ages since I've heard of anyone using it. Plus, Gen7+ mandates separate stencil, so it was really only useful on Sandybridge anyway. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_screen.c | 27

[Mesa-dev] [PATCH 08/29] i965: Add a new brw_device_info structure.

2013-09-27 Thread Kenneth Graunke
The idea is that struct brw_device_info should store statically-known information about hardware features. Using the new family name in the PCI ID table, we can easily grab the right structure. This is basically the equivalent of intel_device_info in the kernel. This patch also makes the new str

[Mesa-dev] [PATCH 07/29] i965: Add the family name to the PCI ID table.

2013-09-27 Thread Kenneth Graunke
I removed this a while ago, since we never used it, but I'm finally resurrecting the idea in the next commits. Signed-off-by: Kenneth Graunke --- include/pci_ids/i965_pci_ids.h| 186 +++--- include/pci_ids/pci_id_driver_map.h | 2 +- src/mesa/drivers/d

[Mesa-dev] [PATCH 06/29] i965: Remove #define name from PCI ID table.

2013-09-27 Thread Kenneth Graunke
Nothing uses the #define name, and it's not terribly useful - the numerical ID serves the same purpose. The only thing we could really do with it is generate slightly prettier preprocessed code. But who looks at that? Signed-off-by: Kenneth Graunke --- include/pci_ids/i965_pci_ids.h

[Mesa-dev] [PATCH 05/29] i965: Pull most driconf option handling into a centralized function.

2013-09-27 Thread Kenneth Graunke
Using a helper function clarifies the context initialization code. I would've liked to completely centralize it, but moving the optionCache code from intelInitExtensions into here would've required setting flags in the context, which seems like a waste. Signed-off-by: Kenneth Graunke --- src/me

[Mesa-dev] [PATCH 04/29] i965: Move a bunch of code from intelInitContext to brwCreateContext.

2013-09-27 Thread Kenneth Graunke
Now that intelInitContext isn't shared between i915 and i965, the split is fairly arbitrary. This patch moves a bunch of the basic context creation and generation checking code up to the top-level function (and slightly earlier). More will follow. Signed-off-by: Kenneth Graunke --- src/mesa/dr

[Mesa-dev] [PATCH 03/29] i965: Update the comment about viewport hacks.

2013-09-27 Thread Kenneth Graunke
It wasn't clear that this was necessary for EGL, or why. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_context.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c

[Mesa-dev] [PATCH 02/29] i965: Pull out INTEL_DEBUG handling into new intel_debug.[ch] files.

2013-09-27 Thread Kenneth Graunke
Now that there isn't an intel_context structure, the split between brw_context.[ch] and intel_context.[ch] is rather awkward and arbitrary. Removing intel_context.[ch] seems desirable, but not everything really belongs in brw_context.[ch], either. Moving INTEL_DEBUG handling into separate intel_de

[Mesa-dev] [PATCH 01/29] i965: Rename brwCreateContext's error parameter to dri_ctx_error.

2013-09-27 Thread Kenneth Graunke
"error" is a very generic name. dri_ctx_error is the name used in intelInitContext(), which is more specific. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_contex

[Mesa-dev] Janitorial work: no more intel_context.[ch]; tidying

2013-09-27 Thread Kenneth Graunke
This series combines brw_context.[ch] and intel_context.[ch], and cleans up our context creation code quite a bit. A bunch of functionality was awkwardly split between the two sets of files; now it's all in one place. While this series is large, it should be fairly easy reading. Patch 28 does hav

Re: [Mesa-dev] [PATCH 1/2] mesa: minor fix-ups for _mesa_validate_sync()

2013-09-27 Thread Brian Paul
On Fri, Sep 27, 2013 at 3:22 PM, Ian Romanick wrote: > The series is > > Reviewed-by: Ian Romanick > > Should patch 2 go to stable? Yes. Thanks. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/list

[Mesa-dev] [PATCH] mesa: add missing error checks in _mesa_GetObject[Ptr]Label()

2013-09-27 Thread Brian Paul
Error checking bufSize isn't mentioned in the spec, but it is in the man pages. However, I believe the man page is incorrect. Typically, GL functions that take GLsizei parameters check that they're positive or non-negative. Negative values don't make sense here. A spec bug has been filed with K

Re: [Mesa-dev] [PATCH 9/9] i965: Add a real native TexStorage path.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: We originally had a path just did the loop and called ctx->Driver.AllocTextureImageBuffer(), which I moved into Mesa core. But we can do better, avoiding incorrect miptree size guesses and later texture validations by just directly allocating the miptre

Re: [Mesa-dev] [PATCH 8/9] i965: Add missing license to intel_tex_validate.c.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: I've rewritten a lot of this file. --- src/mesa/drivers/dri/i965/intel_tex_validate.c | 23 +++ 1 file changed, 23 insertions(+) Reviewed-by: Chad Versace ___ mesa-dev mailing list m

Re: [Mesa-dev] [PATCH 7/9] i965: Always allocate validated miptrees from level 0.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: No change in copies during a piglit run, but it's one less first_level != 0 in our codebase. --- src/mesa/drivers/dri/i965/intel_tex_validate.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/inte

Re: [Mesa-dev] [PATCH 6/9] i965: Don't relayout a texture just for baselevel changes.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: As long as the baselevel, maxlevel still sit inside the range we had previously validated, there's no need to reallocate the texture. I also hope this makes our texture validation logic much more obvious. It's taken me enough tries to write this change,

Re: [Mesa-dev] [PATCH 5/9] i965: Don't allocate a 1-level texture when GL_GENERATE_MIPMAP is set.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: Given that a teximage that calls us with this flag set will immediately proceed to allocate the other levels, we can probably just go ahead and allocate those levels now. Reduces miptree copies in piglit by about .05%. --- src/mesa/drivers/dri/i965/in

Re: [Mesa-dev] [PATCH 4/9] i965: Stop allocating miptrees with first_level != 0.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: If the caller shows up with GL_BASE_LEVEL != 0, it doesn't mean that the texture will over the course of its lifetime have that nonzero baselevel, it means that the caller is filling the texture from the bottom up for some reason (one could imagine deman

Re: [Mesa-dev] [PATCH 1/9] i965: Always look up from the object's mt when setting up texturing state.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: We know that the object's mt is equal to the firstimage's mt because it's gone through intel_finalize_mipmap_tree(). Saves a lookup of firstimage on pre-gen7. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 +--- src/mesa/drivers/dri/i965/g

Re: [Mesa-dev] [PATCH 2/9] i965: Totally switch around how we handle nonzero baselevel-first_level.

2013-09-27 Thread Chad Versace
On 09/18/2013 12:59 PM, Eric Anholt wrote: This has no effect currently, because intel_finalize_mipmap_tree() always makes mt->first_level == tObj->BaseLevel. The change I made before to handle it (b1080cfbdb0a084122fcd662cd27b4748c5598fd) got very close to working, but after fixing some unrelat

[Mesa-dev] [PATCH RESEND 3/3] gallium/state_trackers/glx: X11/Xlib.h: No such file or directory

2013-09-27 Thread Gaetan Nadon
The compiler cannot find the Xlib.h in the installed system headers. All supplied include directives point to inside the mesa module. The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. The Xlib.h file is not

[Mesa-dev] [PATCH RESEND 2/3] gallium/state_trackers/egl: use X11_INCLUDES rather than X11_CFLAGS

2013-09-27 Thread Gaetan Nadon
The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. It is used for building the code in the x11 subdir. The build does not fail on this one as LIBDRM_CFLAGS happens to have the inludedir value as the one for X1

[Mesa-dev] [PATCH RESEND 1/3] gallium/targets/libgl-xlib: X11/Xlib.h: No such file or directory

2013-09-27 Thread Gaetan Nadon
The compiler cannot find the Xlib.h in the installed system headers. All supplied include directives point to inside the mesa module. The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. The Xlib.h file is not

[Mesa-dev] [PATCH RESEND 0/3] gallium: replacing X11_CFLAGS with X11_INCLUDES

2013-09-27 Thread Gaetan Nadon
The X11_CFLAGS variable is undefined (not defined in config.status). It appears the intent was to use X11_INCLUDES defined in configure.ac. Gaetan Nadon (3): gallium/targets/libgl-xlib: X11/Xlib.h: No such file or directory gallium/state_trackers/egl: use X11_INCLUDES rather than X11_CFLAGS

Re: [Mesa-dev] [PATCH 1/4] glsl: Keep track of location for interface block fields.

2013-09-27 Thread Ian Romanick
Patches 1, 2, and 4 are Reviewed-by: Ian Romanick I sent out a question about patch 3. On 09/14/2013 01:00 PM, Paul Berry wrote: > This patch adds a "location" element to struct glsl_struct_field, so > that we can keep track of the gl_varying_slot associated with each > built-in geometry shader

Re: [Mesa-dev] [PATCH 3/4] glsl/gs: handle gl_ClipDistance geometry input in lower_clip_distance.

2013-09-27 Thread Ian Romanick
There are some bits of this patch I'm trying to understand. I think they can be cleared up by one question below... On 09/14/2013 01:00 PM, Paul Berry wrote: > From: Bryan Cain > > This corresponds to the lowering of gl_ClipDistance to > gl_ClipDistanceMESA for vertex and geometry shader output

Re: [Mesa-dev] [PATCH 1/2] mesa: minor fix-ups for _mesa_validate_sync()

2013-09-27 Thread Ian Romanick
The series is Reviewed-by: Ian Romanick Should patch 2 go to stable? On 09/14/2013 09:16 AM, Brian Paul wrote: > Return bool instead of int. Const-qualify the syncObj. Add some comments. > --- > src/mesa/main/syncobj.c | 12 ++-- > src/mesa/main/syncobj.h |5 +++-- > 2 files ch

[Mesa-dev] [PATCH] Use -Bsymbolic when linking libEGL.so

2013-09-27 Thread Carl Worth
For some reason that I don't yet fully understand, Glaze does not work with libEGL unless libEGL is linked with -Bsymbolic.[*] Beyond that specific reason, all of the reasons for which libGL.so is linked with -Bsymbolic, (see the commit history), should also apply here. [*] The specific behavior

[Mesa-dev] [PATCH] XXXgallium/common_dri: fix the scons build

2013-09-27 Thread Emil Velikov
* clone the drienv to driswenv and adjust approapriately * export driswenv and use it in dri-swrast * ensure __NOT_HAVE_DRM_H is defined for drisw, similar to all other common_drisw users Signed-off-by: Emil Velikov --- With this patch building dri-swrast, dri-i915 and dri-vmware build correctly

Re: [Mesa-dev] [PATCH] i965/blorp: retype destination register for texture SEND instruction to UW.

2013-09-27 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] i965/blorp: retype destination register for texture SEND instruction to UW.

2013-09-27 Thread Paul Berry
>From the bspec documentation of the SEND instruction: "destination region cannot cross the 256-bit register boundary." To avoid violating this restriction when executing SIMD16 texturing operations (such as those used by blorp), we need to ensure that the destination of the SEND instruction

Re: [Mesa-dev] [PATCH 1/5] glsl_compiler: Use no_argument instead of 0 in getopt_long options

2013-09-27 Thread Ian Romanick
I also forgot to mention... my next intended step is to have the stand-alone compiler be installed as part of the regular Mesa install process. The build system terrifies / annoys me enough that I'll have to solicit some help doing that... On 09/27/2013 11:58 AM, Ian Romanick wrote: > From: Ian R

[Mesa-dev] [PATCH 10/10] glsl: Modify array_sizing_visitor to handle unnamed interface blocks.

2013-09-27 Thread Paul Berry
We were already setting the array size of unsized arrays that appeared inside unnamed interface blocks, but we weren't updating ir_variable::interface_type to reflect the new array size, causing bogus link errors. This patch causes array_sizing_visitor to keep track of all the unnamed interface ty

[Mesa-dev] [PATCH 09/10] glsl: Update call_link_visitor to update max_ifc_array_access.

2013-09-27 Thread Paul Berry
When multiple shaders of the same type access an interface block containing an unsized array, we need to set the array size based on the maximum array element accessed across all the shaders. This is similar to what we already do with unsized arrays occurring outside of interface blocks. Note: on

[Mesa-dev] [PATCH 08/10] glsl/linker: Modify array_sizing_visitor to handle named interface blocks.

2013-09-27 Thread Paul Berry
Unsized arrays appearing inside named interface blocks now get a proper size assigned by the array_sizing_visitor. Fixes piglit tests: - spec/glsl-1.50/execution/unsized-in-named-interface-block - spec/glsl-1.50/execution/unsized-in-named-interface-block-gs - spec/glsl-1.50/linker/unsized-in-named

[Mesa-dev] [PATCH 06/10] glsl: Sanity check max_ifc_array_access in ir_validate::visit(ir_variable *).

2013-09-27 Thread Paul Berry
--- src/glsl/ir_validate.cpp | 20 1 file changed, 20 insertions(+) diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 2c64f4e..93bc4d9 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -674,6 +674,26 @@ ir_validate::visit(ir_variable

[Mesa-dev] [PATCH 07/10] glsl: Update ir_variable::max_ifc_array_access properly.

2013-09-27 Thread Paul Berry
This patch adds an implementation of ir_dereference_record::update_max_array_access(), which ensures that ir_variable::max_ifc_array_access is properly updated to reflect the shader's use of arrays appearing within interface blocks. --- src/glsl/ir.cpp | 36 sr

[Mesa-dev] [PATCH 05/10] glsl: Add an ir_variable::max_ifc_array_access field.

2013-09-27 Thread Paul Berry
For interface blocks that contain arrays, this field will contain the maximum element of each contained array that is accessed by the shader. This is a first step toward supporting unsized arrays in interface blocks. --- src/glsl/ir.cpp | 3 ++- src/glsl/ir.h | 17 +

[Mesa-dev] [PATCH 03/10] glsl: Move update of max_array_access into a virtual function on ir_rvalue.

2013-09-27 Thread Paul Berry
Currently, when converting an access to an array element from ast to IR, we need to see if the array is an ir_dereference_variable, and if so update the variable's max_array_access. When we add support for unsized arrays in interface blocks, we'll also need to account for cases where the array is

[Mesa-dev] [PATCH 02/10] glsl: Link uniform-initializer-test with standalone_scaffolding.cpp.

2013-09-27 Thread Paul Berry
Future patches in this series will add calls to _mesa_glsl_error() to ir.cpp. _mesa_glsl_error() calls _mesa_glsl_msg(), which calls _mesa_shader_debug(), which is defined in mesa/main/errors.c (and hence not available when compiling GLSL unit tests). To avoid link errors, link uniform-initialize

[Mesa-dev] [PATCH 01/10] glsl: Add parser support for unsized arrays in interface blocks.

2013-09-27 Thread Paul Berry
Although it's not explicitly stated in the GLSL 1.50 spec, unsized arrays are allowed in interface blocks. section 1.2.3 (Changes from revision 5 of version 1.5) of the GLSL 1.50 spec says: * Completed full update to grammar section. Tested spec examples against it: ... *

[Mesa-dev] [PATCH 00/10] glsl: Support unsized arrays in interface blocks.

2013-09-27 Thread Paul Berry
Although it's not explicitly stated in the GLSL 1.50 spec, it is clearly implied that unsized arrays are allowed in interface blocks (the built-in interface gl_PerVertex contains an unsized array, gl_ClipDistance, and examples added in GLSL 4.30 make use of unsized arrays in interface blocks). >Fr

[Mesa-dev] [PATCH 04/10] glsl: Make accessor functions for ir_variable::interface_type.

2013-09-27 Thread Paul Berry
In a future patch, this will allow us to enforce invariants when the interface type is updated. --- src/glsl/ast_to_hir.cpp| 4 ++-- src/glsl/ir.h | 15 +++ src/glsl/link_interface_blocks.cpp | 17 +

Re: [Mesa-dev] [PATCH 5/7] intel: Remove silly check for !bufmgr.

2013-09-27 Thread Ian Romanick
On 09/26/2013 09:19 PM, Kenneth Graunke wrote: > On 09/26/2013 08:36 PM, Eric Anholt wrote: >> If bufmgr didn't get created, then screen creation failed, and we never >> should have got here in the first place. This was added by Chris Wilson >> in 2010 with no explanation for why it would be neede

[Mesa-dev] [PATCH 2/5] glsl_compiler: Set max GLSL version on the command line

2013-09-27 Thread Ian Romanick
From: Ian Romanick Infer whether or not to use ES based on the GLSL version (100 or 300 are for ES). This replaces the --glsl-es command line option. Set various compiler limits based on the minimums required for the specified GLSL version. Signed-off-by: Ian Romanick --- src/glsl/main.cpp |

  1   2   >