Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: Fix querying location of nth element of an array variable

2014-04-22 Thread Anuj Phogat
On Fri, Apr 18, 2014 at 3:41 PM, Ian Romanick wrote: > On 04/03/2014 04:13 PM, Anuj Phogat wrote: >> This patch changes the behavior of glGetAttribLocation(), >> glGetFragDataLocation() and glGetFragDataIndex() functions. >> >> Code changes handle the cases des

[Mesa-dev] [PATCH V2] mesa: Fix querying location of nth element of an array variable

2014-04-25 Thread Anuj Phogat
from OpenGL spec in commit message. Fixes failures in Khronos OpenGL CTS tests: explicit_attrib_location_room draw_instanced_max_vertex_attribs Proprietary linux drivers of NVIDIA (331.49) matches the behavior expected by OpenGL 4.3 spec. Cc: Signed-off-by: Anuj Phogat --- src/mesa/main/shad

[Mesa-dev] [PATCH V3] glsl: Allow overlapping locations for vertex input attributes

2014-04-25 Thread Anuj Phogat
here location exceeds the maximum allowed attribute location. V3: Simplify the condition added in V2. Fix comment indentation. Signed-off-by: Anuj Phogat Cc: "9.2 10.0 10.1" Bugzilla: Khronos #9609 --- src/glsl/linker.cpp | 87 --

[Mesa-dev] [PATCH V2] mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0

2014-04-25 Thread Anuj Phogat
depth24_precision rgb8_rgba8_rgb Cc: Signed-off-by: Anuj Phogat --- src/mesa/main/varray.c| 8 +--- src/mesa/main/varray.h| 14 ++ src/mesa/vbo/vbo_attrib_tmp.h | 45 ++- 3 files changed, 38 insertions(+), 29 deletions

Re: [Mesa-dev] [PATCH V4 1/4] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-04-28 Thread Anuj Phogat
Ian, I posted the reworked patches after incorporating your comments. Do you have any more comments on this series? It would be nice to land these before upcoming release. On Mon, Mar 17, 2014 at 11:37 AM, Anuj Phogat wrote: > GLSL 1.50 spec says: >"If gl_FragCoord is redecl

Re: [Mesa-dev] [PATCH 1/2] glsl: Fix redeclaration rules for gl_FragCoord.

2014-05-01 Thread Anuj Phogat
On Thu, Apr 17, 2014 at 1:05 AM, Chris Forbes wrote: > Correct, this doesn't try to tackle the link-time cases at all. > > After sending these out, Anuj told me that he had similar patches > pending review. Unfortunate to duplicate effort, but it's what I get > for doing a bunch of random bug-stom

Re: [Mesa-dev] A candidate branch for the next stable release

2014-05-01 Thread Anuj Phogat
On Thu, May 1, 2014 at 10:44 AM, Carl Worth wrote: > I've recently pushed an update to the 10.1 branch. I anticipate making a > release from this branch tomorrow. The state of this branch is > summarized here: > > > http://cworth.org/~cworth/mesa-stable-queue/ > > As always, please let me

Re: [Mesa-dev] [PATCH] mesa: move declarations before code in texstore.c

2014-05-01 Thread Anuj Phogat
; - > /* In case we only upload depth we need to preserve the stencil */ > for (img = 0; img < srcDepth; img++) { >uint64_t *dstRow = (uint64_t *) dstSlices[img]; > -- > 1.7.10.4 > > ___

Re: [Mesa-dev] [Mesa-stable] A candidate branch for the next stable release

2014-05-01 Thread Anuj Phogat
On Thu, May 1, 2014 at 3:05 PM, Carl Worth wrote: > Carl Worth writes: >> * There are 23 patches that have been sent to the mesa-stable mailing >> list, but have not yet been merged to master. The oldest of these is >> from February 20 (10 weeks ago!). > > With the recent updates, I'm h

Re: [Mesa-dev] [PATCH] glsl: fix bogus layout qualifier warnings

2014-05-05 Thread Anuj Phogat
YYERROR; > - } else if (state->ARB_explicit_attrib_location_warn) { > - _mesa_glsl_warning(& @1, state, > - "GL_ARB_explicit_attrib_location layout " > -"identifier `%s' used", $1); >} >

Re: [Mesa-dev] [PATCH 1/5] i965: Always intel_prepare_render() after invalidating front buffers.

2014-05-05 Thread Anuj Phogat
the fake front) before we start reading again. > */ >dri2InvalidateDrawable(brw->driContext->driReadablePriv); > + intel_prepare_render(brw); > } > } > Patch 1 is: Acked-by: Anuj Phogat Paches 2-5 are: Reviewed-by: Anuj Phogat > -- > 1.9.2 &

Re: [Mesa-dev] [PATCH] glsl: Rename linker's is_varying_var

