[Mesa-dev] [PATCH 3/5] glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)

2014-12-04 Thread Mario Kleiner
Restores proper immediate tearing swap behaviour for OpenGL bufferswap under DRI3/Present. Cc: "10.3 10.4" v2: Add Frank Binns signed off by for his original earlier patch from April 2014, which is identical to this one, and Chris Wilsons reviewed tag from May 2014 for that patch, ergo also for

[Mesa-dev] DRI3/Present fixes for Mesa 10.3+ (v3)

2014-12-04 Thread Mario Kleiner
Ok, third iteration of the series. Incorporated all the review comments of Axel Davy and Eric Anholt and retested for extra paranoia. Thanks! -mario ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/m

[Mesa-dev] [PATCH 4/5] glx/dri3: Don't fail on glXSwapBuffersMscOML(dpy, window, 0, 0, 0) (v2)

2014-12-04 Thread Mario Kleiner
glXSwapBuffersMscOML() with target_msc=divisor=remainder=0 gets translated into target_msc=divisor=0 but remainder=1 by the mesa api. This is done for server DRI2 where there needs to be a way to tell the server-side DRI2ScheduleSwap implementation if a call to glXSwapBuffers() or glXSwapBuffersMsc

[Mesa-dev] [PATCH 5/5] glx: Handle out-of-sequence swap completion events correctly.

2014-12-04 Thread Mario Kleiner
The code for emitting INTEL_swap_events swap completion events needs to translate from 32-Bit sbc on the wire to 64-Bit sbc for the events and handle wraparound accordingly. It assumed that events would be sent by the server in the order their corresponding swap requests were emitted from the clie

[Mesa-dev] [PATCH 1/5] glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly. (v2)

2014-12-04 Thread Mario Kleiner
targetSBC == 0 is a special case, which asks the function to block until all pending OpenGL bufferswap requests have completed. Currently the function just falls through for targetSBC == 0, returning bogus results. This breaks applications originally written and tested against DRI2 which also rel

[Mesa-dev] [PATCH 2/5] glx/dri3: Track separate (ust, msc) for PresentPixmap vs. PresentNotifyMsc (v2)

2014-12-04 Thread Mario Kleiner
Prevent calls to glXGetSyncValuesOML() and glXWaitForMscOML() from overwriting the (ust,msc) values of the last successfull swapbuffers call (PresentPixmapCompleteNotify event), as glXWaitForSbcOML() relies on those values corresponding to the most recent completed swap, not to whatever was last re

Re: [Mesa-dev] [PATCH] i965/fs: Remove try_replace_with_sel().

2014-12-04 Thread Kenneth Graunke
On Friday, November 21, 2014 10:23:43 AM Matt Turner wrote: > On Tue, Nov 11, 2014 at 9:41 AM, Matt Turner wrote: > > The rest of our backend optimizations have replaced the need for this > > since it was written. > > > > instructions in affected programs: 30626 -> 30564 (-0.20%) > > > > Hurts

Re: [Mesa-dev] [PATCH 3/3] mesa: Fix string_to_uint_map->iterate to return same numbers from put()

2014-12-04 Thread Tapani Pälli
Yep, my implementation leaked this detail to be handled by the caller. This looks nicer as it's all isolated in the class. Reviewed-by: Tapani Pälli On 12/05/2014 12:00 AM, Carl Worth wrote: There is an internal implementation detail that the hash table underlying the struct string_to_uint_ma

[Mesa-dev] [PATCH] i965/Gen6-7: Fix point sprites with PolygonMode(GL_POINT)

2014-12-04 Thread Chris Forbes
This was an oversight in the original patch. When PolygonMode is used, then front faces, back faces, or both may be rendered as points and are affected by point sprite state. Note that SNB/IVB can't actually be fully conformant here, for a legacy context -- we don't have separate sets of pointspri

[Mesa-dev] [PATCH] i965/fs: Make brw_reg_from_fs_reg static and remove prototype.

2014-12-04 Thread Matt Turner
And move it above its first use in brw_fs_generator.cpp. --- src/mesa/drivers/dri/i965/brw_fs.h | 2 - src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 140 - 2 files changed, 70 insertions(+), 72 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h

[Mesa-dev] [PATCH v3 04/12] i965: Remove shader program argument and member from fs_generator

2014-12-04 Thread Kristian Høgsberg
Now that the caller passes in the shader debug name, we don't need this anymore. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs.cpp| 2 +- src/mesa/drivers/dri/i965/brw_fs.h | 2 -- src/mesa/d

[Mesa-dev] [PATCH v3 12/12] i965: Generate vs code using scalar backend for BDW+

2014-12-04 Thread Kristian Høgsberg
With everything in place, we can now use the scalar backend compiler for vertex shaders on BDW+. We make scalar vertex shaders the default on BDW+ but add a new vec4vs debug option to force the vec4 backend. No piglit regressions. Performance impact is minimal, I see a ~1.5 improvement on the T-

