[Mesa-dev] [PATCH v2] glsl: Avoid buffer overflow when assigning attribute locations

2015-06-10 Thread Iago Toral Quiroga
Shaders with excessive number of attributes (16) can produce a crash due to buffer overflow in assign_attribute_or_color_locations. The overflow can happen because we declare a fixed size array that can hold up to 16 attributes and we don't check that we don't go beyond that limit. This patch

[Mesa-dev] [PATCH] i965: Re-index SSA definitions before printing NIR code.

2015-06-10 Thread Kenneth Graunke
This makes the SSA definitions use sequential numbers (0, 1, 2, ...) instead of seemingly random ones. There's not much point normally, but it makes debug output much easier to read. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_nir.c | 6 ++ 1 file

[Mesa-dev] [PATCH] nir: Allow vec2/vec3/vec4 instructions in the select peephole pass.

2015-06-10 Thread Kenneth Graunke
These are basically just moves, so they should be safe as well. When disabling i965's GLSL IR level scalarizer (channel expressions) pass, I started seeing NIR code like this: if ssa_21 { block block_1: /* preds: block_0 */ vec4 ssa_120 =

Re: [Mesa-dev] [PATCH v2] mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float

2015-06-10 Thread Kenneth Graunke
On Monday, June 08, 2015 02:53:26 PM Tapani Pälli wrote: v2: - ||, we enable on gles3 or if ARB_texture_rg is enabled Signed-off-by: Tapani Pälli tapani.pa...@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 4 1 file changed, 4

Re: [Mesa-dev] [PATCH 1/2] clover: Implement image attribute getters

2015-06-10 Thread Zoltán Gilián
Whether you need to pass the image dimensions and data type to the kernel as explicit parameters or not (e.g. because your hardware already supports some sort of image metadata query opcode) is driver-specific, so it would probably be a better idea to append these parameters at the end of the

Re: [Mesa-dev] [PATCH] nouveau: set imported buffers to what the kernel gives us

2015-06-10 Thread Ilia Mirkin
Not sure if we should care, but this could cause issues on G80 where you can only set memtype on vram mappings. Pretty sure that's already semi-broken though. But something to consider. On Jun 10, 2015 5:29 AM, Dave Airlie airl...@gmail.com wrote: When we import a dma-buf fd from another driver

Re: [Mesa-dev] [PATCH v2 09/82] mesa: Add shader storage buffer support to struct gl_context

2015-06-10 Thread Samuel Iglesias Gonsálvez
On 09/06/15 19:34, Jordan Justen wrote: On 2015-06-09 00:30:45, Samuel Iglesias Gonsálvez wrote: On 09/06/15 08:18, Samuel Iglesias Gonsálvez wrote: On 08/06/15 23:36, Jordan Justen wrote: On 2015-06-03 00:00:59, Iago Toral Quiroga wrote: This includes the array of bindings, the current

[Mesa-dev] [PATCH 2/2] i965/vec4: Fix the source register for indexed samplers

2015-06-10 Thread Neil Roberts
Previously when setting up the sample instruction for an indirect sampler the vec4 backend was directly passing the pseudo opcode's src0. However vec4_visitor::visit(ir_texture *) doesn't set the texture operation's src0 -- it's left as BAD_FILE, which when translated into a brw_reg gives the null

[Mesa-dev] [PATCH 0/2] Fix sampler array indexing in vec4vs

2015-06-10 Thread Neil Roberts
Matt Turner matts...@gmail.com writes: I'll have another look at moving it into brw_send_indirect_message. Thanks. I'm not really sure what the right solution is, so if you decide this patch is good as is, that's fine with me. Here's what the patches would look like if we made

Re: [Mesa-dev] [PATCH] llvmpipe: simplify lp_resource_copy()

2015-06-10 Thread Roland Scheidegger
I don't think this can potentially fix anything, since buffers were falling back to using util_resource_copy_region() already. I am actually wondering though if the separate flushing done in lp_resource_copy() is still necessary given that it should be done when getting the transfers in

Re: [Mesa-dev] [PATCH] llvmpipe: simplify lp_resource_copy()

2015-06-10 Thread Jose Fonseca
Indeed I don't see any reason not to use util_resource_copy_region. In fact, it might actually fix some bugs, as llvmpipe_transfer_map() which has some extra smarts for tracking diry constant buffers, which was not being exercised by lp_resource_copy(). Reviewed-by: Jose Fonseca