2014-05-09 Thread Anuj Phogat
var && var->data.mode == ir_var_shader_in && > - is_varying_var(consumer->Stage, var)) { > + var_counts_against_varying_limit(consumer->Stage, var)) { > input_vectors += var->type->count_attribute_slots(); >} > } > -- R

[Mesa-dev] [PATCH 1/2] meta: Refactor _mesa_meta_setup_blit_shader() to avoid duplicate shader code

2014-05-19 Thread Anuj Phogat
Cc: Signed-off-by: Anuj Phogat --- src/mesa/drivers/common/meta.c | 97 +++--- 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 3ef3f79..87609b4 100644 --- a/src/mesa/drivers

[Mesa-dev] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers

2014-05-19 Thread Anuj Phogat
ffer for each fragment color." OpenGL 4.4 spec, page 463, added an additional line in this section: "If some, but not all user-defined output variables are written, the values of fragment colors corresponding to unwritten variables are similarly undefined." Cc: Signed-off-by

Re: [Mesa-dev] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers

2014-05-19 Thread Anuj Phogat
On Mon, May 19, 2014 at 2:45 PM, Matt Turner wrote: > On Mon, May 19, 2014 at 1:20 PM, Anuj Phogat wrote: >> _mesa_meta_setup_blit_shader() currently generates a fragment shader >> which, irrespective of the number of draw buffers, writes the color >> to only one output var

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers

2014-05-19 Thread Anuj Phogat
On Mon, May 19, 2014 at 3:12 PM, Chris Forbes wrote: > On Tue, May 20, 2014 at 8:20 AM, Anuj Phogat wrote: >> @@ -247,7 +247,8 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx, >> struct blit_shader *shader = choose_blit_shader(target, table); >> const char

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers

2014-05-19 Thread Anuj Phogat
4 output types. Although, blitting to multiple multisample buffers is not a common use case, we'll have similar shader recompilation problem due to changing draw buffers count. For now, I'll go ahead and make changes to use 'gl_FragColor' for non-multisample blits. > > O

[Mesa-dev] [PATCH V2 2/2] meta: Use gl_FragColor to output color values to all the draw buffers

2014-05-20 Thread Anuj Phogat
rite color output to gl_FragColor instead of writing to multiple 'out' variables. This'll avoid recompiling the shader every time draw buffers count is updated. Cc: Signed-off-by: Anuj Phogat Reviewed-by: Matt Turner (V1) --- src/mesa/drivers/common/meta.c | 15 --

[Mesa-dev] [PATCH V2 1/2] meta: Refactor _mesa_meta_setup_blit_shader() to avoid duplicate shader code

2014-05-20 Thread Anuj Phogat
Cc: Signed-off-by: Anuj Phogat Reviewed-by: Matt Turner --- src/mesa/drivers/common/meta.c | 101 - 1 file changed, 48 insertions(+), 53 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 3ef3f79..fab9106

Re: [Mesa-dev] [PATCH V2 1/2] meta: Refactor _mesa_meta_setup_blit_shader() to avoid duplicate shader code

2014-05-20 Thread Anuj Phogat
On Tue, May 20, 2014 at 1:47 PM, Pohjolainen, Topi wrote: > On Tue, May 20, 2014 at 10:31:04AM -0700, Anuj Phogat wrote: >> Cc: >> Signed-off-by: Anuj Phogat >> Reviewed-by: Matt Turner >> --- >> src/mesa/drivers/common/meta.c | 101 >> +

Re: [Mesa-dev] [PATCH V2 2/2] meta: Use gl_FragColor to output color values to all the draw buffers

2014-05-20 Thread Anuj Phogat
On Tue, May 20, 2014 at 2:36 PM, Kenneth Graunke wrote: > On 05/20/2014 10:49 AM, Pohjolainen, Topi wrote: >> On Tue, May 20, 2014 at 10:31:05AM -0700, Anuj Phogat wrote: >>> _mesa_meta_setup_blit_shader() currently generates a fragment shader >>> which, irrespective of

Re: [Mesa-dev] [Mesa-stable] [PATCH] meta blit: Set Z texcoord during meta blit to sample the right layer

2014-05-21 Thread Anuj Phogat
ER_ARB, 0, sizeof(verts), verts); > } > -- > 1.9.1 > > ___ > mesa-stable mailing list > mesa-sta...@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-stable Looks good to me. Tested the fix on IVB by forcing the driver to use meta blit path. Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] meta/blit: Use gl_FragColor also in the msaa blit shader

2014-05-27 Thread Anuj Phogat
opi Pohjolainen > Cc: Eric Anholt > Cc: Matt Turner > Cc: Kenneth Graunke > Cc: Anuj Phogat > Cc: "10.2" > --- > src/mesa/drivers/common/meta_blit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/common/meta_bl

Re: [Mesa-dev] [PATCH 2/2] glsl: Eliminate unused built-in variables after compilation