[Mesa-dev] [PATCH v3 01/12] i965: Don't copy propagate constants from sources with saturate

2014-12-04 Thread Kristian Høgsberg
We don't propagate the saturate bit and some instructions can't saturate at all. If the source has saturate set, just skip propagation. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drive

[Mesa-dev] [PATCH v3 07/12] i965: Consolidate code to get struct brw_sampler_prog_key_data

2014-12-04 Thread Kristian Høgsberg
This chunk of code is repeated in a few places, and we're going to add a MESA_SHADER_VERTEX case to it soon. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 37 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/src/me

[Mesa-dev] [PATCH v3 06/12] i965: Add new SIMD8 VS prog data flag

2014-12-04 Thread Kristian Høgsberg
This flag signals that we have a SIMD8 VS shader so we can set up the corresponding state accordingly. This boils down to setting the BDW+ SIMD8 enable bit in 3DSTATE_VS and making UBO and pull constant buffers use dword pitch. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH v3 09/12] i965: Rename brw_vec4_prog_data/key to brw_bue_prog_data/key

2014-12-04 Thread Kristian Høgsberg
These structs aren't vec4 specific, they are shared by shader stages operating on Vertex URB Entries (VUEs). VUEs are the data structures in the URB that hold vertex data between the pipeline geometry stages. Using vue in the name instead of vec4 makes a lot more sense, especially when we add scal

[Mesa-dev] [PATCH v3 00/12] Scalar VS for BDW+

2014-12-04 Thread Kristian Høgsberg
Here's v3 of the scalar vs series. Changes from v2 - Bail out of constant propagation early if source is saturated (from Matt). - Fixed the half-finished, broken vec4 -> vue key and prog_data rename. - Add '***' around attr regsisters in debug output if they end up as destinations. - Ad

[Mesa-dev] [PATCH v3 05/12] i965: Add SIMD8 URB write low-level IR instruction

2014-12-04 Thread Kristian Høgsberg
This is all we need from the generator for SIMD8 vertex shaders. This opcode is just the send instruction, all the hard work will happen in the visitor using LOAD_PAYLOAD. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_defines.h | 3 +++ src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH v3 11/12] i965: Clean up fs_visitor::run and rename to run_fs

2014-12-04 Thread Kristian Høgsberg
Now that fs_visitor::run is back to being only fragment shader compilation, we can clean up a few stage == MESA_SHADER_FRAGMENT conditions and rename it to run_fs. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_fs.cpp | 32 ++-- src/mesa/drivers/dr

[Mesa-dev] [PATCH v3 03/12] i965: Set shader name for generator from call site

2014-12-04 Thread Kristian Høgsberg
fs_generator no longer knows what stage it's generating code for, so we have to set the debug name of the shader from the call site. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 4 +++- src/mesa/drivers/dri/i965/brw_fs.cpp| 17 --

[Mesa-dev] [PATCH v3 08/12] i965: Prepare for using the ATTR register file in the fs backend

2014-12-04 Thread Kristian Høgsberg
The scalar vertex shader will use the ATTR register file for vertex attributes. This patch adds support for the ATTR file to fs_visitor. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_fs.cpp | 10 +- src/mesa/drivers/dri/i965/brw_fs.h | 3 +++

[Mesa-dev] [PATCH v3 10/12] i965: Add fs_visitor::run_vs() to generate scalar vertex shader code

2014-12-04 Thread Kristian Høgsberg
This patch uses the previous refactoring to add a new run_vs() method that generates vertex shader code using the scalar visitor and optimizer. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_fs.cpp | 111 +- src/mesa/drivers/dri/i965/brw_fs.h | 21 +

[Mesa-dev] [PATCH v3 02/12] i965: Generalize fs_generator further

2014-12-04 Thread Kristian Høgsberg
This removes all stage specific data from the generator, and lets us create a generator for any stage. Signed-off-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 5 ++--- src/mesa/drivers/dri/i965/brw_fs.cpp| 2 +- src/mesa/drivers/dri/i965/brw_fs.h