[Mesa-dev] [PATCH] llvmpipe: simplify lp_resource_copy()

2015-06-10 Thread Brian Paul
Just implement it in terms of util_resource_copy_region(). Both the original code and util_resource_copy_region() boil down to mapping, calling util_copy_box() and unmapping. No piglit regressions. This will also help to implement GL_ARB_copy_image. ---

[Mesa-dev] [PATCH 1/2] i965: Explicitly set base_mrf to -1 for pull constant loads on Gen7

2015-06-10 Thread Neil Roberts
A freshly constructed instruction defaults to having a base_mrf of 0 which means that if nothing disables it it will default to using send-from-MRF. Previously this didn't matter because the constant load instructions on Gen7 were ignoring the base_mrf anyway. However in the next patch the

[Mesa-dev] [PATCH] i965/fs: Remove one more fixed brw_null_reg() from the visitor.

2015-06-10 Thread Francisco Jerez
Instead use fs_builder::null_reg_f() which has the correct register width. Avoids the assertion failure in fs_builder::emit() hit by the ES3-CTS.shaders.loops.for_dynamic_iterations.unconditional_break_fragment GLES3 conformance test introduced by 4af4cfba9ee1014baa4a777660fc9d53d57e4c82.

Re: [Mesa-dev] [PATCH v2 11/82] glsl: enable binding layout qualifier usage for shader storage buffer objects

2015-06-10 Thread Samuel Iglesias Gonsálvez
On 09/06/15 20:19, Jordan Justen wrote: On 2015-06-03 00:01:01, Iago Toral Quiroga wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com See GLSL 4.30 spec, section 4.4.5 Uniform and Shader Storage Block Layout Qualifiers. Signed-off-by: Samuel Iglesias Gonsalvez

Re: [Mesa-dev] [PATCH v2 12/82] glsl: shader buffer variables cannot have initializers

2015-06-10 Thread Samuel Iglesias Gonsálvez
On 09/06/15 20:29, Jordan Justen wrote: On 2015-06-03 00:01:02, Iago Toral Quiroga wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com Section 4.3.7 Buffer Variables of the GLSL 4.30 spec: Buffer variables cannot have initializers. Signed-off-by: Samuel Iglesias Gonsalvez

Re: [Mesa-dev] [PATCH] i965: do not round line width when multisampling or antialiasing are enabled

2015-06-10 Thread Iago Toral
On Tue, 2015-06-09 at 10:38 -0700, Kenneth Graunke wrote: On Tuesday, June 09, 2015 11:29:48 AM Iago Toral wrote: On Tue, 2015-06-09 at 01:49 -0700, Kenneth Graunke wrote: On Tuesday, June 09, 2015 08:49:54 AM Iago Toral Quiroga wrote: In commit fe74fee8fa721a we rounded the line width

Re: [Mesa-dev] [PATCH] i965: Momentarily pretend to support ARB_texture_stencil8 for blits.

2015-06-10 Thread Kenneth Graunke
On Wednesday, June 10, 2015 08:48:21 AM Martin Peres wrote: On 10/06/2015 01:18, Kenneth Graunke wrote: Broadwell's stencil blitting code attempts to bind a renderbuffer as a texture, using dd-BindRenderbufferTexImage(). This calls _mesa_init_teximage_fields(), which then attempts to set

[Mesa-dev] [PATCH v2] i965: do not round line width when multisampling or antialiaing are enabled

2015-06-10 Thread Iago Toral Quiroga
In commit fe74fee8fa721a we rounded the line width to the nearest integer to match the GLES3 spec requirements stated in section 13.4.2.1, but that seems to break a dEQP test that renders wide lines in some multisampling scenarios. Ian noted that the Open 4.4 spec has the following similar text:

[Mesa-dev] [PATCH 2/9] egl: sort extension lists alphabetically

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com and add the missing KHR_gl_colorspace case. --- src/egl/main/eglapi.c | 53 +++ src/egl/main/egldisplay.h | 48 -- src/egl/main/eglglobals.c | 4 ++-- 3 files changed,

[Mesa-dev] [PATCH 4/9] dri/common: allow BGRX sRGB visuals

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/mesa/drivers/dri/common/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 70d34e8..b51b263 100644 --- a/src/mesa/drivers/dri/common/utils.c +++

[Mesa-dev] [PATCH 9/9] st/dri: enable 3D textures and sRGB colorspace for EGL