2014-05-29 Thread Anuj Phogat
7;t eliminated because > + * there's an optimization pass that can turn references to > + * gl_ModelViewProjectionMatrix into references to > + * gl_ModelViewProjectionMatrixTranspose. Eliminating > + * gl_ModelViewProjectionMatrixTranspose would cause that pass to

[Mesa-dev] [PATCH 0/4] Add tests to verify support of EXT_framebuffer_multisample_blit_scaled

2013-05-01 Thread Anuj Phogat
I've run these tests only on my implementation of EXT_framebuffer_multisample_blit_scaled extension on i965 drivers. NVIDIA, AMD machines I've don't support this extension. Could somebody try running on NVIDIA drivers? Anuj Phogat (4): Add functionality to create a FBO w

[Mesa-dev] [PATCH 1/4] Add functionality to create a FBO with multisample texture attachment

2013-05-01 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- tests/spec/ext_framebuffer_multisample/common.cpp | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/spec/ext_framebuffer_multisample/common.cpp b/tests/spec/ext_framebuffer_multisample/common.cpp index c58ba3b..65f98f7

[Mesa-dev] [PATCH 2/4] Add test to verify accuracy of multisample scaled blitting

2013-05-01 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- tests/all.tests| 6 + .../ext_framebuffer_multisample/CMakeLists.gl.txt | 1 + .../ext_framebuffer_multisample/blit-scaled.cpp| 178 + 3 files changed, 185 insertions(+) create mode 100644 tests

[Mesa-dev] [PATCH 3/4] Add test to verify the accuracy of multisample scaled blit using a shader program

2013-05-01 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- tests/all.tests| 6 + .../ext_framebuffer_multisample/CMakeLists.gl.txt | 1 + .../blit-scaled-glsl.cpp | 268 + 3 files changed, 275 insertions(+) create mode 100644 tests

[Mesa-dev] [PATCH 4/4] Add test to verify the error conditions in ext_multisample_framebuffer_blit_scaled

2013-05-01 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- tests/all.tests| 1 + .../ext_framebuffer_multisample/CMakeLists.gl.txt | 1 + .../negative-blit-scaled.cpp | 111 + 3 files changed, 113 insertions(+) create mode 100644 tests

[Mesa-dev] [PATCH 0/3] Implement ext_framebuffer_multisample_blit_scaled extension

2013-05-01 Thread Anuj Phogat
Anuj Phogat (3): mesa: Implement ext_framebuffer_multisample_blit_scaled extension intel: Add multisample scaled blitting in blorp engine i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w src/mesa/drivers/dri/i965/brw_blorp.h | 16 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 1/3] mesa: Implement ext_framebuffer_multisample_blit_scaled extension

2013-05-01 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- src/mesa/main/extensions.c | 1 + src/mesa/main/fbobject.c | 17 ++--- src/mesa/main/mtypes.h | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index d8c5f53..15c9026

[Mesa-dev] [PATCH 2/3] intel: Add multisample scaled blitting in blorp engine

2013-05-01 Thread Anuj Phogat
ssions on sandybridge & ivybridge with these changes. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp.h | 16 +- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 581 + src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 + 3 files changed, 4

[Mesa-dev] [PATCH 3/3] i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w

2013-05-01 Thread Anuj Phogat
;s so special about these scaling factors. I'll update my patches to fix the issue along with other review comments. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel/intel_extens

Re: [Mesa-dev] [PATCH 0/4] Add tests to verify support of EXT_framebuffer_multisample_blit_scaled

2013-05-01 Thread Anuj Phogat
On Wed, May 1, 2013 at 1:58 PM, Anuj Phogat wrote: > > I've run these tests only on my implementation of > EXT_framebuffer_multisample_blit_scaled > extension on i965 drivers. NVIDIA, AMD machines I've don't support this > extension. > Could somebody try ru

Re: [Mesa-dev] [PATCH 2/3] intel: Add multisample scaled blitting in blorp engine

2013-05-01 Thread Anuj Phogat
On Wed, May 1, 2013 at 2:44 PM, Matt Turner wrote: > On Wed, May 1, 2013 at 2:10 PM, Anuj Phogat wrote: >> @@ -1063,22 +1176,21 @@ brw_blorp_blit_program::translate_tiling(bool >> old_tiled_w, bool new_tiled_w) >> * X' = (X & ~0b1011) >> 1 |

Re: [Mesa-dev] [PATCH 2/3] intel: Add multisample scaled blitting in blorp engine

2013-05-06 Thread Anuj Phogat
On Wed, May 1, 2013 at 2:10 PM, Anuj Phogat wrote: > In traditional multisampled framebuffer rendering, color samples must be > explicitly > resolved via BlitFramebuffer before doing the scaled blitting of the > framebuffer. > So, scaled blitting of a multisample framebuffer tak