Re: [Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 7:54 PM, Carl Worth wrote: > On Thu, Dec 04 2014, Carl Worth wrote: >> So I think I'll follow up with a separate patch to clean these up. > > Before I do that, I noticed the following in util/macros.h: > > /** > * Unreachable macro. Useful for suppressing "c

Re: [Mesa-dev] [PATCH] i965: Compute VS attribute WA bits earlier and check if they changed.

2014-12-04 Thread Ian Romanick
On 12/03/2014 05:42 PM, Kenneth Graunke wrote: > BRW_NEW_VERTICES is flagged every time we draw a primitive. Having > the brw_vs_prog atom depend on BRW_NEW_VERTICES meant that we had to > compute the VS program key and do a program cache lookup for every > single primitive. This is painfully exp

Re: [Mesa-dev] [PATCH] i965/gs: Avoid DW * DW mul

2014-12-04 Thread Ben Widawsky
On Thu, Dec 04, 2014 at 07:48:06PM -0800, Ben Widawsky wrote: > On Thu, Dec 04, 2014 at 05:08:21PM -0800, Matt Turner wrote: > > On Thu, Dec 4, 2014 at 3:37 PM, Ben Widawsky > > wrote: > > > The GS has an interesting use for mul. It's essentially used as a fancy > > > mov (in > > > fact, I am not

Re: [Mesa-dev] [PATCH] i965/gs: Avoid DW * DW mul

2014-12-04 Thread Ben Widawsky
On Thu, Dec 04, 2014 at 05:17:05PM -0800, Kenneth Graunke wrote: > On Thursday, December 04, 2014 03:37:17 PM Ben Widawsky wrote: > > The GS has an interesting use for mul. It's essentially used as a fancy mov > > (in > > fact, I am not sure why a mov isn't used). The documentation in the > > fun

Re: [Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Carl Worth
On Thu, Dec 04 2014, Carl Worth wrote: > So I think I'll follow up with a separate patch to clean these up. Before I do that, I noticed the following in util/macros.h: /** * Unreachable macro. Useful for suppressing "control reaches end of non-void * function" warnings.

Re: [Mesa-dev] [PATCH] i965/gs: Avoid DW * DW mul

2014-12-04 Thread Ben Widawsky
On Thu, Dec 04, 2014 at 05:08:21PM -0800, Matt Turner wrote: > On Thu, Dec 4, 2014 at 3:37 PM, Ben Widawsky > wrote: > > The GS has an interesting use for mul. It's essentially used as a fancy mov > > (in > > fact, I am not sure why a mov isn't used). The documentation in the > > function has >