2015-06-10 Thread Marek Olšák
From: Anatoli Antonovitch anatoli.antonovi...@amd.com --- src/gallium/state_trackers/dri/dri_query_renderer.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri_query_renderer.c b/src/gallium/state_trackers/dri/dri_query_renderer.c index

[Mesa-dev] [PATCH 7/9] egl: implement EGL_KHR_gl_colorspace

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/egl/drivers/dri2/egl_dri2.c | 40 ++--- src/egl/drivers/dri2/egl_dri2.h | 6 + src/egl/drivers/dri2/platform_android.c | 4 src/egl/drivers/dri2/platform_drm.c | 9 +---

[Mesa-dev] [PATCH 3/9] mesa: fix sRGB rendering for GLES1

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- src/mesa/main/blend.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index d869fa2..d365305 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -930,12 +930,10 @@

[Mesa-dev] [PATCH 6/9] st/dri: expose sRGB visuals

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com They are only useful for EGL currently, because the previous patch disables them for GLX. --- src/gallium/state_trackers/dri/dri2.c | 2 ++ src/gallium/state_trackers/dri/dri_screen.c | 23 +++ src/mesa/state_tracker/st_manager.c

[Mesa-dev] [PATCH 8/9] egl, dri: use DRI2rendererQueryExtension to enable 3D textures sRGB

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com --- include/GL/internal/dri_interface.h | 5 + src/egl/drivers/dri2/egl_dri2.c | 23 +++ src/egl/drivers/dri2/egl_dri2.h | 1 + 3 files changed, 29 insertions(+) diff --git a/include/GL/internal/dri_interface.h

[Mesa-dev] [PATCH 5/9] glx: don't expose sRGB visuals

2015-06-10 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com The problem is it makes Ubuntu Unity dark. It's probably using OpenGL ES 2.0, chooses an sRGB-capable config and there is no way to turn off sRGB rendering then. --- src/glx/dri_common.c | 9 + 1 file changed, 9 insertions(+) diff --git

[Mesa-dev] [PATCH] i965/fs: Fix unused variable warning

2015-06-10 Thread Chad Versace
Annotate offset_components with attribute 'unused'. --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 0f1a286..3c24a87 100644 ---

Re: [Mesa-dev] [PATCH 7/9] egl: implement EGL_KHR_gl_colorspace

2015-06-10 Thread Marek Olšák
On Wed, Jun 10, 2015 at 6:47 PM, Matt Turner matts...@gmail.com wrote: On Wed, Jun 10, 2015 at 9:27 AM, Marek Olšák mar...@gmail.com wrote: From: Marek Olšák marek.ol...@amd.com --- src/egl/drivers/dri2/egl_dri2.c | 40 ++---

Re: [Mesa-dev] [PATCH] i965/fs: Fix unused variable warning

2015-06-10 Thread Matt Turner
On Wed, Jun 10, 2015 at 9:52 AM, Chad Versace chad.vers...@intel.com wrote: Annotate offset_components with attribute 'unused'. --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp

Re: [Mesa-dev] [PATCH 1/2] clover: Implement image attribute getters

2015-06-10 Thread Francisco Jerez
Zoltán Gilián zoltan.gil...@gmail.com writes: Whether you need to pass the image dimensions and data type to the kernel as explicit parameters or not (e.g. because your hardware already supports some sort of image metadata query opcode) is driver-specific, so it would probably be a better

[Mesa-dev] [PATCH 4/4] drisw/glx: use XShm if possible

2015-06-10 Thread Marc-André Lureau
Implements putImageShm from DRIswrastLoaderExtension. If XShm extension is not available, or fails, it will fallback on regular XPutImage(). Tested on Linux only with 16bpp and 32bpp visual. --- src/glx/drisw_glx.c | 164 +++ src/glx/drisw_priv.h

[Mesa-dev] [PATCH 1/4] dri: add putImageShm to swrastLoader

2015-06-10 Thread Marc-André Lureau
Add a new API to put an image using shared memory. Instead of only passing the data pointer, 3 arguments are given: the shmid, the data offset and the shmaddr. Bump interface version. --- include/GL/internal/dri_interface.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 3/4] drisw: use shared memory when possible

2015-06-10 Thread Marc-André Lureau
If drisw_loader_funcs implements put_image_shm, allocates display target data with shared memory and display with put_image_shm(). --- src/gallium/winsys/sw/dri/dri_sw_winsys.c | 72 +-- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCH 0/4] drisw/glx: use XShm if possible