Re: [Mesa-dev] [PATCH 2/3] intel: Add multisample scaled blitting in blorp engine

2013-05-09 Thread Anuj Phogat
On Tue, May 7, 2013 at 10:40 AM, Paul Berry wrote: > On 1 May 2013 14:10, Anuj Phogat wrote: >> >> In traditional multisampled framebuffer rendering, color samples must be >> explicitly >> resolved via BlitFramebuffer before doing the scaled blitting of the >> fr

[Mesa-dev] [PATCH V2 0/4] Implement ext_framebuffer_multisample_blit_scaled extension

2013-05-16 Thread Anuj Phogat
V2: - Split patch 2/3 in to two: intel: Change the register type from UW to UD in blorp engine intel: Add multisample scaled blitting in blorp engine - Modify src texture coordinates clipping to account for scaling. - Code rewrite to avoid unwanted changes. Anuj Phogat (4

[Mesa-dev] [PATCH v2 1/4] mesa: Implement ext_framebuffer_multisample_blit_scaled extension

2013-05-16 Thread Anuj Phogat
Signed-off-by: Anuj Phogat Reviewed-by: Paul Berry Reviewed-by: Brian Paul --- src/mesa/main/extensions.c | 1 + src/mesa/main/fbobject.c | 30 +++--- src/mesa/main/mtypes.h | 1 + 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH V2 2/4] intel: Change the register type from UW to UD in blorp engine

2013-05-16 Thread Anuj Phogat
These changes are required to implement scaled blitting in blorp in my next patch. No regressions observed in piglit quick-driver.tests with this patch. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp.h| 15 ++-- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 120

[Mesa-dev] [PATCH V2 4/4] i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w

2013-05-16 Thread Anuj Phogat
blocky artifacts due to nearest filtering. I'll work on implementing a better filtering technique in blorp. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c

[Mesa-dev] [PATCH V2 3/4] intel: Add multisample scaled blitting in blorp engine

2013-05-16 Thread Anuj Phogat
ith these changes. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp.h | 23 ++-- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 143 +++-- src/mesa/drivers/dri/i965/brw_reg.h| 7 -- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 +

Re: [Mesa-dev] [PATCH V2 3/4] intel: Add multisample scaled blitting in blorp engine

2013-05-29 Thread Anuj Phogat
On Fri, May 24, 2013 at 12:01 PM, Paul Berry wrote: > On 16 May 2013 11:44, Anuj Phogat wrote: >> >> In traditional multisampled framebuffer rendering, color samples must be >> explicitly resolved via BlitFramebuffer before doing the scaled blitting >> of the framebuf

Re: [Mesa-dev] [PATCH V2 4/4] i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w

2013-05-29 Thread Anuj Phogat
On Fri, May 24, 2013 at 2:41 PM, Eric Anholt wrote: > Paul Berry writes: > >> On 16 May 2013 11:44, Anuj Phogat wrote: >> >>> This patch enables ext_framebuffer_multisample_blit_scaled extension >>> on intel h/w >= gen6. >>> >>> Note:

Re: [Mesa-dev] [PATCH V2 3/4] intel: Add multisample scaled blitting in blorp engine

2013-05-29 Thread Anuj Phogat
On Wed, May 29, 2013 at 10:06 AM, Anuj Phogat wrote: > On Fri, May 24, 2013 at 12:01 PM, Paul Berry wrote: >> On 16 May 2013 11:44, Anuj Phogat wrote: >>> >>> In traditional multisampled framebuffer rendering, color samples must be >>> explicitly resolved

[Mesa-dev] [PATCH V3 3/4] intel: Add multisample scaled blitting in blorp engine

2013-05-29 Thread Anuj Phogat
-blit-stetch test and framebuffer_blit_functionality_magnifying_blit.test in gles3 CTS pass. Observed no piglit, gles3 CTS regressions on sandybridge & ivybridge with this patch. Signed-off-by: Anuj Phogat Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_blorp.h | 20

[Mesa-dev] [PATCH 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-04 Thread Anuj Phogat
Current implementation of ext_framebuffer_multisample_blit_scaled in i965/blorp uses nearest filtering for multisample scaled blits. Using nearest filtering produces blocky artifacts and negates the benefits of MSAA. That is the reason why extension was not enabled on i965. This patch implements t

[Mesa-dev] [PATCH 2/2] i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w

2013-06-04 Thread Anuj Phogat
e section 17.3.9). Color, depth, and stencil masks (see section 17.4.2) are ignored." Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/

Re: [Mesa-dev] [PATCH 1/2] intel: make intel_flush_front safe to call during initial MakeCurrent

2013-06-05 Thread Anuj Phogat
wable && >driDrawable->loaderPrivate) { > -- > 1.8.3 > > _______ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Both patches are: Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] intel: flush fake front buffer if server is about to destroy it.