Re: [Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Carl Worth
On Thu, Dec 04 2014, Matt Turner wrote: > On Thu, Dec 4, 2014 at 2:00 PM, Carl Worth wrote: >> + assert(!"Should not get here."); >> + return error_type; > > Let's just use unreachable("not reached") here. That's a good idea. I copied this line from the surrounding code in the same file, (the

Re: [Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Carl Worth
On Thu, Dec 04 2014, Ian Romanick wrote: > Shouldn't type be glsl_base_type instead of unsigned? Yes, thanks for the catch. Fixed. >> + if (shadow) >> +return (array ? sampler2DArrayShadow_type : sampler2DShadow_type >> +); > > It's weird that the closing paren ended up here.

Re: [Mesa-dev] [PATCH 2/3] util/primconvert: support instanced rendering

2014-12-04 Thread Ilia Mirkin
On Thu, Dec 4, 2014 at 7:34 PM, Brian Paul wrote: > On 12/04/2014 05:01 PM, Ilia Mirkin wrote: >> >> Signed-off-by: Ilia Mirkin >> Cc: "10.3 10.4" >> --- >> src/gallium/auxiliary/indices/u_primconvert.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/src/gallium/auxiliary/indice

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 6:54 PM, Ian Romanick wrote: > On 12/04/2014 04:33 PM, Matt Turner wrote: >> On Thu, Dec 4, 2014 at 4:26 PM, Ian Romanick wrote: >>> On 12/04/2014 03:05 PM, Matt Turner wrote: Jason realized that we could fix the result of the CMP instruction on Gen <= 5 by doing

Re: [Mesa-dev] [PATCH 3/3] mesa: Fix string_to_uint_map->iterate to return same numbers from put()

2014-12-04 Thread Carl Worth
On Thu, Dec 04 2014, Ian Romanick wrote: > Should this just get squashed with the previous commit? Yes. I only hesitated because I wrote the second and not the first, (so I didn't want to lose authorship in the history). But it's not useful to have an iterate in the history that actually does the

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Try to emit LINE instructions on Gen <= 5.

2014-12-04 Thread Ian Romanick
On 12/04/2014 04:37 PM, Matt Turner wrote: > The LINE instruction performs a multiply-add instruction (a * b + c) > where b and c are scalar arguments. It reads b and c from offsets in > src0 such that you can load them (it they're representable) as a > vector-float immediate with a single instruct

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Try to emit LINE instructions on Gen <= 5.

2014-12-04 Thread Ian Romanick
On 12/04/2014 04:37 PM, Matt Turner wrote: > The LINE instruction performs a multiply-add instruction (a * b + c) > where b and c are scalar arguments. It reads b and c from offsets in > src0 such that you can load them (it they're representable) as a if? > vect

Re: [Mesa-dev] [PATCH] i965/fs: Remove try_replace_with_sel().

2014-12-04 Thread Ian Romanick
On 12/04/2014 06:06 PM, Matt Turner wrote: > On Fri, Nov 21, 2014 at 10:23 AM, Matt Turner wrote: >> Thoughts? > > Ping^2 Seems reasonable enough... any progress on the "common ternary pattern" better? (I deleted the original message, so I reviewed the patch from the list archive.) > _

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Ian Romanick
On 12/04/2014 04:33 PM, Matt Turner wrote: > On Thu, Dec 4, 2014 at 4:26 PM, Ian Romanick wrote: >> On 12/04/2014 03:05 PM, Matt Turner wrote: >>> Jason realized that we could fix the result of the CMP instruction on >>> Gen <= 5 by doing -(result & 1). Also do the resolves in the vec4 >>> backend

Re: [Mesa-dev] DRI3/Present fixes for Mesa 10.3+ (v2)

2014-12-04 Thread Eric Anholt
Mario Kleiner writes: > A slightly updated and extended series of the dri3/present fixes for Mesa i > sent last week. > > Patch 1 and 2 are same as before. Patch 3 now has signed off by Frank Binns > and reviewed by Chris Wilson. Patch 4 and 5 are additional fixes. The last > one makes INTEL_swap

Re: [Mesa-dev] [PATCH 3/5] glx/dri3: Request non-vsynced Present for swapinterval zero. (v2)

2014-12-04 Thread Eric Anholt
Mario Kleiner writes: > Restores proper immediate tearing swap behaviour for > OpenGL bufferswap under DRI3/Present. > > Cc: "10.3 10.4" > > v2: Add Frank Binns signed off by for his original earlier > patch from April 2014, which is identical to this one, and > Chris Wilsons reviewed tag from M

Re: [Mesa-dev] [PATCH 1/5] glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly.

2014-12-04 Thread Eric Anholt
Mario Kleiner writes: > On 12/04/2014 11:48 AM, Axel Davy wrote: >> Le 04/12/2014 11:44, Axel Davy a écrit : >>> On 02/12/2014 20:53, Mario Kleiner wrote : targetSBC == 0 is a special case, which asks the function to block until all pending OpenGL bufferswap requests have completed

Re: [Mesa-dev] [PATCH 4/5] glx/dri3: Don't fail on glXSwapBuffersMscOML(dpy, window, 0, 0, 0)

2014-12-04 Thread Eric Anholt
Mario Kleiner writes: > glXSwapBuffersMscOML() with target_msc=divisor=remainder=0 gets > translated into target_msc=divisor=0 but remainder=1 by the mesa > api. This is done for server DRI2 where there needs to be a way > to tell the server-side DRI2ScheduleSwap implementation if a call > to glX

[Mesa-dev] [Bug 86980] [swrast] piglit fp-rfl regression

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86980 Vinson Lee changed: What|Removed |Added Blocks||79706 -- You are receiving this mail becau

[Mesa-dev] [Bug 79706] [TRACKER] Mesa regression tracker

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79706 Vinson Lee changed: What|Removed |Added Depends on||86980 -- You are receiving this mail becau

[Mesa-dev] [Bug 79706] [TRACKER] Mesa regression tracker

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79706 Vinson Lee changed: What|Removed |Added Depends on||86944 -- You are receiving this mail becau

[Mesa-dev] [Bug 86944] glsl_parser_extras.cpp", line 1455: Error: Badly formed expression.

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86944 Vinson Lee changed: What|Removed |Added Blocks||79706 -- You are receiving this mail becau

[Mesa-dev] [Bug 86939] test_vf_float_conversions.cpp:63:12: error: expected primary-expression before ‘union’

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=86939 Vinson Lee changed: What|Removed |Added Blocks||79706 -- You are receiving this mail becau

[Mesa-dev] [Bug 79706] [TRACKER] Mesa regression tracker

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79706 Vinson Lee changed: What|Removed |Added Depends on||86939 -- You are receiving this mail becau

Re: [Mesa-dev] [PATCH] glsl: Optimize scalar all_equal/any_nequal into equal/nequal.

2014-12-04 Thread Eric Anholt
Matt Turner writes: > Cuts an instruction from two shaders in Tesseract, by allowing the > (x+y) cmp 0 -> x cmp -y optimization to take place. > > instructions in affected programs: 1198 -> 1194 (-0.33%) Reviewed-by: Eric Anholt signature.asc Description: PGP signature ___

Re: [Mesa-dev] [PATCH] i965/fs: Remove try_replace_with_sel().

2014-12-04 Thread Matt Turner
On Fri, Nov 21, 2014 at 10:23 AM, Matt Turner wrote: > Thoughts? Ping^2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] glsl: Optimize scalar all_equal/any_nequal into equal/nequal.

2014-12-04 Thread Matt Turner
Cuts an instruction from two shaders in Tesseract, by allowing the (x+y) cmp 0 -> x cmp -y optimization to take place. instructions in affected programs: 1198 -> 1194 (-0.33%) --- src/glsl/opt_algebraic.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/glsl/opt_algebraic

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 5:48 PM, Kenneth Graunke wrote: > Some comments would be nice: > > /** > * Resolve the result of a Gen4-5 CMP instruction to a proper boolean. > * > * CMP on Gen4-5 only sets the LSB of the result; the rest are undefined. > * If we need a proper boolean value, we have to

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Kenneth Graunke
On Thursday, December 04, 2014 03:05:59 PM Matt Turner wrote: > Jason realized that we could fix the result of the CMP instruction on > Gen <= 5 by doing -(result & 1). Also do the resolves in the vec4 > backend before use, rather than when the bool was created. The FS does > this and it saves some

[Mesa-dev] With newer git mesa builds hardware decoding fails with Assertion `0' failed. (r600g, Radeon HD 8570D)

2014-12-04 Thread Kertesz Laszlo
Hello, Building recent mesa git i found that most video players that use VDPAu hardware decoding fail with vl/vl_stubs.c:45:vl_video_buffer_formats: Assertion `0' failed. Trace/breakpoint trap for example trying to play a 1080p h264 video that worked with hw decoding: $ mpv /media/bigdata/

Re: [Mesa-dev] [PATCH] i965/gs: Avoid DW * DW mul

2014-12-04 Thread Kenneth Graunke
On Thursday, December 04, 2014 03:37:17 PM Ben Widawsky wrote: > The GS has an interesting use for mul. It's essentially used as a fancy mov > (in > fact, I am not sure why a mov isn't used). The documentation in the function > has > a very good explanation from Paul on the mechanics. > > CHV ha

Re: [Mesa-dev] [PATCH] i965/gs: Avoid DW * DW mul

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 3:37 PM, Ben Widawsky wrote: > The GS has an interesting use for mul. It's essentially used as a fancy mov > (in > fact, I am not sure why a mov isn't used). The documentation in the function > has > a very good explanation from Paul on the mechanics. What do you mean? Th

Re: [Mesa-dev] [PATCH] mesa/st: don't use CMP / I2F for conditional assignments with native integers

2014-12-04 Thread Brian Paul
LGTM. Reviewed-by: Brian Paul On 12/04/2014 04:25 PM, srol...@vmware.com wrote: From: Roland Scheidegger The original idea was to optimize away the condition by integrating it directly into the CMP instruction. However, with native integers this requires an extra I2F instruction. It is also

[Mesa-dev] [PATCH 4/4] i965/fs: Perform CSE on MOV ..., VF instructions.

2014-12-04 Thread Matt Turner
Safe from causing optimization loops, since we don't constant propagate VF arguments. (for this and the previous patch): total instructions in shared programs: 4289075 -> 4271932 (-0.40%) instructions in affected programs: 1616779 -> 1599636 (-1.06%) --- src/mesa/drivers/dri/i965/brw_fs_cse.c

[Mesa-dev] [PATCH 2/4] i965/fs: Add support for generating the LINE instruction.

2014-12-04 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 4ae35ac..2f99d65 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/m

[Mesa-dev] [PATCH 3/4] i965/fs: Try to emit LINE instructions on Gen <= 5.

2014-12-04 Thread Matt Turner
The LINE instruction performs a multiply-add instruction (a * b + c) where b and c are scalar arguments. It reads b and c from offsets in src0 such that you can load them (it they're representable) as a vector-float immediate with a single instruction. Hurts some programs, but that'll all get bett

[Mesa-dev] [PATCH 1/4] i965: Set the region of LINE's src0 to <0, 1, 0>.

2014-12-04 Thread Matt Turner
The PRMs say that region must be a replicated scalar (with HorzStride = VertStride = 0). but apparently that doesn't actually apply to all generations. I did notice when implementing the optimization later in this series that G45 and ILK needed this regioning. --- src/mesa/drivers/dri/i96

Re: [Mesa-dev] [PATCH 2/3] util/primconvert: support instanced rendering

2014-12-04 Thread Brian Paul
On 12/04/2014 05:01 PM, Ilia Mirkin wrote: Signed-off-by: Ilia Mirkin Cc: "10.3 10.4" --- src/gallium/auxiliary/indices/u_primconvert.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c index 9

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 4:26 PM, Ian Romanick wrote: > On 12/04/2014 03:05 PM, Matt Turner wrote: >> Jason realized that we could fix the result of the CMP instruction on >> Gen <= 5 by doing -(result & 1). Also do the resolves in the vec4 >> backend before use, rather than when the bool was create

Re: [Mesa-dev] [PATCH 3/4] i965: Change the type of booleans to D.

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 4:22 PM, Ian Romanick wrote: > On 12/04/2014 03:05 PM, Matt Turner wrote: >> This is a revert of commit 4656c14e ("i965/fs: Change the type of >> booleans to UD and emit correct immediates") plus some small additional > > Commit 4656c14e contained some shader-db data... does

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Ian Romanick
On 12/04/2014 03:05 PM, Matt Turner wrote: > Jason realized that we could fix the result of the CMP instruction on > Gen <= 5 by doing -(result & 1). Also do the resolves in the vec4 > backend before use, rather than when the bool was created. The FS does > this and it saves some unnecessary resolv

Re: [Mesa-dev] [PATCH 3/4] i965: Change the type of booleans to D.

2014-12-04 Thread Ian Romanick
On 12/04/2014 03:05 PM, Matt Turner wrote: > This is a revert of commit 4656c14e ("i965/fs: Change the type of > booleans to UD and emit correct immediates") plus some small additional Commit 4656c14e contained some shader-db data... does this pseudo-revert have shader-db changes? > fixes, like c

Re: [Mesa-dev] [PATCH 2/2] i965: Give compile stats through KHR_debug.

2014-12-04 Thread Eric Anholt
Matt Turner writes: > --- > src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 ++ > src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 10 ++ > 2 files changed, 20 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp > b/src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Jason Ekstrand
This series is Reviewed-by: Jason Ekstrand On Thu, Dec 4, 2014 at 3:05 PM, Matt Turner wrote: > Jason realized that we could fix the result of the CMP instruction on > Gen <= 5 by doing -(result & 1). Also do the resolves in the vec4 > backend before use, rather than when the bool was created.

[Mesa-dev] [PATCH 1/3] util/primconvert: pass index bias through

2014-12-04 Thread Ilia Mirkin
The index_bias (aka base_vertex) applies to the downstream draw just as much, since the actual index values are never modified. Signed-off-by: Ilia Mirkin Cc: "10.3 10.4" --- src/gallium/auxiliary/indices/u_primconvert.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/

[Mesa-dev] [PATCH 3/3] util/primconvert: take ib offset into account

2014-12-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Cc: "10.4 10.3" --- src/gallium/auxiliary/indices/u_primconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c index 539ca53..4632781 100644 --- a/src/

[Mesa-dev] [PATCH 2/3] util/primconvert: support instanced rendering

2014-12-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin Cc: "10.3 10.4" --- src/gallium/auxiliary/indices/u_primconvert.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/indices/u_primconvert.c b/src/gallium/auxiliary/indices/u_primconvert.c index 95a2478..539ca53 100644 --- a/src/gallium/auxili

[Mesa-dev] [PATCH] i965/gs: Avoid DW * DW mul

2014-12-04 Thread Ben Widawsky
The GS has an interesting use for mul. It's essentially used as a fancy mov (in fact, I am not sure why a mov isn't used). The documentation in the function has a very good explanation from Paul on the mechanics. CHV has some quirks with regard to multiplication. While the documentation is somewha

[Mesa-dev] [PATCH] mesa/st: don't use CMP / I2F for conditional assignments with native integers

2014-12-04 Thread sroland
From: Roland Scheidegger The original idea was to optimize away the condition by integrating it directly into the CMP instruction. However, with native integers this requires an extra I2F instruction. It is also fishy because the negation used didn't really honor ieee754 float comparison rules, n

[Mesa-dev] [PATCH 4/4] i965: Use ~0 to represent true on all generations.

2014-12-04 Thread Matt Turner
Jason realized that we could fix the result of the CMP instruction on Gen <= 5 by doing -(result & 1). Also do the resolves in the vec4 backend before use, rather than when the bool was created. The FS does this and it saves some unnecessary resolves. On Ironlake: total instructions in shared pro

[Mesa-dev] [PATCH 3/4] i965: Change the type of booleans to D.

2014-12-04 Thread Matt Turner
This is a revert of commit 4656c14e ("i965/fs: Change the type of booleans to UD and emit correct immediates") plus some small additional fixes, like casting ctx->Const.UniformBooleanTrue to int and changing UD to D in the ir_unop_b2f cases. Note that it's safe to leave 0x3f80 as UD and as a li

[Mesa-dev] [PATCH 2/4] i965/fs: Add a negate() function.

2014-12-04 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.h | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index b29b6b0..c7bc55c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -119,6 +119

[Mesa-dev] [PATCH 1/4] i965/vec4: Don't DCE flag-writing insts because dest was unused.

2014-12-04 Thread Matt Turner
--- Ken pointed this out in his review, and I fixed it in the FS, but apparently forgot to fix it in the vec4 code. src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate

Re: [Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Matt Turner
On Thu, Dec 4, 2014 at 2:00 PM, Carl Worth wrote: > + assert(!"Should not get here."); > + return error_type; Let's just use unreachable("not reached") here. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailm

Re: [Mesa-dev] [PATCH] i965: Move PSCDEPTH calculations from draw time to compile time.

2014-12-04 Thread Matt Turner
On Wed, Dec 3, 2014 at 5:58 PM, Kenneth Graunke wrote: > On Tuesday, December 02, 2014 10:34:49 AM Matt Turner wrote: >> On Tue, Dec 2, 2014 at 3:50 AM, Kenneth Graunke >> wrote: >> > The "Pixel Shader Computed Depth Mode" value is entirely based on the >> > shader program, so we can easily do i

Re: [Mesa-dev] [PATCH 3/3] mesa: Fix string_to_uint_map->iterate to return same numbers from put()

2014-12-04 Thread Ian Romanick
On 12/04/2014 02:00 PM, Carl Worth wrote: > There is an internal implementation detail that the hash table > underlying the struct string_to_uint_map stores each value internally > as (value+1). The user needn't be very concerned with this (other than > knowing that a value of UINT_MAX cannot be st

Re: [Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Ian Romanick
On 12/04/2014 02:00 PM, Carl Worth wrote: > This is similar to the existing functions get_instance, get_array_instance, > etc. for getting a type singleton. The new get_sampler_instance() function > will be used by the upcoming shader cache. > --- > src/glsl/glsl_types.cpp | 111 > +++

Re: [Mesa-dev] [PATCH v2 06/23] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-04 Thread Ian Romanick
On 12/02/2014 09:54 AM, Ilia Mirkin wrote: > I believe the issue is that _mesa_TextureView should be checking the > target internal format against _mesa_base_tex_format() and returning a > GL_INVALID_VALUE error (? the spec conveniently lists errors as > 'TODO') if it returns -1. Chris -- thoughts?

Re: [Mesa-dev] [PATCH 2/3] glcpp: Disallow undefining GL_* builtin macros.

2014-12-04 Thread Chris Forbes
Ugh, yes, I'll fix that and land it at the same time. Thanks :) On Fri, Dec 5, 2014 at 11:12 AM, Ian Romanick wrote: > On 11/29/2014 12:54 PM, Chris Forbes wrote: >> Fixes the piglit test: spec/glsl-es-3.00/compiler/undef-GL_ES.vert >> >> Signed-off-by: Chris Forbes >> --- >> src/glsl/glcpp/gl

Re: [Mesa-dev] [PATCH 2/3] glcpp: Disallow undefining GL_* builtin macros.

2014-12-04 Thread Ian Romanick
On 11/29/2014 12:54 PM, Chris Forbes wrote: > Fixes the piglit test: spec/glsl-es-3.00/compiler/undef-GL_ES.vert > > Signed-off-by: Chris Forbes > --- > src/glsl/glcpp/glcpp-parse.y | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/gls

Re: [Mesa-dev] [PATCH] glsl: throw error when using invariant(all) in a fragment shader

2014-12-04 Thread Ian Romanick
On 11/04/2014 04:20 AM, Tapani Pälli wrote: > Note that some of the GLSL specifications explicitly state this as > compile error, some simply state that 'it is an error'. > > Signed-off-by: Tapani Pälli > --- > src/glsl/glsl_parser.yy | 13 - > 1 file changed, 12 insertions(+), 1 del

[Mesa-dev] [PATCH 3/3] mesa: Fix string_to_uint_map->iterate to return same numbers from put()

2014-12-04 Thread Carl Worth
There is an internal implementation detail that the hash table underlying the struct string_to_uint_map stores each value internally as (value+1). The user needn't be very concerned with this (other than knowing that a value of UINT_MAX cannot be stored) since put() adds 1 and get() subtracts 1. H

[Mesa-dev] [PATCH 2/3] mesa: iterate method for string_to_uint_map

2014-12-04 Thread Carl Worth
From: Tapani Pälli Shader binary cache requires this to be able to cache hash data from the gl_shader_program structure. Signed-off-by: Tapani Pälli Reviewed-by: Paul Berry Reviewed-by: Carl Worth --- src/mesa/program/hash_table.h | 8 1 file changed, 8 insertions(+) diff --git a/s

[Mesa-dev] [PATCH 1/3] glsl: Add convenience function get_sampler_instance

2014-12-04 Thread Carl Worth
This is similar to the existing functions get_instance, get_array_instance, etc. for getting a type singleton. The new get_sampler_instance() function will be used by the upcoming shader cache. --- src/glsl/glsl_types.cpp | 111 src/glsl/glsl_types.

Re: [Mesa-dev] [PATCH 3/5] glx/dri3: Request non-vsynced Present for swapinterval zero. (v2)

2014-12-04 Thread Mario Kleiner
On 12/04/2014 11:20 AM, Axel Davy wrote: On 02/12/2014 20:53, Mario Kleiner wrote : Restores proper immediate tearing swap behaviour for OpenGL bufferswap under DRI3/Present. + if (priv->swap_interval == 0) + options |= XCB_PRESENT_OPTION_ASYNC; + back->busy = 1; Cu

Re: [Mesa-dev] [PATCH 1/5] glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly.

2014-12-04 Thread Mario Kleiner
On 12/04/2014 11:48 AM, Axel Davy wrote: Le 04/12/2014 11:44, Axel Davy a écrit : On 02/12/2014 20:53, Mario Kleiner wrote : targetSBC == 0 is a special case, which asks the function to block until all pending OpenGL bufferswap requests have completed. Currently the function just falls through

Re: [Mesa-dev] [PATCH] radeonsi: implement legacy RCP behavior to fix Unreal engine demos

2014-12-04 Thread Roland Scheidegger
Am 04.12.2014 um 20:49 schrieb Marek Olšák: > I agree that this should be fixed properly, but my time is limited at > the moment. We know there's a problem with our shader backend, because > there are issues with other games too. We can fix it later and we > certainly won't forget about it. > > No

Re: [Mesa-dev] [PATCH] radeonsi: implement legacy RCP behavior to fix Unreal engine demos

2014-12-04 Thread Jose Fonseca
I certainly don't want to deter you from pushing a quick fix now. If possible I'd just like any further information you might have collected while debugging this issue in the hope we can figure out a more comprehensive solution should be. Because I'm sure other drivers (including VMware's svg

Re: [Mesa-dev] [PATCH] radeonsi: implement legacy RCP behavior to fix Unreal engine demos

2014-12-04 Thread Marek Olšák
I agree that this should be fixed properly, but my time is limited at the moment. We know there's a problem with our shader backend, because there are issues with other games too. We can fix it later and we certainly won't forget about it. Note that r600g is using a lot of these non-standard legac

Re: [Mesa-dev] [PATCH] mesa: expose GL_EXT_texture_sRGB_decode in ES2 contexts

2014-12-04 Thread Ilia Mirkin
Oh hm. Apparently EXT_sRGB is required for this [or ES3, but that's not available on the driver I'm interested quite yet]. I'll see if that can be added easily. On Thu, Dec 4, 2014 at 12:42 PM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > > https://www.opengl.org/registry/specs/EXT/te

Re: [Mesa-dev] [PATCH] i965/skl: Fix GS thread count location

2014-12-04 Thread Kristian Høgsberg
On Wed, Dec 3, 2014 at 3:53 PM, Ben Widawsky wrote: > SKL moves the GS threadcount to dw8 from dw7, and no longer does the divide > by 2 > thing. > > Only compile test. > > Cc: Kristian Høgsberg > Signed-off-by: Ben Widawsky > --- > src/mesa/drivers/dri/i965/gen8_gs_state.c | 29 ++

Re: [Mesa-dev] [PATCH] radeonsi: implement legacy RCP behavior to fix Unreal engine demos

2014-12-04 Thread Roland Scheidegger
The problem is, while glsl was quite lenient in older versions wrt precision or things like div by zero, starting with glsl 4.10 you are _required_ to return +-/Inf for divs by zero. Hence if you use hacks here to make some app run, you _will_ have to fix that properly in the future in any case. (T

[Mesa-dev] [Bug 84186] X 1.16.1 RC 1 segfaults and reports "XXX fail to create fbo" with Radeon HD 7970.

2014-12-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84186 Mathias Brodala changed: What|Removed |Added CC|i...@noctus.net | -- You are receiving this mail becau

Re: [Mesa-dev] [PATCH] radeonsi: implement legacy RCP behavior to fix Unreal engine demos

2014-12-04 Thread Jose Fonseca
I'm also concerned this sort of ad-hoc re-interpretation of opcode semantics will come to bytes us later, as different state trackers might want different semantics. I think we might need to redefine TGSI_OPCODE_RCP opcode or introduce a TGSI_OPCODE_RCP_LEGACY opcode. Also, do we know exactl

Re: [Mesa-dev] [PATCH] radeonsi: implement legacy RCP behavior to fix Unreal engine demos

2014-12-04 Thread Marek Olšák
Returning FLT_MAX instead of 0 also works, which is similar to another hw instruction: V_RCP_CLAMP_F32. The Unreal engine is a pretty big target with a lot of apps out there. I'm afraid a driconf option isn't feasible. Marek On Thu, Dec 4, 2014 at 5:39 PM, Roland Scheidegger wrote: > Hmm I have

[Mesa-dev] [PATCH] mesa: expose GL_EXT_texture_sRGB_decode in ES2 contexts

2014-12-04 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- https://www.opengl.org/registry/specs/EXT/texture_sRGB_decode.txt Explicitly talks about ES, other drivers seem to expose it. Not sure about ES1. src/mesa/main/extensions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/extensio

  1   2   >