2015-06-10 Thread Marc-André Lureau
Hi, XPutImage requires to copy the images around, and the request may be split over several chunks. Using XShm should improve performance. In particular, the performances are bad when using gnome-shell with Spice and playing video. Chunking the update confuses the video detection heuristic:

[Mesa-dev] [PATCH 2/4] drisw: use putImageShm if available

2015-06-10 Thread Marc-André Lureau
If the DRIswrastLoaderExtension implements putImageShm, bind it to drisw_loader_funcs. --- src/gallium/include/state_tracker/drisw_api.h | 3 +++ src/gallium/state_trackers/dri/drisw.c| 37 +-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 7/9] egl: implement EGL_KHR_gl_colorspace

2015-06-10 Thread Matt Turner
On Wed, Jun 10, 2015 at 9:27 AM, Marek Olšák mar...@gmail.com wrote: From: Marek Olšák marek.ol...@amd.com --- src/egl/drivers/dri2/egl_dri2.c | 40 ++--- src/egl/drivers/dri2/egl_dri2.h | 6 + src/egl/drivers/dri2/platform_android.c | 4

Re: [Mesa-dev] [PATCH] i965: Momentarily pretend to support ARB_texture_stencil8 for blits.

2015-06-10 Thread Neil Roberts
Kenneth Graunke kenn...@whitecape.org writes: _mesa_meta_fb_tex_blit_begin(ctx, blit); + ctx-Extensions.ARB_texture_stencil8 = true; Maybe you could put assert(ctx-Extensions.ARB_texture_stencil8==false) just before setting it to true so that we'll definitely remember to remove it if we

Re: [Mesa-dev] [PATCH] i965/fs_live_variables: Do liveness analysis bottom-to-top

2015-06-10 Thread Matt Turner
On Mon, Jun 8, 2015 at 4:44 PM, Jason Ekstrand ja...@jlekstrand.net wrote: Generally, liveness information propagates up the program, not down. I'd replace this with an actual quote from the cited text: To determine which variables are live at each point in a flowgraph, we perform a backward

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Marek Olšák
There is also the option of adding the sampler type to either the SAMP declaration or texture instructions. This will move us further away from adopting SVIEW, but I don't see that happening for OpenGL anyway. Marek On Wed, Jun 10, 2015 at 8:59 PM, Rob Clark robdcl...@gmail.com wrote: So,

Re: [Mesa-dev] [PATCH] mesa: set override_version per api version override

2015-06-10 Thread Jordan Justen
Whoops. I re-wrote this last night: http://cgit.freedesktop.org/~jljusten/mesa/commit/?h=cs-33id=3ebe7b79 On 2015-06-04 21:41:15, Tapani Pälli wrote: Before 9b5e92f get_gl_override was called only once, but now it is called for multiple APIs (GLES2, GL), version needs to be set always.

Re: [Mesa-dev] [PATCH 4/4] drisw/glx: use XShm if possible

