summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* r600g: Implement sm5 interpolation functionsGlenn Kennard2014-10-282-3/+237
| | | | | | Requires evergreen/cayman Signed-off-by: Glenn Kennard <[email protected]>
* mesa: Add support for the GL_KHR_context_flush_control extensionNeil Roberts2014-10-286-2/+27
| | | | | | | | | | | | | | The GL side of this extension just provides an accessor via glGetIntegerv for the value of GL_CONTEXT_RELEASE_BEHAVIOR so it is trivial to implement. There is a constant on the context for the value of the enum which is initialised to GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH. The extension is always enabled because it doesn't need any driver interaction to retrieve the value. If the value of the enum is anything but FLUSH then _mesa_make_current will now refrain from calling _mesa_flush. This should only affect drivers that explicitly change the enum to a non-default value. Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Don't set dependency hints on instructions with spilled destinationsJason Ekstrand2014-10-271-0/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Make scratch write instructions use the correct execution sizeJason Ekstrand2014-10-271-1/+1
| | | | Reviewed-by: Kristian Høgsberg <[email protected]>
* i965/fs: Use correct spill offsetsJason Ekstrand2014-10-271-6/+5
| | | | | | | | | | | | Different platforms require the offset to be in different units. However, the generator fixes all of this up for us and only requires an offset in bytes. Previously, we were getting this wrong all over the place. Some computed/used it correctly as bytes while others treated the offset as whole registers or computed it as bytes or bytes*2 in SIMD16 mode. This commit cleans all this up and makes us properly treat it as bytes everywhere. Reviewed-by: Kristian Høgsberg <[email protected]>
* i965: Use the spill destination for the message header on GEN >= 7Jason Ekstrand2014-10-271-6/+13
| | | | Reviewed-by: Kristian Høgsberg <[email protected]>
* i965/fs: Don't [un]spill multiple registers at a time in SIMD8 modeJason Ekstrand2014-10-271-2/+4
| | | | | | | | | I thought this would be a clever way to make spilling less expensive. However, it appears that the oword read/write messages we are using for spilling ignore the execution size and assume SIMD16 whenever working with more than one register. Reviewed-by: Kristian Høgsberg <[email protected]>
* i965/fs: Use instruction execution sizes when generating scratch reads/writesJason Ekstrand2014-10-271-4/+4
| | | | Reviewed-by: Kristian Høgsberg <[email protected]>
* egl/drm: do not crash when swapping buffers without any renderingLionel Landwerlin2014-10-271-0/+8
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* nv50: handle inverted render conditionsTobias Klausmann2014-10-264-10/+51
| | | | | | | This enables ARB_conditional_render_inverted. Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: consider instruction neighbors in cpRob Clark2014-10-252-11/+178
| | | | | | | | | | | | | | | | | Fanin (merge) nodes require it's srcs to be "adjacent" in consecutive scalar registers. Keep track of instruction neighbors in copy- propagation step and avoid eliminating mov's which would cause an instruction to need multiple distinct left and/or right neighbors. This lets us not fall on our face when we encounter things like: 1: MOV TEMP[2], IN[0].xyzw 2: TEX OUT[0].xy, TEMP[2], SAMP[0], SHADOW2D 3: MOV TEMP[2].xy, IN[0].yxzz 4: TEX OUT[0].zw, TEMP[2], SAMP[0], SHADOW2D 5: END Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: always mov tex coordsRob Clark2014-10-251-54/+30
| | | | | | | | | | | | | | | | Always insert extra mov's for the tex coord into the fanin. This simplifies things a bit, and avoids a scenario where multiple sam instructions can have mutually exclusive input's to it's fanin, for example: 1: TEX OUT[0].xy, IN[0].xyxx, SAMP[0], 2D 2: TEX OUT[0].zw, IN[0].yxxx, SAMP[0], 2D The CP pass can always remove the mov's that are not actually needed, so better to start out with too many mov's in the front end, than not enough. Signed-off-by: Rob Clark <[email protected]>
* freedreno: rename a couple debug flagsRob Clark2014-10-253-7/+7
| | | | | | | | | dscis -> noscis dbypass -> nobypass a bit more consistant w/ nobin, etc. And IMO a bit more sensible names. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: skip virtual outputs in standalone compilerRob Clark2014-10-251-0/+3
| | | | | | | Kills get added to the outputs list, to ensure they get scheduled. But they aren't *really* outputs so skip them in the header comment block. Signed-off-by: Rob Clark <[email protected]>
* glx: Fix make check.Mathias Fröhlich2014-10-251-1/+1
| | | | | | | This fixes https://bugs.freedesktop.org/show_bug.cgi?id=85429. Signed-off-by: Ian Romanick <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Add ARB_clip_control.xml to automake.Mathias Fröhlich2014-10-251-0/+1
| | | | | | | Adding this makes 'make check' catch failures introduced from within ARB_clip_control.xml earlier. Signed-off-by: Mathias Froehlich <[email protected]>
* freedreno/ir3: standalone compiler updates for ir3testRob Clark2014-10-254-18/+51
| | | | | | | | | | | | | | | In order to test compiler changes more easily, spit out the assembled shader with some header information so that we can know about inputs/outputs more easily. See: git://people.freedesktop.org/~robclark/ir3test In ir3test we have a big collection of tgsi shaders and reference ir3_compiler outputs. When making compiler changes, regenerate the compiler outputs and feed to ir3test to compare the new vs reference shader. Signed-off-by: Rob Clark <[email protected]>
* ilo: improve blob decodingChia-I Wu2014-10-251-8/+31
| | | | | | | The last few dwords were skipped if the total number of dwords was not a multiple of 4. Change the formatting for better readability. Signed-off-by: Chia-I Wu <[email protected]>
* i965: Skip recalculating URB allocations if the entry size didn't change.Eric Anholt2014-10-244-5/+19
| | | | | | | | | We only get here if the VS/GS compiled programs change, but we can even skip it if the VS/GS size didn't change. Affects cairo runtime on glamor by -1.26471% +/- 0.674335% (n=234) Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Standardize names and fix typosAndres Gomez2014-10-242-7/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Silence unused parameter warning in brw_dump_irIan Romanick2014-10-245-7/+5
| | | | | | | | | | | | Just remove the parameter. Silences: brw_program.c: In function 'brw_dump_ir': brw_program.c:566:33: warning: unused parameter 'brw' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove brwIsProgramNativeIan Romanick2014-10-241-9/+0
| | | | | | | | | | | | | | | Originally I just fixed some unused parameter warnings in this function. However, Ken pointed out: "You could instead remove this driver hook. If the dd pointer is NULL, arbprogram.c will return true. I think I'd prefer that." Way, way back in time, I think _mesa_GetProgramivARB had the opposite behavior. Given that it works the way it now works, I also prefer removing the driver hook. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Silence unused parameter warning in _mesa_init_shader_programIan Romanick2014-10-243-7/+6
| | | | | | | | | | | Just remove the parameter. Silences: ../../src/mesa/main/uniform_query.cpp:1062:1: warning: unused parameter 'ctx' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove context parameter from dd_function_table::NewShaderProgramIan Romanick2014-10-244-5/+4
| | | | | | | | | | This fixes some unused parameter warnings introduced by the previous commit. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make _mesa_init_shader_program staticIan Romanick2014-10-242-6/+3
| | | | | | | | | | Since a couple commits ago, there is only one caller, and that caller is in the same file. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove context parameter from _mesa_init_shader_programIan Romanick2014-10-242-3/+3
| | | | | | | | | | | | | | | Silences: ../../src/mesa/main/shaderobj.c: In function '_mesa_init_shader_program': ../../src/mesa/main/shaderobj.c:239:46: warning: unused parameter 'ctx' [-Wunused-parameter] For now, this adds a couple other unused parameter warnings, but future patches will clean those up. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl_to_tgsi: Remove st_new_shaderIan Romanick2014-10-243-19/+0
| | | | | | | | | | | It was identical to the default implementation in _mesa_new_shader. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Dave Airlie <[email protected]>
* glsl_to_tgsi: Remove st_new_shader_programIan Romanick2014-10-243-16/+0
| | | | | | | | | | | | It was identical to the default implementation in _mesa_new_shader_program. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Dave Airlie <[email protected]>
* i965: Remove brw_new_shader_programIan Romanick2014-10-243-13/+0
| | | | | | | | | | It was identical to the default implementation in _mesa_new_shader_program. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Silence unused parameter warning in _mesa_clear_shader_program_dataIan Romanick2014-10-246-11/+7
| | | | | | | | | Just remove the parameter. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* linker: Rely on _mesa_clear_shader_program_data to clear link informationIan Romanick2014-10-244-14/+34
| | | | | | | | _mesa_link_shader_program already calls _mesa_clear_shader_program_data before calling link_shaders, so this is already done. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Add some missing clean-up to _mesa_clear_shader_program_dataIan Romanick2014-10-241-1/+14
| | | | | | | | | All of this is already done in link_shaders. More clean-ups coming. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove prototypes for nonexistent functionsIan Romanick2014-10-241-9/+0
| | | | | | | | | | | _mesa_UseShaderProgramEXT, _mesa_ActiveProgramEXT, and _mesa_CreateShaderProgramEXT were all removed when support for GL_EXT_separate_shader_objects was removed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* ff_fragment_shader: Silence unused parameter warning in smearIan Romanick2014-10-241-6/+6
| | | | | | | | | | | Just remove the parameter. Silences: ../../src/mesa/main/ff_fragment_shader.cpp:668:1: warning: unused parameter 'p' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* meta: Only use _mesa_ClipControl if the extension is supportedIan Romanick2014-10-241-4/+7
| | | | | | | | | Fixes many piglit failures on IVB since 85edaa8. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85425 Reviewed-by: Jason Ekstrand <[email protected]> Cc: Mathias Fröhlich <[email protected]>
* i965/fs: Compute q-values for register allocation manuallyJason Ekstrand2014-10-241-2/+56
| | | | | | | | | | | | | | | | | | | | | Previously, we were allowing the register allocation code to do the computation for us in ra_set_finalize. However, the runtime for this computation is O(c^4 * g) where c is the number of classes and g is the number of GRF registers. However, these q-values are directly computable based on the way we lay out our register classes so there is no need for the aweful runtime algorithm. We were doing ok until commit 7210583eb where we bumped the number of register classes from 11 to 16. While startup times don't normally matter, this caused piglit to take 4 times as long to run on Bay Trail. This patch should make generating the ra_set much faster and melt the piglit run times. v2: Fixed a couple of bugs. I have now verified that the same q-values are generated both ways. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Don't interfere with too many base registersJason Ekstrand2014-10-241-2/+2
| | | | | | | | | | | | On older GENs in SIMD16 mode, we were accidentally building too much interference into our register classes. Since everything is divided by 2, the reigster allocator thinks we have 64 base registers instead of 128. The actual GRF mapping still needs to be doubled, but as far as the ra_set is concerned, we only have 64. We were accidentally adding way too much interference. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Properly precolor payload registers on GEN5 in SIMD16Jason Ekstrand2014-10-241-1/+10
| | | | | | | | | | | For GEN6 SIMD16 mode, we have to 2-align all the registers, so we only have the even-numbered ones. This means that we have to divide the register number by 2 when we precolor. This wasn't a problem before because we were setting up the interference between ra_node registers wrong. This will be fixed in the next commit. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Add another use of MAX_VGRF_SIZEJason Ekstrand2014-10-241-1/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* util: Use reg_belongs_to_class instead of BITSET_TESTJason Ekstrand2014-10-241-1/+1
| | | | | | | | | This shouldn't be a functional change since reg_belongs_to_class is just a wrapper around BITSET_TEST. It just makes the code a little easier to read. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* llvmpipe: Ensure the packed input of the lp_test_format is aligned.José Fonseca2014-10-241-2/+10
| | | | | | | | Fixes: - https://bugs.freedesktop.org/show_bug.cgi?id=85377 - http://llvm.org/bugs/show_bug.cgi?id=21365 Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Flush stdout on lp_test_* unit tests.José Fonseca2014-10-242-0/+3
| | | | | | | So that the order of test messages and gallivm/llvmpipe debug output is preserved. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: Enable ARB_clip_control for gallium drivers.Mathias Fröhlich2014-10-242-1/+14
| | | | | | | | | | | | | | | | Gallium should be prepared fine for ARB_clip_control. So enable this and mention it in the release notes. v2: Only enable for drivers announcing the freshly introduced PIPE_CAP_CLIP_HALFZ capability. v3: Use extension enable infrastructure to connect PIPE_CAP_CLIP_HALFZ with ARB_clip_control. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* gallium: introduce PIPE_CAP_CLIP_HALFZ.Mathias Fröhlich2014-10-2415-0/+20
| | | | | | | | | | | | In preparation of ARB_clip_control. Let the driver decide if it supports pipe_rasterizer_state::clip_halfz being set to true. v3: Initially enable on ilo. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]
* mesa: Handle clip control in meta operations.Mathias Fröhlich2014-10-242-0/+9
| | | | | | | | | | | Restore clip control to the default state if MESA_META_VIEWPORT or MESA_META_DEPTH_TEST is requested. v3: Handle clip control state with MESA_META_TRANSFORM. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Implement ARB_clip_control.Mathias Fröhlich2014-10-2413-7/+159
| | | | | | | | | | | | | | | Implement the mesa parts of ARB_clip_control. So far no driver enables this. v3: Restrict getting clip control state to the availability of ARB_clip_control. Move to transformation state. Handle clip control state with the GL_TRANSFORM_BIT. Move _FrontBit update into state.c. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Refactor viewport transform computation.Mathias Fröhlich2014-10-247-61/+73
| | | | | | | | | | This is for preparation of ARB_clip_control. v3: Add comments. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* vc4: Reuse uniform_data/contents indices when making uniforms.Eric Anholt2014-10-241-0/+7
| | | | | | | | | | This allows vc4_opt_cse.c to CSE-away operations involving the same uniform values. total instructions in shared programs: 37341 -> 36906 (-1.16%) instructions in affected programs: 10233 -> 9798 (-4.25%) total uniforms in shared programs: 10523 -> 10320 (-1.93%) uniforms in affected programs: 2467 -> 2264 (-8.23%)
* vc4: When asked to discard-map a whole resource, discard it.Eric Anholt2014-10-241-14/+28
| | | | | | | This saves a bunch of extra flushes when texsubimaging a whole texture that's been used for rendering, or subdataing a whole BO. In particular, this massively reduces the runtime of piglit texture-packed-formats (when the probes have been moved out of the inner loop).
* vc4: Refactor flushing before mapping a BO.Eric Anholt2014-10-243-12/+13
| | | | I'm going to want to make some other decisions here before flushing.