summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs: Implement integer multiply without mul/mach.Matt Turner2015-05-181-28/+66
| | | | | | | Ivybridge and Baytrail can't use mach with 2Q quarter control, so just do it without the accumulator. Stupid accumulator. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Rework compression control selection.Matt Turner2015-05-181-3/+6
| | | | | | | | The next commit uses an add(16) with a UW destination with a stride of 2, which needs compression control since it's writing two registers. The old code would have failed to set compression control correctly. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Support integer multiplication in SIMD16 on Haswell.Matt Turner2015-05-181-5/+47
| | | | | | | Ivybridge (and presumably Baytrail) have a bug that prevents this from working. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Add set_sechalf() method.Matt Turner2015-05-181-0/+10
| | | | | | Used in the next commit. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Unrestrict constant propagation into integer multiply.Matt Turner2015-05-181-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Gen8+'s MUL instruction doesn't ignore the high 16-bits of one source like on earlier platforms, so we can constant propagate into it without worry. Integer multiplies (not into the accumulator, which is done for imul_high) are lowered in lower_integer_multiplication(), so it's safe there as well. On Broadwell, fragment shaders only: total instructions in shared programs: 4377769 -> 4377451 (-0.01%) instructions in affected programs: 48064 -> 47746 (-0.66%) helped: 156 On Broadwell, vertex shaders only: total instructions in shared programs: 2858885 -> 2856313 (-0.09%) instructions in affected programs: 26380 -> 23808 (-9.75%) helped: 134 On Broadwell, vertex shaders only (with INTEL_USE_NIR=1): total instructions in shared programs: 2911688 -> 2865984 (-1.57%) instructions in affected programs: 1421715 -> 1376011 (-3.21%) helped: 6186 Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Lower integer multiplication after optimizations.Matt Turner2015-05-184-64/+70
| | | | | | | | | | | | 32-bit x 32-bit integer multiplication requires multiple instructions until Broadwell. This patch just lets us treat the MUL instruction in the FS backend like it operates on Broadwell, and after optimizations we lower it into a sequence of instructions on older platforms. Doing this will allow us to some extra optimization on integer multiplies. Reviewed-by: Jason Ekstrand <[email protected]>
* gk110/ir: switch to gk104-style sched codes rather than all-in-oneIlia Mirkin2015-05-181-9/+9
| | | | | | Matches change to envydis/envyas tools. Signed-off-by: Ilia Mirkin <[email protected]>
* glsl: add stage references for UBO uniformsTapani Pälli2015-05-181-0/+10
| | | | | | | | Patch marks uniforms inside UBO properly referenced by stages. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsalvez <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90397
* i965: Fix textureSize for Lod > 0 with non-mipmap filtersIago Toral Quiroga2015-05-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, when the MinFilter is GL_LINEAR or GL_NEAREST we hide the actual miplevel count from the hardware (and we avoid re-creating the miptree structure with all the levels), since we don't expect levels other than the base level to be needed. Unfortunately, GLSL's textureSize() function is an exception to this rule. This function takes a lod parameter that we need to use to return the size of the appropriate miplevel (if it exists). The spec only requires that the miplevel exists, so even if the sampler is configured with a linear or nearest MinFilter, as far as the user has uploaded miplevels for the texture, textureSize() should return the appropriate sizes. This patch fixes this by exposing the actual miplevel count for all sampling engine textures while keeping the original implementation for render targets (for render targets textures we do not provide the miplevel count but the actual LOD we are wrting to, so we want to make sure that we make this the base level). Fixes 28 dEQP tests in the following category: dEQP-GLES3.functional.shaders.texture_functions.texturesize.* Reviewed-by: Ben Widawsky <[email protected]>
* mesa: Check the lookup_framebuffer return value in NamedFramebufferRenderbufferFredrik Höglund2015-05-161-0/+2
| | | | | | | Found by Coverity. Reported-by: Ilia Mirkin <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* tgsi/dump: fix declaration printing of tessellation inputs/outputsIlia Mirkin2015-05-161-2/+18
| | | | | | | | mareko: only output second dimension for non-patch semantics Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* tgsi/ureg: allow ureg_dst to have dimension indicesIlia Mirkin2015-05-162-8/+75
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* tgsi/ureg: use correct limit for max input countMarek Olšák2015-05-161-1/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* tgsi/sanity: set implicit in/out array sizes based on patch sizesIlia Mirkin2015-05-161-4/+32
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* tgsi/scan: allow scanning tessellation shadersIlia Mirkin2015-05-161-1/+5
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: disable tessellation shaders for meta opsMarek Olšák2015-05-167-2/+44
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/cso: set NULL shaders at context destructionMarek Olšák2015-05-161-0/+7
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/cso: add support for tessellation shadersMarek Olšák2015-05-162-0/+105
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/u_blitter: disable tessellation for all operationsMarek Olšák2015-05-162-1/+42
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: print vertices_per_patch in util_dump_draw_infoMarek Olšák2015-05-161-0/+2
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* trace: implement new tessellation functionsMarek Olšák2015-05-162-0/+28
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add set_tess_state to configure default tessellation parametersIlia Mirkin2015-05-162-0/+9
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add vertices_per_patch to draw infoIlia Mirkin2015-05-161-0/+2
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add tessellation shader propertiesIlia Mirkin2015-05-164-2/+52
| | | | | | | | v2: Marek: rename tess spacing definitions Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add interfaces for controlling tess program stateIlia Mirkin2015-05-161-0/+10
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: bump shader input and output limitsMarek Olšák2015-05-161-2/+2
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add new semantics for tessellationIlia Mirkin2015-05-163-1/+48
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add new PATCHES primitive typeIlia Mirkin2015-05-162-2/+4
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add tessellation shader typesIlia Mirkin2015-05-165-5/+15
| | | | | | | | v2: Marek: rename shader types Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* glapi: Remove offset from the DTDIan Romanick2015-05-151-1/+0
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Whitespace clean up after the previous commitIan Romanick2015-05-1511-443/+223
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove all offset tags from the XMLIan Romanick2015-05-1560-1289/+1289
| | | | | | | | | | | | | | | | Changes generated by: cd src/mapi/glapi/gen for i in *.xml; do cat $i |\ sed 's/[[:space:]]*offset="[^"]*">/>/' |\ sed 's/[[:space:]]*offset="[^"]*"[[:space:]]*$//' |\ sed 's/[[:space:]]*offset="[^"]*"[[:space:]]*/ /' > x mv x $i done Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Use the offsets from static_data.py instead of from the XMLIan Romanick2015-05-151-17/+5
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* glapi: Add a list of functions that are not used but still need dispatch slotsIan Romanick2015-05-151-0/+56
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove static dispatch for functions that didn't exist in NVIDIAIan Romanick2015-05-151-46/+0
| | | | | | | | | | | | | | | | Comparing the output of nm -D libGL.so.349.16 | grep ' T gl[^X]' | sed 's/.* T //' between Catalyst NVIDIA 349.16 and this commit, the only change is a bunch of functions that NVIDIA exports that Mesa does not. If a function is not statically exported by either of the major binary drivers on Linux, there is almost zero chance that any application statically links with it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove static dispatch for functions that didn't exist in fglrxIan Romanick2015-05-151-121/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing the output of nm -D arch/x86_64/usr/X11R6/lib64/fglrx/fglrx-libGL.so.1.2 |\ grep ' T gl[^X]' | sed 's/.* T //' between Catalyst 14.6 Beta and this commit, the only change is a bunch of functions that AMD exports that Mesa does not and some OpenGL ES 1.1 functions that Mesa exported but AMD does not. The OpenGL ES 1.1 functions (e.g., glAlphaFuncx) are added by extensions in desktop. Our infrastructure doesn't allow us to statically export a function in one lib and not in another. The GLES1 conformance tests expect to be able to link with these functions, so we have to export them. If a function is not statically exported by either of the major binary drivers on Linux, there is almost zero chance that any application statically links with it. As a side note... I find it odd that AMD exports glTextureBarrierNV but not glTextureBarrier. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove static dispatch for functions that didn't exist in 10.3Ian Romanick2015-05-151-1/+0
| | | | | | | | | | | | | | | | | | | Comparing the output of nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //' between 10.3.7 and this commit, the only change is the removal of glFramebufferTextureFaceARB. This function was removed a couple commits previously. glClipControl was, at the time 10.3 shipped, a very new function. It was added by GL_ARB_clip_control. That extension was ratified by the Khronos Board of Promoters on August 7, 2014. It's less than a year old, and I don't think it's is likely that there are many applications using that extension... much less statically linking with the function. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove static dispatch for functions that didn't exist in 10.4Ian Romanick2015-05-151-33/+0
| | | | | | | | | | | | | | | | | | | | | | Comparing the output of nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //' between 10.4.7 and this commit, the only change is the removal of glFramebufferTextureFaceARB. This function was removed a couple commits previously. None of these functions are particuarly new. If applications were not statically linking them with 10.4.7, there's approximately zero chance they will for 10.6. Almost all of these functions are for GL_ARB_direct_state_access. Since the whole DSA API wasn't statically exported (and the extension wasn't enabled!), I think there's exactly zero chance anyone linked against these symbols. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove static dispatch for functions that didn't exist in 10.5Ian Romanick2015-05-151-81/+0
| | | | | | | | | | | | | | | | | Comparing the output of nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //' between 10.5.5 and this commit, the only change is the removal of glFramebufferTextureFaceARB. This function was removed a couple commits previously. None of these functions are particuarly new. If applications were not statically linking them with 10.5.5, there's approximately zero chance they will for 10.6. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Remove static_dispatch from the DTDIan Romanick2015-05-151-1/+0
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Whitespace clean up after the previous commitIan Romanick2015-05-156-210/+112
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* glapi: Remove all static_dispatch tags from the XMLIan Romanick2015-05-1511-288/+288
| | | | | | | | | | | | | | | | | | | | | | | Changes generated by: cd src/mapi/glapi/gen for i in *.xml; do cat $i |\ sed 's/[[:space:]]*static_dispatch="[^"]*">/>/' |\ sed 's/[[:space:]]*static_dispatch="[^"]*"[[:space:]]*$//' |\ sed 's/[[:space:]]*static_dispatch="[^"]*"[[:space:]]*/ /' > x mv x $i done Comparing the output of nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //' before and after this commit showed no differences. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* glapi: Store list of functions with static dispatch in a separate tableIan Romanick2015-05-152-1/+1520
| | | | | | | | | | | | | | | | | The set of functions with static dispatch is (supposed to be) defined by the Linux OpenGL ABI. We export quite a few more functions than that for historical reasons. However, this list should never grow. This table is used instead of the static_dispatch tag in the XML to generate the static dispatch functions. I used nm libGL.so | grep ' T gl[^X]' | sed 's/.* T //' before and after the change. diff showed no differences. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* glapi: Store static dispatch offsets in a separate tableIan Romanick2015-05-153-0/+446
| | | | | | | | | | | | | Since the set of functions with static will never change, there is no reason to store it in the XML. It's just one of those fields that confuses people adding new functions. This is split out from the rest of the series so that in-code assertions can be used to verify that the data in the Python code matches the XML. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* mesa: Remove all vestiges of glFramebufferTextureFaceARBIan Romanick2015-05-154-37/+5
| | | | | | | | | | | | | | | Mesa does not (and probably never will) support GL_ARB_geometry_shader4, so this function will never exist. Having a function that is exec="skip" and offset="assign" is just weird. There are still a couple 'exec="skip" offset="assign"' functions remaining. These remain because we either support GLX protocol for them (glSampleMaskSGIS and glSamplePatternSGIS) or older DRI drivers still need them in the dispatch table (glResizeBuffersMESA). The SGIS functions can be removed later. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glapi: Mark a couple functions "ignore" for GLXIan Romanick2015-05-151-2/+2
| | | | | | | | Without this the next patch will try to put these functions in the dispatch table in indirect_init.c. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/mesa: Flush the bitmap cache in st_BlitFramebufferFredrik Höglund2015-05-151-0/+4
| | | | | | | | | | With DSA we can no longer rely on this being done in st_validate_state in response to the framebuffer bindings having changed. This fixes the ext_framebuffer_multisample-bitmap piglit test. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Fix FS unit testsIan Romanick2015-05-152-2/+4
| | | | | | | | | | | Commit 3687d75 changed the fs_visitor constructors, but it didn't update all the users. As a result, 'make check' fails. I added the explicit cast to the gl_program* parameter to make it more clear which NULL was which. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* target/haiku-softpipe: Move api init into st codeAlexander von Gluck IV2015-05-152-19/+10
| | | | | | | We also reduce the amount of need-to-know information about st_api to require one less extern "C" in st_manager.h Reviewed-by: Brian Paul <[email protected]>
* st/hgl: Move st_api creation to st and extern "C" itAlexander von Gluck IV2015-05-152-8/+22
| | | | Reviewed-by: Brian Paul <[email protected]>