2015-06-10 Thread Adam Jackson
On Wed, 2015-06-10 at 18:08 +0200, Marc-André Lureau wrote: + if (!xshm_error shmid = 0) { + pdp-shminfo.shmid = shmid; + pdp-ximage = XShmCreateImage(dpy, +pdp-visinfo-visual, +pdp-visinfo-depth, +

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
Hmm, at least tgsi_text_translate() doesn't appear to use tgsi_ureg.. and there are still a number of users of tgsi_text_translate().. I guess handling this in tgsi_ureg would avoid fixing all the tgsi_ureg users, but that still leaves a lot of others. Changing them all still seems to be too

Re: [Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Matt Turner
On Wed, Jun 10, 2015 at 11:25 AM, Shervin Sharifi sherv...@gmail.com wrote: Hi, This may not be the right forum to ask this, but I didn't know of a better forum, so I thought I can ask here. I'm new to OpenGL. I am looking at XML registry for OpenGL and there are some parameters with

Re: [Mesa-dev] [PATCH] i965: Momentarily pretend to support ARB_texture_stencil8 for blits.

2015-06-10 Thread Jason Ekstrand
On Jun 10, 2015 9:57 AM, Neil Roberts n...@linux.intel.com wrote: Kenneth Graunke kenn...@whitecape.org writes: _mesa_meta_fb_tex_blit_begin(ctx, blit); + ctx-Extensions.ARB_texture_stencil8 = true; Maybe you could put assert(ctx-Extensions.ARB_texture_stencil8==false) just before

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Ilia Mirkin
I'll admit to not having followed the conversation *too* closely, but just want to point out that nouveau has its own blitter implementation (which has the advantage of actually working for stencil given some reasonable assumptions about formats), please don't break it. [The downside of it is that

Re: [Mesa-dev] [PATCH] i965/fs: Remove one more fixed brw_null_reg() from the visitor.

2015-06-10 Thread Jason Ekstrand
LGTM Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Jun 10, 2015 7:39 AM, Francisco Jerez curroje...@riseup.net wrote: Instead use fs_builder::null_reg_f() which has the correct register width. Avoids the assertion failure in fs_builder::emit() hit by the

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
that is starting to look more attractive, mostly just because tgsi_transform stuff is so cumbersome.. (I did start thinking about just adding type to decl's in general, since really it would be better to have for type information for IN's and OUT's too.. but then decided I'd probably rather spend

[Mesa-dev] [PATCH] gallium: remove explicit values from PIPE_CAP_ enums

2015-06-10 Thread Brian Paul
The other PIPE_CAPF_ and PIPE_SHADER_CAP_ enums don't have explicit values. --- src/gallium/include/pipe/p_defines.h | 196 +-- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/src/gallium/include/pipe/p_defines.h

Re: [Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless (v3)

2015-06-10 Thread Chad Versace
On Mon 08 Jun 2015, Zach Reizner wrote: From: Haixia Shi h...@chromium.org The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3: change platform_null to

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Roland Scheidegger
Yes, I think nowadays everybody uses tgsi_transform_shader() to do that, so that should probably work. Roland Am 10.06.2015 um 20:59 schrieb Rob Clark: So, afaiu, everything that might insert a sampler is using tgsi_transform_shader()? There aren't too many of those, and I think I can fix

Re: [Mesa-dev] [PATCH 4/4] drisw/glx: use XShm if possible

2015-06-10 Thread Marc-André Lureau
Hi On Wed, Jun 10, 2015 at 6:17 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: I did not find how you serialised the XServer reading from the SHM following the call to XShmPutImage (which you may want to flush?) with subsequent rendering into the image. Correct, there is no sync. And I

[Mesa-dev] [Bug 90927] GLSL extensions are not routed from X-Server to client app

2015-06-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90927 Bug ID: 90927 Summary: GLSL extensions are not routed from X-Server to client app Product: Mesa Version: 10.5 Hardware: All OS: All Status: NEW

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
So, afaiu, everything that might insert a sampler is using tgsi_transform_shader()? There aren't too many of those, and I think I can fix them up to not violate that constraint. (It does occur to me that I may end up needing to fix u_blitter to differentiate between blitting float vs int to

Re: [Mesa-dev] [PATCH v2] i965: do not round line width when multisampling or antialiaing are enabled

2015-06-10 Thread Ian Romanick
If Ken is happy with it now, then I'm happy. Reviewed-by: Ian Romanick ian.d.roman...@intel.com I think this should also be marked for 10.6. Cc: 10.6 mesa-sta...@lists.freedesktop.org On 06/10/2015 12:07 AM, Iago Toral Quiroga wrote: In commit fe74fee8fa721a we rounded the line width to the

[Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Shervin Sharifi
Hi, This may not be the right forum to ask this, but I didn't know of a better forum, so I thought I can ask here. I'm new to OpenGL. I am looking at XML registry for OpenGL and there are some parameters with attributes containing a function COMPSIZE (I've pasted an example below). I tried to

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Roland Scheidegger
My biggest problem with that is the initial case I saw as a problem: draw is going to modify these shaders in some cases (aaline stage for example), adding its own sampler, and it doesn't know anything about distinguishing shaders with sampler views or without. The same goes for any other

Re: [Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Ian Romanick
On 06/10/2015 03:05 PM, Shervin Sharifi wrote: Thanks Ian. If I want to implement the actual CompSize function, how should I figure out the details? The way I did it for the GLX protocol code in Mesa is to make a glFoo_compsize function for each GL function that has a variable sized array as

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Jose Fonseca
I think it make sense for us to start using SVIEW regardless, and uniformize things. Even if GLSL will never support independent texture/samplers, D3D10, OpenCL, Metal, and potential SPIR-V all do. Roland, could you prepare a patch for llvmpipe, so that it infers from SAMPLE_* opcode count

Re: [Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Shervin Sharifi
Thank you. I think there should be a way to calculate the size of the memory location pointed by that pointer. For cases where there is no shared memory between the client and the server, the memory contents should be copied back and forth, which means the size of the pointer should be known

[Mesa-dev] [PATCH 5/5] i965/gen9: Allocate YF/YS tiled buffer objects

2015-06-10 Thread Anuj Phogat
In case of I915_TILING_{X,Y} we need to pass tiling format to libdrm using drm_intel_bo_alloc_tiled(). But, In case of YF/YS tiled buffers libdrm need not know about the tiling format because these buffers don't have hardware support to be tiled or detiled through a fenced region. libdrm still

[Mesa-dev] [PATCH 2/5] i965/gen9: Plugin the code for selecting YF/YS tiling on skl+

2015-06-10 Thread Anuj Phogat
Buffers with Yf/Ys tiling end up using meta upload / download paths or the blitter for cases where they used tiled_memcpy paths in case of Y tiling. This has exposed some bugs in meta path. To avoid any piglit regressions on SKL this patch keeps the Yf/Ys tiling disabled at the moment. V3: Make

[Mesa-dev] [PATCH 1/5] i965: Make a helper function intel_miptree_set_alignment()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Cc: Ben Widawsky b...@bwidawsk.net --- Jenkins showed no piglit regressions with this series. src/mesa/drivers/dri/i965/brw_tex_layout.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git

[Mesa-dev] [PATCH 3/5] i965: Make a helper function intel_miptree_release_levels()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Cc: Ben Widawsky b...@bwidawsk.net --- src/mesa/drivers/dri/i965/brw_tex_layout.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c

[Mesa-dev] [PATCH 4/5] i965: Make a helper function intel_miptree_can_use_tr_mode()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Cc: Ben Widawsky b...@bwidawsk.net --- src/mesa/drivers/dri/i965/brw_tex_layout.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Rob Clark
On Wed, Jun 10, 2015 at 5:13 PM, Jose Fonseca jfons...@vmware.com wrote: I think it make sense for us to start using SVIEW regardless, and uniformize things. Even if GLSL will never support independent texture/samplers, D3D10, OpenCL, Metal, and potential SPIR-V all do. Roland, could you

Re: [Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Ian Romanick
On 06/10/2015 11:25 AM, Shervin Sharifi wrote: Hi, This may not be the right forum to ask this, but I didn't know of a better forum, so I thought I can ask here. I'm new to OpenGL. I am looking at XML registry for OpenGL and there are some parameters with attributes containing a

Re: [Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Shervin Sharifi
Thanks Ian. If I want to implement the actual CompSize function, how should I figure out the details? Thanks, Shervin On Wed, Jun 10, 2015 at 2:56 PM, Ian Romanick i...@freedesktop.org wrote: On 06/10/2015 11:25 AM, Shervin Sharifi wrote: Hi, This may not be the right forum to ask

[Mesa-dev] [Bug 90927] GLSL extensions are not routed from X-Server to client app

2015-06-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90927 Ian Romanick i...@freedesktop.org changed: What|Removed |Added Severity|critical|enhancement ---

Re: [Mesa-dev] [PATCH 1/2] tgsi: texture types

2015-06-10 Thread Roland Scheidegger
Am 10.06.2015 um 23:31 schrieb Rob Clark: On Wed, Jun 10, 2015 at 5:13 PM, Jose Fonseca jfons...@vmware.com wrote: I think it make sense for us to start using SVIEW regardless, and uniformize things. Even if GLSL will never support independent texture/samplers, D3D10, OpenCL, Metal, and

[Mesa-dev] [PATCH 6/7] mesa: build xmlconfig to a separate static library

2015-06-10 Thread Emil Velikov
From: Erik Faye-Lund kusmab...@gmail.com As we use the file from both the dri modules and loader, we end up with multiple definition of the symbols provided in our gallium dri modules. Additionally we compile the file twice. Resolve both issues, effectively enabling the build on toolchains

[Mesa-dev] [PATCH 1/7] freedreno: use CXX linker rather than explicit link against libstdc++

2015-06-10 Thread Emil Velikov
Cc: Rob Clark robcl...@freedesktop.org Cc: 10.6 mesa-sta...@lists.freedesktop.org Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/drivers/freedreno/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/Makefile.am

[Mesa-dev] [PATCH 4/7] pipe-loader: add libnir and libglsl_util to the link

2015-06-10 Thread Emil Velikov
Based on commit 101142c4010(xa: support for drivers which use NIR) Cc: Rob Clark robcl...@freedesktop.org Cc: 10.6 mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90466 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com ---

[Mesa-dev] [PATCH 3/7] mesa; add a dummy _mesa_error_no_memory() symbol to libglsl_util

2015-06-10 Thread Emil Velikov
Rather than forcing everyone to provide their own definition of the symbol provide a common (dummy) one. This helps us resolve the build of the standalone pipe-drivers (amongst others), which are missing the symbol. Cc: Rob Clark robcl...@freedesktop.org Cc: 10.6

[Mesa-dev] [PATCH 7/7] vc4: automake: enable subdir-objects

2015-06-10 Thread Emil Velikov
Silence the warnings about the future incompatibility with automake 2.0 Cc: Eric Anholt e...@anholt.net Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/drivers/vc4/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/vc4/Makefile.am

[Mesa-dev] [PATCH 5/7] targets/nine: link against libnir/libglsl_util

2015-06-10 Thread Emil Velikov
Based on commit 101142c4010(xa: support for drivers which use NIR) Cc: 10.6 mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90466 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/targets/d3dadapter9/Makefile.am | 2 ++ 1 file changed,

[Mesa-dev] [PATCH 2/7] gallium: use $(top_builddir) when referencing static archives

2015-06-10 Thread Emil Velikov
Just like every other place in gallium. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/drivers/freedreno/Makefile.am | 2 +- src/gallium/drivers/nouveau/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] COMPSIZE function in OpenGL XML registry

2015-06-10 Thread Jose Fonseca
I'm not sure what you are trying to accomplish. if you're doing some sort of serialization of OpenGL calls other than GLX, then it might be worthwhile to look at https://github.com/apitrace/apitrace/blob/master/specs/glapi.py

[Mesa-dev] [PATCH 4/5] i965/gen9: Add XY_FAST_COPY_BLT support to intelEmitCopyBlit()

2015-06-10 Thread Anuj Phogat
This patch enables using XY_FAST_COPY_BLT only for Yf/Ys tiled buffers. It can be later turned on for other tiling patterns (X,Y) too. V3: Flush in between sequential fast copy blits. Fix src/dst alignment requirements. Make can_fast_copy_blit() helper. Use ffs(), is_power_of_two()

[Mesa-dev] [PATCH 5/5] i965/skl: Extract the blit command setup in to a helper

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/dri/i965/intel_blit.c | 93 ++ 1 file changed, 61 insertions(+), 32 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index

[Mesa-dev] [PATCH 2/5] mesa/st: Use global function _mesa_regions_overlap()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Cc: Ben Widawsky b...@bwidawsk.net --- src/mesa/state_tracker/st_cb_drawpixels.c | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c

[Mesa-dev] [PATCH 1/5] mesa: Add a new helper function _mesa_regions_overlap()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Cc: Ben Widawsky b...@bwidawsk.net --- Jenkins showed no piglit regressions with this series. src/mesa/main/blit.c | 26 ++ src/mesa/main/blit.h | 6 ++ 2 files changed, 32 insertions(+) diff --git

[Mesa-dev] [PATCH 3/5] mesa/swrast: Use global function _mesa_regions_overlap()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/swrast/s_copypix.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 68c83e4..8fde0c2 100644 --- a/src/mesa/swrast/s_copypix.c +++

[Mesa-dev] [Bug 90905] mesa: Finish subdir-objects transition

2015-06-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90905 --- Comment #3 from Emil Velikov emil.l.veli...@gmail.com --- Yes the situation is a bit messy, and considering the interesting use of xmlconfig by the loader (and effectively libGL) I intentionally stayed away from it. Anywho, I've picked

[Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless (v3)

2015-06-10 Thread Zach Reizner
From: Haixia Shi h...@chromium.org The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3: egl/dri2: change platform_null to platform_surfaceless Signed-off-by: Haixia

Re: [Mesa-dev] [PATCH 6/7] mesa: build xmlconfig to a separate static library

2015-06-10 Thread Matt Turner
On Wed, Jun 10, 2015 at 3:54 PM, Emil Velikov emil.l.veli...@gmail.com wrote: From: Erik Faye-Lund kusmab...@gmail.com As we use the file from both the dri modules and loader, we end up with multiple definition of the symbols provided in our gallium dri modules. Additionally we compile the

[Mesa-dev] [PATCH] mesa: Enable subdir-objects globally.

2015-06-10 Thread Matt Turner
--- Emil, With your series, I think we can enable subdir-objects globally! Please give it a test. configure.ac | 2 +- src/Makefile.am | 2 -- src/gallium/auxiliary/Makefile.am | 2 --

[Mesa-dev] [PATCH] i965: Check for miptree pitch alignment before using intel_miptree_map_movntdqa()

2015-06-10 Thread Anuj Phogat
I don't know where this alignment restriction came from. We have an assert() in intel_miptree_map_movntdqa() which expects the pitch to be 16 byte aligned. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++- 1 file changed, 3

[Mesa-dev] [PATCH] meta: Use is_power_of_two() helper function

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/common/meta_blit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index bb21642..9cace2b 100644 ---

Re: [Mesa-dev] Request for Mentorship

2015-06-10 Thread Emil Velikov
On 5 June 2015 at 22:08, Rob Clark robdcl...@gmail.com wrote: so, maybe a bit off topic (and maybe doesn't really help with the whole finding a mentor thing).. but a sort of wish-list thing for piglit that I've had in the back of my head is something like tig for piglit. I suppose it doesn't

[Mesa-dev] [Bug 90264] [Regression, bisected] Tooltip corruption in Chrome

2015-06-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90264 Furkan fal...@gmail.com changed: What|Removed |Added CC||bri...@vmware.com

[Mesa-dev] [PATCH 2/3] mesa: Turn need_rgb_to_luminance_conversion() in to a global function

2015-06-10 Thread Anuj Phogat
This will be used by _mesa_meta_pbo_GetTexSubImage() in a later patch. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/main/readpix.c | 11 ++- src/mesa/main/readpix.h | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/readpix.c

[Mesa-dev] [PATCH 1/3] mesa: Use helper function need_rgb_to_luminance_conversion()

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/main/readpix.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 9166a50..cba9db8 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c

Re: [Mesa-dev] Request for Mentorship

2015-06-10 Thread Rob Clark
On Wed, Jun 10, 2015 at 7:28 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 5 June 2015 at 22:08, Rob Clark robdcl...@gmail.com wrote: so, maybe a bit off topic (and maybe doesn't really help with the whole finding a mentor thing).. but a sort of wish-list thing for piglit that I've had

Re: [Mesa-dev] [PATCH v2] i965: do not round line width when multisampling or antialiaing are enabled

2015-06-10 Thread Kenneth Graunke
On Wednesday, June 10, 2015 09:07:32 AM Iago Toral Quiroga wrote: In commit fe74fee8fa721a we rounded the line width to the nearest integer to match the GLES3 spec requirements stated in section 13.4.2.1, but that seems to break a dEQP test that renders wide lines in some multisampling

[Mesa-dev] [PATCH] i965: Remove break after return

2015-06-10 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/dri/i965/intel_blit.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index 987b5f5..068565c 100644 ---

[Mesa-dev] [PATCH] i965: correct alignment units for 2D compressed textures on Skylake

2015-06-10 Thread Nanley Chery
From: Nanley Chery nanley.g.ch...@intel.com On Gen9+, vertical and horizontal alignment values for compressed textures are equal to the pre-Gen9 value squared. Each miplevel must be aligned to this value. Signed-off-by: Nanley Chery nanley.g.ch...@intel.com --- This fixes an FXT1 Piglit test

Re: [Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless (v3)

2015-06-10 Thread Emil Velikov
Hi gents, On 10 June 2015 at 23:20, Zach Reizner za...@google.com wrote: From: Haixia Shi h...@chromium.org The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3:

[Mesa-dev] [PATCH 1/7] tgsi: update docs for SVIEW usage with TEX* instructions

2015-06-10 Thread Rob Clark
From: Rob Clark robcl...@freedesktop.org Based on mailing list discussion here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html Signed-off-by: Rob Clark robcl...@freedesktop.org --- src/gallium/docs/source/tgsi.rst | 12 1 file changed, 12 insertions(+)

[Mesa-dev] [PATCH 7/7] gallium/ttn: add texture-type support

2015-06-10 Thread Rob Clark
From: Rob Clark robcl...@freedesktop.org v2: rebased on using SVIEW to hold type information Signed-off-by: Rob Clark robcl...@freedesktop.org --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 44 - 1 file changed, 43 insertions(+), 1 deletion(-) diff --git

  1   2   >