2013-06-05 Thread Anuj Phogat
(back_rb) { > -- > 1.8.3 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Looks like a right thing to do and it makes a failing piglit test pass. Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH V3 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-19 Thread Anuj Phogat
to sample locations. - Test the boundary conditions on the edges of texture. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp.h| 11 ++ src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 257 +-- 2 files changed, 258 insertions(+), 10 deletions

[Mesa-dev] [PATCH V3 2/2] i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w

2013-06-19 Thread Anuj Phogat
f the quality benefits of multisampling. Since your implementation is effectively equivalent to downsampling and then blitting using GL_NEAREST filtering, my fear is that it will lead to blocky artifacts that are severe enough to negate the benefit of multisampling in the first place. Anuj Phoga

Re: [Mesa-dev] [PATCH 2/2] i965: Remove broken source type assertions from brw_alu3().

2013-06-20 Thread Anuj Phogat
> */ > - assert(dest.type == src2.type); > - >switch (dest.type) { >case BRW_REGISTER_TYPE_F: > insn->bits1.da3src.src_type = BRW_3SRC_TYPE_F; > -- > 1.8.3 > > ___ > mesa-dev mail

Re: [Mesa-dev] [PATCH 03/11] intel: Remove gratuitous custom framebuffer resize code.

2013-06-21 Thread Anuj Phogat
iver.BlitFramebuffer = intel_blit_framebuffer; > intel->ctx.Driver.EGLImageTargetRenderbufferStorage = > -- > 1.8.3.rc0 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Patches 3, 4-11 are Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-24 Thread Anuj Phogat
to sample locations. - Test the boundary conditions on the edges of texture. Signed-off-by: Anuj Phogat --- Made a small fix in setting up the interpolator value on top and bottom edges in Y direction. src/mesa/drivers/dri/i965/brw_blorp.h| 11 ++ src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH V3 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-26 Thread Anuj Phogat
On Tue, Jun 25, 2013 at 10:27 AM, Paul Berry wrote: > On 19 June 2013 19:45, Anuj Phogat wrote: >> >> Current implementation of ext_framebuffer_multisample_blit_scaled in >> i965/blorp uses nearest filtering for multisample scaled blits. Using >> nearest filtering pr

Re: [Mesa-dev] [PATCH] i965, i915: Return early if miptree allocation fails

2013-06-26 Thread Anuj Phogat
_lookup_enum_by_nr(target), > -- > 1.8.1.4 > > _______ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH V3 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-26 Thread Anuj Phogat
On Tue, Jun 25, 2013 at 10:27 AM, Paul Berry wrote: > > On 19 June 2013 19:45, Anuj Phogat wrote: >> >> Current implementation of ext_framebuffer_multisample_blit_scaled in >> i965/blorp uses nearest filtering for multisample scaled blits. Using >> nearest filtering

[Mesa-dev] [PATCH V4 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-26 Thread Anuj Phogat
to sample locations. - Test the boundary conditions on the edges of texture. V4: - Clip texcoords and use conditional MOVs. - Send texture dimensions as push constants. - Remove the optimization in case of scaled multisample blits. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH] mesa: Add null pointer checks before dereferencing

2013-06-27 Thread Anuj Phogat
Assertions are not sufficient to check for null pointers as they don't show up in release builds. So, add explicit null pointer checks in the code. Signed-off-by: Anuj Phogat --- src/mesa/program/prog_execute.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/pr

Re: [Mesa-dev] [PATCH] mesa: Add null pointer checks before dereferencing

2013-06-27 Thread Anuj Phogat
On Thu, Jun 27, 2013 at 2:59 PM, Brian Paul wrote: > On 06/27/2013 03:31 PM, Kenneth Graunke wrote: >> >> On 06/27/2013 02:20 PM, Anuj Phogat wrote: >>> >>> Assertions are not sufficient to check for null pointers as they don't >>> show up in relea

[Mesa-dev] [PATCH] mesa: Return ZeroVec/dummyReg instead of NULL pointer

2013-06-27 Thread Anuj Phogat
Assertions are not sufficient to check for null pointers as they don't show up in release builds. So, return ZeroVec/dummyReg instead of NULL pointer in get_{src,dst}_register_pointer(). This should calm down static analysis tool. Signed-off-by: Anuj Phogat --- src/mesa/program/prog_exec

Re: [Mesa-dev] [PATCH V3 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-28 Thread Anuj Phogat
>> >> >> >> +void >> >> +brw_blorp_blit_program::manual_blend_linear(unsigned num_samples) >> >> +{ >> >> + if (key->tex_layout == INTEL_MSAA_LAYOUT_CMS) >> >> + mcs_fetch(); >> > >> > >> > This won't work. The MCS value we fetch has to match up with the pixel >> > that we're sampling from.

[Mesa-dev] [PATCH V5 1/2] i965/blorp: Add bilinear filtering of samples for multisample scaled blits

2013-06-28 Thread Anuj Phogat
ting pixel coordinates. Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp.h| 16 ++ src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 278 +-- 2 files changed, 273 insertions(+), 21 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h

[Mesa-dev] [PATCH] i965/blorp: Fix clear rectangle alignment in fast color clear

2013-07-09 Thread Anuj Phogat
fixes: https://bugs.freedesktop.org/show_bug.cgi?id=65744 Signed-off-by: Anuj Phogat --- Thanks Paul for your great help in figuring out the fix. src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] i965/blorp: Fix clear rectangle alignment in fast color clear

2013-07-10 Thread Anuj Phogat
On Tue, Jul 9, 2013 at 6:44 PM, Chris Forbes wrote: > I think it would be clearer to do this, rather than 4 parallel checks: Yes. It's clearer. I will make this change. > > if (intel->gen >= 7) { > /* rationale ... */ > x0 = ROUND_DOWN_TO(x0, 2 * x_align); > y0 = ROUND_DOWN_TO(y0, 2

[Mesa-dev] [PATCH V2] i965/blorp: Fix clear rectangle alignment in fast color clear

2013-07-10 Thread Anuj Phogat
s patch. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=65744 Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/d

Re: [Mesa-dev] [PATCH] glsl: Mark "row_major" as not a reserved word in GLSL ES 3.0.

2013-07-11 Thread Anuj Phogat
, ROW_MAJOR); > > /* Additional reserved words in GLSL 1.40 */ > isampler2DRect KEYWORD(140, 300, 140, 0, ISAMPLER2DRECT); > -- > 1.8.1.5 > > _______ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > h

Re: [Mesa-dev] [PATCH] i965: Ignore 'centroid' interpolation qualifier in case of persample shading

2014-01-31 Thread Anuj Phogat
On Fri, Jan 31, 2014 at 12:55 PM, Carl Worth wrote: > Anuj Phogat writes: >> I missed this change in commit f5cfb4a. It fixes the incorrect >> rendering caused in Dolphin Emulator. > > It's too late for my review to change anything, but since I was recently > adding

[Mesa-dev] [PATCH 1/3] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-10 Thread Anuj Phogat
rd; layout(pixel_center_integer) in vec4 gl_FragCoord; void main() { gl_FragColor = gl_FragCoord.xyzz; } Cc: Signed-off-by: Anuj Phogat --- src/glsl/ast_to_hir.cpp | 39 +++ src/glsl/glsl_parser_extras.cpp | 3 +++ src/glsl/glsl_parser_extras.h | 10 +

[Mesa-dev] [PATCH 2/3] glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-10 Thread Anuj Phogat
void main() { gl_FragColor = vec4(gl_FragCoord.xyz, 1.0); foo(); } fragment shader 2: layout(origin_upper_left) in vec4 gl_FragCoord; void foo() { gl_FragColor.a = gl_FragCoord.z; } Cc: Signed-off-by: Anuj Phogat --- src/glsl/ast_to_hir.cpp | 5 src/glsl/glsl_parser_extra

[Mesa-dev] [PATCH 3/3] glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions

2014-02-10 Thread Anuj Phogat
m that have a static use of gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders in a single program must have the same set of qualifiers." Cc: Signed-off-by: Anuj Phogat --- src/glsl/glsl_parser_extras.cpp | 2 ++ src/glsl/linker.cpp | 7 ++-

Re: [Mesa-dev] [PATCH v4 3/9] glsl: parse invocations layout qualifier for ARB_gpu_shader5

2014-02-12 Thread Anuj Phogat
On Thu, Feb 6, 2014 at 6:28 PM, Jordan Justen wrote: > _mesa_glsl_parse_state in_qualifier->invocations will store the > invocations count. > > v3: > * Use in_qualifier to allow the primitive to be specied >separately from the invocations count (merge_qualifiers) > > Signed-off-by: Jordan Jus

Re: [Mesa-dev] [PATCH v4 8/9] i965: support gl_InvocationID for gen7

2014-02-12 Thread Anuj Phogat
On Thu, Feb 6, 2014 at 6:28 PM, Jordan Justen wrote: > v2: > * Make gl_InvocationID a system value > > v3: > * Properly shift from R0.1 into DST.4 by adding >GS_OPCODE_GET_INSTANCE_ID > > Signed-off-by: Jordan Justen > Acked-by: Paul Berry > --- > src/mesa/drivers/dri/i965/brw_defines.h

Re: [Mesa-dev] [PATCH v4 0/9] i965/gen7 instanced GS support for ARB_gpu_shader5

2014-02-14 Thread Anuj Phogat
mesa/state_tracker/st_program.c | 1 + > 21 files changed, 261 insertions(+), 65 deletions(-) > > -- > 1.9.rc1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedeskto

[Mesa-dev] [PATCH] mesa: Fix error code generation in glReadPixels()

2014-02-14 Thread Anuj Phogat
n the error INVALID_OPERATION occurs. If the type parameter is not UNSIGNED_INT_24_8 or FLOAT_32_UNSIGNED_INT_24_8_REV, then the error INVALID_ENUM occurs." Fixes failing Khronos CTS test packed_depth_stencil_error.test Cc: Signed-off-by: Anuj Phogat --- src/mesa/main/glfor

[Mesa-dev] [PATCH] mesa: Add GL_TEXTURE_CUBE_MAP_ARRAY to legal_get_tex_level_parameter_target()

2014-02-14 Thread Anuj Phogat
Fixes failing Khronos CTS test packed_depth_stencil_init.test Cc: Signed-off-by: Anuj Phogat --- src/mesa/main/texparam.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index b7ed50d..bbdbc27 100644 --- a/src/mesa/main/texparam.c

Re: [Mesa-dev] [PATCH] mesa: Fix error code generation in glReadPixels()

2014-02-18 Thread Anuj Phogat
On Fri, Feb 14, 2014 at 7:00 PM, Ian Romanick wrote: > On 02/14/2014 04:49 PM, Anuj Phogat wrote: >> Section 4.3.1, page 220, of OpenGL 3.3 specification explains >> the error conditions for glreadPixels(): >> >>"If the format is DEPTH_STENCIL, then values are

Re: [Mesa-dev] [PATCH 1/3] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-18 Thread Anuj Phogat
On Tue, Feb 18, 2014 at 11:01 AM, Ian Romanick wrote: > On 02/10/2014 05:29 PM, Anuj Phogat wrote: >> GLSL 1.50 spec says: >>"If gl_FragCoord is redeclared in any fragment shader in a program, >> it must be redeclared in all the fragment shaders in that >>

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] glcpp: Only warn for macro names containing __

2014-02-18 Thread Anuj Phogat
acro names containing "__" are reserved. > +0:1(10): preprocessor warning: Macro names containing "__" are reserved for > use by the implementation. > > 0:2(9): preprocessor error: Macro names starting with "GL_" are reserved. > > -0:3(9): preprocessor error: Macro names containing "__"

Re: [Mesa-dev] [PATCH 01/13] i965: Simplify Broadwell's 3DSTATE_MULTISAMPLE sample count handling.

2014-02-19 Thread Anuj Phogat
_BATCH(MS_PIXEL_LOCATION_CENTER | number_of_multisamples); > + OUT_BATCH(MS_PIXEL_LOCATION_CENTER | log2_samples << 1); > ADVANCE_BATCH(); > } > > -- > 1.8.4.2 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org >

Re: [Mesa-dev] [PATCH 09/13] i965: Only use the SIMD16 program for per-sample shading on Broadwell.

2014-02-19 Thread Anuj Phogat
On Wed, Feb 19, 2014 at 2:04 AM, Kenneth Graunke wrote: > This is a straight port from gen7_wm_state.c; I haven't looked into > whether we can do both. > Verified that restriction still holds true in BDW. See 3D Pipeline Stages > Pixel > Pixel Shader Thread Generation > Pixel Grouping (Dispatch Si

Re: [Mesa-dev] [PATCH 1/3] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-19 Thread Anuj Phogat
On Tue, Feb 18, 2014 at 5:28 PM, Ian Romanick wrote: > On 02/18/2014 03:36 PM, Anuj Phogat wrote: >> On Tue, Feb 18, 2014 at 11:01 AM, Ian Romanick wrote: >>> On 02/10/2014 05:29 PM, Anuj Phogat wrote: >>>> GLSL 1.50 spec says: >>>>"If gl_Frag

[Mesa-dev] [PATCH V2 3/4] glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-24 Thread Anuj Phogat
void main() { gl_FragColor = vec4(gl_FragCoord.xyz, 1.0); foo(); } fragment shader 2: layout(origin_upper_left) in vec4 gl_FragCoord; void foo() { gl_FragColor.a = gl_FragCoord.z; } Signed-off-by: Anuj Phogat Cc: --- src/glsl/ast_to_hir.cpp | 5 src/glsl/glsl_parser_extra

[Mesa-dev] [PATCH V2 1/4] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-24 Thread Anuj Phogat
_FragCoord; layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; Signed-off-by: Anuj Phogat Cc: --- This series is also available at: https://github.com/aphogat/mesa.git, branch='review' src/glsl/ast_to_hir.cpp | 60 +++

[Mesa-dev] [PATCH V2 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-24 Thread Anuj Phogat
ord; void main() { } Signed-off-by: Anuj Phogat Cc: --- src/glsl/ast_to_hir.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 9fe3095..f5dacfd 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp

[Mesa-dev] [PATCH V2 4/4] glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions

2014-02-24 Thread Anuj Phogat
m that have a static use of gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders in a single program must have the same set of qualifiers." Signed-off-by: Anuj Phogat Cc: --- src/glsl/glsl_parser_extras.cpp | 2 ++ src/glsl/linker.cpp | 7 ++-

Re: [Mesa-dev] [PATCH V2 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-25 Thread Anuj Phogat
On Tue, Feb 25, 2014 at 7:47 AM, Ian Romanick wrote: > > On 02/24/2014 05:34 PM, Anuj Phogat wrote: >> >> Section 4.3.8.1, page 39 of GLSL 1.50 spec says: >>"Within any shader, the first redeclarations of gl_FragCoord >> must appear before any use of

Re: [Mesa-dev] [PATCH V2 1/4] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-25 Thread Anuj Phogat
On Tue, Feb 25, 2014 at 7:43 AM, Ian Romanick wrote: > On 02/24/2014 05:34 PM, Anuj Phogat wrote: >> GLSL 1.50 spec says: >> "If gl_FragCoord is redeclared in any fragment shader in a program, >> it must be redeclared in all the fragment shaders in that >>

Re: [Mesa-dev] [PATCH V2 3/4] glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-25 Thread Anuj Phogat
On Tue, Feb 25, 2014 at 9:14 AM, Ian Romanick wrote: > On 02/24/2014 05:34 PM, Anuj Phogat wrote: >> GLSL 1.50 spec says: >> "If gl_FragCoord is redeclared in any fragment shader in a program, >> it must be redeclared in all the fragment shaders in that >>

Re: [Mesa-dev] [PATCH V2 3/4] glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-25 Thread Anuj Phogat
On Tue, Feb 25, 2014 at 5:02 PM, Anuj Phogat wrote: > On Tue, Feb 25, 2014 at 9:14 AM, Ian Romanick wrote: >> On 02/24/2014 05:34 PM, Anuj Phogat wrote: >>> GLSL 1.50 spec says: >>> "If gl_FragCoord is redeclared in any fragment shader in a program, >>&

[Mesa-dev] [PATCH 1/2] glsl: Fix build warning of unhandled case in switch

2014-02-25 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- src/glsl/ast_to_hir.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index f06baeb..8af 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2221,6 +2221,11

[Mesa-dev] [PATCH 2/2] i965: Fix build warning of unused variable

2014-02-25 Thread Anuj Phogat
Signed-off-by: Anuj Phogat --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index acdc9c7..22a4a07 100644 --- a/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] glsl: add switch case for MESA_SHADER_COMPUTE

2014-02-26 Thread Anuj Phogat
__ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] glsl: Fix build warning of unhandled case in switch

2014-02-26 Thread Anuj Phogat
Brian Paul had a patch on mailing list to fix this. So, this patch is no more required. On Tue, Feb 25, 2014 at 6:32 PM, Anuj Phogat wrote: > Signed-off-by: Anuj Phogat > --- > src/glsl/ast_to_hir.cpp | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/glsl/as

Re: [Mesa-dev] Piglit - GL/GLSL tests - GSoC 2014

2014-02-26 Thread Anuj Phogat
On Tue, Feb 25, 2014 at 9:47 AM, Chirag Agrawal wrote: > Hey! > > I am Chirag. I am currently part of a dual degree program (5yr) at Birla > Institute of Technology & Science, Pilani - Goa Campus, India. I am in my > 4th year as a candidate for a master's degree in Mathematics and a > bachelor's d

[Mesa-dev] [PATCH V3 1/4] glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-28 Thread Anuj Phogat
_FragCoord; layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; V3: Simplify the conditions to check for conflicting gl_FragCoord redeclarations. Signed-off-by: Anuj Phogat Cc: --- src/glsl/ast_to_hir.cpp | 45 +

[Mesa-dev] [PATCH V3 4/4] glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions

2014-02-28 Thread Anuj Phogat
m that have a static use of gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders in a single program must have the same set of qualifiers." Signed-off-by: Anuj Phogat Cc: --- src/glsl/glsl_parser_extras.cpp | 2 ++ src/glsl/linker.cpp | 7 ++-

[Mesa-dev] [PATCH V3 3/4] glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord

2014-02-28 Thread Anuj Phogat
upper_left) in vec4 gl_FragCoord; void main() { foo(); gl_FragColor = gl_FragData; } fragment shader 2: layout(pixel_center_integer) in vec4 gl_FragCoord; void foo() { } Signed-off-by: Anuj Phogat Cc: --- src/glsl/ast_to_hir.cpp | 5 +++ src/glsl/glsl_parser_extras.cpp | 16 +++

[Mesa-dev] [PATCH V3 2/4] glsl: Compile error if fs uses gl_FragCoord before first redeclaration

2014-02-28 Thread Anuj Phogat
ord; void main() { } Signed-off-by: Anuj Phogat Cc: --- src/glsl/ast_to_hir.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 7b1cd1b..0234339 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp

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