summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-10-04radeonsi: always compile shaders on demandMarek Olšák1-13/+3
The first compiled shader is sometimes useless, because the key doesn't match the key for the draw call where it's used. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-10-04radeonsi: remove unused variable si_shader::gs_input_primMarek Olšák2-3/+0
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-10-04tgsi: remove some not so useful variables from tgsi_shader_infoMarek Olšák6-20/+14
2014-10-04radeonsi: get fs_write_all from tgsi_shader_info directlyMarek Olšák3-16/+3
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-10-04tgsi: simplify shader properties in tgsi_shader_infoMarek Olšák9-136/+70
Use an array of properties indexed by TGSI_PROPERTY_* definitions.
2014-10-04radeonsi: get tgsi_shader_info only once before compilationMarek Olšák3-21/+16
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-10-04gallium/util: add util_bitcount64Marek Olšák1-0/+12
I'll need this in radeonsi. v2: use __builtin_popcountll if available Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-10-04radeonsi: fix CS tracing and remove excessive CS dumpingMarek Olšák3-35/+25
2014-10-03gk110/ir: add dnz flag emission for fmul/fmadIlia Mirkin1-0/+4
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
2014-10-03gm107/ir: add dnz emission for fmulIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3" <mesa-stable@lists.freedesktop.org>
2014-10-03st/wgl: add WINAPI qualifiers on wgl function typedefsBrian Paul1-2/+2
Fixes a release build segfault when wglCreateContextAttribsARB() calls the wglCreateContext() function. Cc: "10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by: Matthew McClure <mcclurem@vmware.com>
2014-10-03freedreno: query fixesRob Clark3-8/+13
Fixes a few issues, including a potential empty-IB (which triggers gpu hangs in piglit occlusion_query_meta_no_fragments) Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-03freedreno/a3xx: handle VS only outputting BCOLORRob Clark1-2/+10
Possibly we should map the front color to black (zeroes). But not sure there is a way to do that without generating a shader variant. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-03freedreno/ir3: fix lockups with lame FRAG shadersRob Clark4-6/+17
Shaders like: FRAG PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1 DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0], LOCAL IMM[0] FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D 1: MOV OUT[0], IMM[0].xyxx 2: END cause unhappyness. They have an IN[], but once this is compiled the useless TEX instruction goes away. Leaving a varying that is never fetched, which makes the hw unhappy. In the process fix a signed vs unsigned compare. If the vertex shader has max_reg=-1, MAX2() vs an unsigned would not give the desired result. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-03i965/compaction: Disable compaction on SNB temporarily.Matt Turner1-0/+6
Will investigate after XDC.
2014-10-03Revert "i965: Emit ELSE/ENDIF JIP with type D on Gen 7."Matt Turner1-2/+2
This reverts commit 54e30dbf4db437748509d1319c3f6e4185f76c69. Will investigate after XDC. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84557
2014-10-03i965/fs: Remove dead generate_rep_fb_write prototype.Matt Turner1-1/+0
Added in commit f9dc7aab.
2014-10-03mesa: fix spurious wglGetProcAddress / GL_INVALID_OPERATION errorBrian Paul1-1/+35
On Windows, the Piglit primitive-restart test was failing a glGetError()==0 assertion when it was run w/out any command line arguments. Piglit's all.py script only runs primitive-restart with arguments so this case isn't normally hit during a full piglit run. The basic problem is Microsoft's opengl32.dll calls glFlush from wglGetProcAddress() and Piglit uses wglGetProcAddress() to resolve glPrimitiveRestartNV() which is called inside glBegin/End. See comments in the code for more info. Plus, improve the comments for _mesa_alloc_dispatch_table(). Cc: <mesa-stable@lists.freedesktop.org> Acked-by: Sinclair Yeh <syeh@vmware.com>
2014-10-02freedreno/ir3: add TXF supportIlia Mirkin1-1/+39
Still failing a bunch of the fairly picky texelFetch tests, but the 1D(Array) ones are full passes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add TXD support and expose ARB_shader_texture_lodIlia Mirkin3-9/+56
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add texture offset supportIlia Mirkin1-4/+45
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: shadow comes before arrayIlia Mirkin1-2/+2
Experimentally, this makes *ArrayShadow tex-miplevel-selection tests pass. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: make TXQ return integers, not floatsIlia Mirkin1-1/+1
We're still doing something wrong for array textures. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add UMAD supportIlia Mirkin1-4/+15
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add ISSG supportIlia Mirkin1-0/+39
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add MOD supportIlia Mirkin1-8/+12
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add UMOD support, based on UDIVIlia Mirkin1-6/+31
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02freedreno/ir3: add IDIV/UDIV supportIlia Mirkin1-3/+197
Logic shamelessly copied from nv50 lowering pass. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-03radeonsi: Clear sampler view flags when binding a bufferMichel Dänzer1-0/+5
Fixes assertion failure while running the Unreal Engine 4 Elemental demo: .../si_blit.c:322:si_decompress_color_textures: Assertion `tex->cmask.size || tex->fmask.size' failed. Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-10-02vc4: Add support for framebuffer sRGB encoding.Eric Anholt1-2/+31
2014-10-02vc4: Add support for sampling from sRGB.Eric Anholt2-9/+51
This isn't perfect -- the filtering is happening on the srgb values, and we're decoding afterwards, which is not what you want. I think that's the cause of some additional texwrap(GL_CLAMP, LINEAR) failures, though many other texwrap tests on srgb start to pass since unfiltered values come out correct.
2014-10-02freedreno/ir3: avoid fan-in sources referring to same instructionIlia Mirkin1-2/+10
Since the RA has to be done s.t. each one gets its own (adjacent) register, it would complicate matters if instructions were allowed to be repeated. This enables copy-propagation use in situations where previously that might have happened. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-02freedreno/a3xx: emit all immediates in one shotRob Clark1-8/+16
Makes the command stream a bit tighter when there are lots of immediates. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-02freedreno: instanced drawing/compute not yet supportedIlia Mirkin1-3/+3
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-03mesa: fix GetTexImage for 1D array depth texturesDave Airlie1-2/+7
While running piglit in virgl, I hit an assert in intel driver. "qemu-system-x86_64: intel_tex.c:219: intel_map_texture_image: Assertion `tex_image->TexObject->Target != 0x8C18 || h == 1' failed." Thanks to Eric and Ken for pointing me in the right direction, Fix the get_tex_depth to do the same fixup as get_tex_rgba does for 1D array textures. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-10-03st/mesa: Fix paths used in Android buildsTomasz Figa3-0/+6
With current makefiles the build fails because source and build paths are generated incorrectly. With Android build system the top_srcdir and top_builddir variables are undefined and all paths are relative to where Android.mk is located. This ends up with path likes external/mesa/src/mesa/src/mesa/ for both source and build paths, which are obviously wrong. This patch fixes this by overriding resulting SRCDIR and BUILDDIR variables with empty string, so that paths end up being relative to Android.mk file again. Appending correct build path to generated files is already done in Android.gen.mk. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-10-03st/mesa: Generate format_info.c in Android buildsTomasz Figa1-0/+9
Current Android makefiles lack generation of format_info.c, which is a dependency of main/format.c. This patch adds necessary code to Android.gen.mk. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-10-03util: Include in Android buildsTomasz Figa8-4/+114
This patch fixes Android build failures by including src/util directory in compilation. Files inside of this directory are compiled into libmesa_util static library and linked with resulting libGLES_mesa. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-10-02i965/fs: Use the correct base_mrf for spilling pairs in SIMD8Jason Ekstrand1-3/+4
Before, we were hard-coding the base_mrf based on dispatch width not number of registers spilled at a time. This caused us to emit instructions with a base_mrf or 14 and a mlen of 3 so we used the magical non-existant m16 register. This fixes the problem. Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-10-02i965/fs: Add a MAX_GRF_SIZE define and use it various placesJason Ekstrand4-6/+9
Previously, we had a MAX_SAMPLER_MESSAGE_SIZE which we used instead. However, some FB write messages can validly be longer than this so we need something different. Since MAX_SAMPLER_MESSAGE_SIZE is validly useful on its own, we leave it alone and add a new MAX_GRF_SIZE that's big enough for FB writes. Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84539 Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-10-02i965/fs: Use the actual regsister width in brw_reg_from_fs_regJason Ekstrand1-0/+13
This fixes a bug where 1-wide operations don't properly translate down to 1-wide instructions. Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-10-02i965/fs_fp: Use null_reg from fs_visitor instead of rolling our ownJason Ekstrand1-6/+4
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84529 Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-10-02freedreno/a3xx: handle large shader program sizesRob Clark1-11/+63
Above a certain limit use CACHE mode instead of BUFFER mode. This should solve gpu hangs with large shader programs. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-02freedreno: update generated headersRob Clark4-8/+9
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-02freedreno: dual-source render targets are not supportedIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-02gallium/hud: use u_sampler_view_default_template helperIlia Mirkin1-6/+3
The existing code was not setting several fields, most importantly the target, which is required on nv50/nvc0. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-10-02glsl: Fix memory leak in builtin_builder::_image_prototype.Iago Toral Quiroga1-3/+5
in_var calls the ir_variable constructor, which dups the variable name. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-10-02mesa: relax draw api validation on ES2Tapani Pälli1-3/+2
Patch fixes failing test in WebGL conformance test 'point-no-attributes' when running Chrome on OpenGL ES. (Shader program may draw points using constant data in shader.) No Piglit regressions. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-10-02glsl: make consistent use of DECLARE_RALLOC_CXX_OPERATORSIlia Mirkin2-47/+3
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-10-01vc4: Fix the mapping of the minification filter to HW values.Eric Anholt1-8/+8
They're actually as documented in the HW specs and the GL mipmapping enums order. Fixes fbo-generatemipmap-filtering , and some other tests where we were off by a few bits due to unexpected linear filtering.