aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* glsl: Change locations from yylloc to appropriate tokens positions.Sir Anthony2014-03-081-101/+114
| | | | Reviewed-by: Carl Worth <cworth@cworth.org>
* glsl: Add ast_node method to set location range.Sir Anthony2014-03-081-0/+14
| | | | Reviewed-by: Carl Worth <cworth@cworth.org>
* glsl: Make ast_node location comments more informative.Sir Anthony2014-03-081-4/+4
| | | | Reviewed-by: Carl Worth <cworth@cworth.org>
* glsl: Extend ast location structure to hande end token position.Sir Anthony2014-03-082-11/+17
| | | | Reviewed-by: Carl Worth <cworth@cworth.org>
* glsl: Update lexers in glsl and glcpp to hande end position of token.Sir Anthony2014-03-082-2/+4
| | | | Reviewed-by: Carl Worth <cworth@cworth.org>
* scons: Add drivers/common/meta_generate_mipmap.c to src/mesa/SConscript.Vinson Lee2014-03-071-1/+2
| | | | | | | | | | This patch fixes this SCons build error introduced with commit 70e7905608b374f65d1f4b657f8ab61808c76ef6. build/linux-x86_64-debug/mesa/libmesa.a(driverfuncs.os): In function `_mesa_init_driver_functions': src/mesa/drivers/common/driverfuncs.c:99: undefined reference to `_mesa_meta_GenerateMipmap' Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* meta: Support GenerateMipmaps on 1DArray textures.Kenneth Graunke2014-03-071-9/+33
| | | | | | | | | | | | | | | | I don't know how many people care about this case, but it's easy enough to do, so we may as well. The tricky part is that for some reason Mesa stores the number of array slices in Height, not Depth. I thought the easiest way to handle that here was to make Height = 1 (the actual height), and srcDepth = srcImage->Height. This requires some munging when calling _mesa_prepare_mipmap_level, so I created a wrapper that sorts it out for us. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Use srcWidth/Height/Depth rather than srcImage->Width and such.Kenneth Graunke2014-03-071-3/+3
| | | | | | | | | This is equivalent for now, and will differ once we add 1DArray support. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Support GenerateMipmaps on 2DArray textures.Kenneth Graunke2014-03-071-35/+34
| | | | | | | | | | | | | | | | | | | | | This is largely a matter of looping over the number of slices/layers, and not minifying depth (presumably that code exists for the unfinished 3D texture support). Normally, I would have made the loop over array slices the outermost loop. I suspect that would make it trickier to support 3D textures someday, though, so I didn't. The advantage is that we would only have one BufferData call per slice, rather than one per miplevel and slice. However, a GenerateMipmaps microbenchmark indicates that either way is basically just as fast. So I'm not sure it's worth bothering. Improves performance in a GenerateMipmaps microbenchmark by nearly 5x. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Add a 'layer' argument to bind_fbo_image().Kenneth Graunke2014-03-071-9/+11
| | | | | | | | | | For array textures and 3D textures, this represents the layer to use. Just pass 0 for now. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Refactor code for binding a texture image to the FBO.Kenneth Graunke2014-03-071-46/+35
| | | | | | | | | | | Almost the exact same code appeared twice, and it needs to expand to handle additional texture targets. Refactor it to tidy up the code and avoid duplicating more work in the future. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Use minify() in GenerateMipmaps code.Kenneth Graunke2014-03-071-3/+3
| | | | | | | | | This is what the macro is for. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Drop redundant FBO creation code in GenerateMipmaps.Kenneth Graunke2014-03-071-4/+1
| | | | | | | | | | fallback_required() already creates the FBO in order to check whether we can render to the format. So it's guaranteed to exist. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Replace GLboolean with bool in fallback_required().Kenneth Graunke2014-03-071-7/+7
| | | | | | | | | This doesn't interact with the GL API, so we shouldn't use GL types. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Make _mesa_meta_check_generate_mipmap_fallback static.Kenneth Graunke2014-03-072-8/+4
| | | | | | | | | | This was only ever used in one place; there's no reason for it to be non-static. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: Split GenerateMipmap() into its own file.Kenneth Graunke2014-03-074-337/+377
| | | | | | | | | | Putting the implementation of each GL function in its own file makes it much easier not to get lost. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* meta: De-static setup_texture_coords().Kenneth Graunke2014-03-072-23/+34
| | | | | | | | | This will be used in multiple files soon. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glapi: Add KHR_debug.xmlTimothy Arceri2014-03-081-0/+150
|
* mesa: add missing DebugMessageControl typesTimothy Arceri2014-03-081-0/+2
| | | | | Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: make ARB_debug_output functions an alias ofTimothy Arceri2014-03-085-254/+92
| | | | | | | | | | | | | KHR_debug Also update dispatch sanity removing ARB_debug_output checks and removing KHR_debug placeholders as the checks have already been added V2: Make sure we exit case statements with conditional breaks rather than just dropping through. Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
* glapi: move KHR_debug into its own fileTimothy Arceri2014-03-081-143/+1
| | | | | Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
* glx_pbuffer: Refactor GetDrawableAttributeAdel Gadllah2014-03-071-5/+6
| | | | | | | | Move the pdraw != NULL check out so that they don't have to be duplicated. Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* radeon: Include radeon_elf_util.c in the list of LLVM_C_FILES v2Tom Stellard2014-03-072-1/+2
| | | | | | | | | | | | | | | | | This fixes the a build breakage caused by 6974eb907600b9d0176d3158ff0fd30ac3e56a55 on build configurations where all the following are true: 1. radeonsi is not being built 2. r600g is being built 3. opencl is disabled 4. --enable-r600-llvm-compiler is not being used 5. libelf is not installed v2: - Add $(RADEON_CFLAGS) to libllvmradeon_la_CFLAGS Tested-by: Brian Paul <brianp@vmware.com>
* st/mesa: only mark framebuffer as sRGB capable if Mesa supports the formatBrian Paul2014-03-071-2/+3
| | | | | Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* radeon/llvm: Factor elf parsing code out into its own functionTom Stellard2014-03-074-51/+132
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeon: Rename struct radeon_llvm_binary to radeon_shader_binary v2Tom Stellard2014-03-075-12/+23
| | | | | | | | | | And move its definition into r600_pipe_common.h; This struct is a just a container for shader code and has nothing to do with LLVM. v2: - Drop unrelated Makefile change Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium: rename R4A4 and A4R4 formats to match their swizzleMarek Olšák2014-03-076-12/+11
| | | | | | Like L4A4. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: fix the format of glEdgeFlagPointerMarek Olšák2014-03-071-2/+2
| | | | | | | | | | | Softpipe expects a float in the vertex shader, which is what glEdgeFlag generates. This fixes piglit/gl-2.0-edgeflag. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* radeonsi: fix blit compressed texture workaround to support 2D arraysMarek Olšák2014-03-071-1/+2
| | | | | | We don't have a piglit test for this, but I think it's correct. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* r600g: fix blitting the last 2 mipmap levels for EvergreenMarek Olšák2014-03-073-13/+36
| | | | | | | | This fixes a lot of compressedteximage piglit tests. R600-R700 don't have this issue. Cc: mesa-stable@lists.freedesktop.org
* r600g: fix texelFetchOffset GLSL functionsMarek Olšák2014-03-071-10/+77
| | | | Cc: mesa-stable@lists.freedesktop.org
* winsys/radeon: if there's VRAM-only usage, keep itMarek Olšák2014-03-071-12/+28
|
* radeon: Use upload manager for buffer downloadsNiels Ole Salscheider2014-03-071-18/+56
| | | | | | | Using DMA for reads is much faster. Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de> Signed-off by: Marek Olšák <marek.olsak@amd.com>
* glapi: use 'Mesa' in error messagesBrian Paul2014-03-071-3/+3
| | | | | | | A user would have no idea what "_glthread_" is. This removes the last remaining instance of the _glthread_ string in Mesa. Reviewed-by: Chia-I Wu <olv@lunarg.com>
* st/mesa: add test_format_conversion() debug functionBrian Paul2014-03-071-1/+43
| | | | | | | | | | | To check that the st_mesa_format_to_pipe_format() and st_pipe_format_to_mesa_format() functions correctly convert all corresponding Mesa/Gallium formats. This found that MESA_FORMAT_YCBCR_REV was missing in st_mesa_format_to_pipe_format(). Fixed that too. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/mesa: add MESA_FORMAT_R8G8B8A8_SRGB in st_mesa_format_to_pipe_format()Brian Paul2014-03-071-0/+2
| | | | | | v2: rename patch after rebasing on top of Jose's changes. Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
* mesa/st: Fix PIPE_FORMAT_R8G8B8A8_SRGB -> MESA_FORMAT_ conversion.José Fonseca2014-03-071-1/+1
| | | | | | | | | Copy'n'past typo introduced in my 1d8e3067fd9ce72b3711fc208409ac4a7cff4e53 commit. This fixes swapped RB channels I was seeing in my test machines. Trivial.
* st/vdpau: Add rotation v2Kusanagi Kouichi2014-03-071-0/+6
| | | | | | | v2: add static asserts Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Reviewed-by: Christian König <christian.koenig@amd.com>
* vl: Add rotation v3Kusanagi Kouichi2014-03-072-12/+107
| | | | | | | | | v2: rotate in gen_rect_verts instead v3: clear rotate in vl_compositor_clear_layers, update calc_drawn_area as well Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Signed-off-by: Christian König <christian.koenig@amd.com>
* st/omx/enc: fix crash on destructionChristian König2014-03-071-8/+15
| | | | Signed-off-by: Christian König <christian.koenig@amd.com>
* mesa: Drop unused hash_table::mem_ctx field.Kenneth Graunke2014-03-063-3/+0
| | | | | | | | It's never used, and it's equivalent to ralloc_parent(ht) if you really need it. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* clover: Fix build against LLVM SVN r203065 or newerMichel Dänzer2014-03-071-0/+4
| | | | | | llvm/Linker.h was moved to llvm/Linker/Linker.h. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
* mesa: add MESA_FORMAT_R8G8B8A8_SRGBBrian Paul2014-03-067-0/+79
| | | | | | | | To match PIPE_FORMAT_R8G8B8A8_SRGB. v2: fix component name copy&paste bugs Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: Wrap SSE4.1 code in #ifdef __SSE4_1__.Matt Turner2014-03-061-0/+3
| | | | | | | | Because people insist on doing things like explicitly disabling SSE 4.1. Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org> Tested-by: David Heidelberger <david.heidelberger@ixit.cz> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71547
* i965: Fix render-to-texture in non-FinishRenderTexture cases.Eric Anholt2014-03-067-27/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've had several problems now with FinishRenderTexture not getting called enough, and we're ready to just give up on it ever doing what we need. In particular, an upcoming Steam title had rendering bugs that could be fixed by always_flush_cache=true. Instead of hoping Mesa core can figure out when we need to flush our caches, just track what BOs we've rendered to in a set, and when we render from a BO in that set, emit a flush and clear the set. There's some overhead to keeping this set, but most of that is just hashing the pointer -- it turns out our set never even gets very large, because cache flushes are so common (even on cairo-gl). No statistically significant performance difference in cairo-gl (n=100), despite spending ~.5% CPU in these set operations. v1: (Original patch by Eric Anholt.) v2: (Changes by Ken Graunke.) - Rebase forward from May 7th 2013 -> March 4th 2014. - Drop the FinishRenderTexture hook entirely; after rebasing the patch, the hook was just an empty function. - Move the brw_render_cache_set_clear() call from intel_batchbuffer_emit_flush() to brw_emit_pipe_control_flush(). In theory, this could catch more cases where we've flushed. - Consider stencil as a possible texturing source. v3: (changes by anholt): - Move set_clear() back to emit_mi_flush() -- it means we can drop more forced flushes from the code. In the previous location, it wouldn't have been called when we wanted pre-gen6. - Move the set clear from batch init to reset -- it should be empty at the start of every batch, since the kernel handled any inter-batch flush for us. v4: Drop the debug code in set.c that I accidentally committed. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Dylan Baker <baker.dylan.c@gmail.com> [v2]
* mesa: fix copy & paste bugs in pack_ubyte_SRGB8()Brian Paul2014-03-061-2/+2
| | | | | Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: fix copy & paste bugs in pack_ubyte_SARGB8()Brian Paul2014-03-061-2/+2
| | | | | Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/util: Fix memory leakAaron Watry2014-03-061-0/+2
| | | | | | | | | | Fix a leaked vertex shader in u_blitter.c Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> CC: "10.1" <mesa-stable@lists.freedesktop.org>
* st/mesa: Add R8G8B8A8_SRGB case to st_pipe_format_to_mesa_format.José Fonseca2014-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the recent SRGB changes all my automated OpenGL llvmpipe tests (piglit, conform, glretrace) start asserting with the backtrace below. I'm hoping this change will fix it. I'm not entirely sure, as this doesn't happen in my development machine (the bug probably depends on the exact X visual). Anyway, it seems the sensible thing to do here. Program terminated with signal 5, Trace/breakpoint trap. #0 _debug_assert_fail (expr=expr@entry=0x7fa324df2ed7 "0", file=file@entry=0x7fa324e3fc30 "src/mesa/state_tracker/st_format.c", line=line@entry=758, function=function@entry=0x7fa324e40160 <__func__.34798> "st_pipe_format_to_mesa_format") at src/gallium/auxiliary/util/u_debug.c:281 #0 _debug_assert_fail (expr=expr@entry=0x7fa324df2ed7 "0", file=file@entry=0x7fa324e3fc30 "src/mesa/state_tracker/st_format.c", line=line@entry=758, function=function@entry=0x7fa324e40160 <__func__.34798> "st_pipe_format_to_mesa_format") at src/gallium/auxiliary/util/u_debug.c:281 No locals. #1 0x00007fa3241d22b3 in st_pipe_format_to_mesa_format (format=format@entry=PIPE_FORMAT_R8G8B8A8_SRGB) at src/mesa/state_tracker/st_format.c:758 __func__ = "st_pipe_format_to_mesa_format" #2 0x00007fa3241c8ec5 in st_new_renderbuffer_fb (format=format@entry=PIPE_FORMAT_R8G8B8A8_SRGB, samples=0, sw=<optimised out>) at src/mesa/state_tracker/st_cb_fbo.c:295 strb = 0x19e8420 #3 0x00007fa32409d355 in st_framebuffer_add_renderbuffer (stfb=stfb@entry=0x19e7fa0, idx=<optimised out>) at src/mesa/state_tracker/st_manager.c:314 rb = <optimised out> format = PIPE_FORMAT_R8G8B8A8_SRGB sw = <optimised out> #4 0x00007fa32409e635 in st_framebuffer_create (st=0x19e7fa0, st=0x19e7fa0, stfbi=0x19e7a30) at src/mesa/state_tracker/st_manager.c:458 stfb = 0x19e7fa0 mode = {rgbMode = 1 '\001', floatMode = 0 '\000', colorIndexMode = 0 '\000', doubleBufferMode = 0, stereoMode = 0, haveAccumBuffer = 0 '\000', haveDepthBuffer = 1 '\001', haveStencilBuffer = 1 '\001', redBits = 8, greenBits = 8, blueBits = 8, alphaBits = 8, redMask = 0, greenMask = 0, blueMask = 0, alphaMask = 0, rgbBits = 32, indexBits = 0, accumRedBits = 0, accumGreenBits = 0, accumBlueBits = 0, accumAlphaBits = 0, depthBits = 24, stencilBits = 8, numAuxBuffers = 0, level = 0, visualRating = 0, transparentPixel = 0, transparentRed = 0, transparentGreen = 0, transparentBlue = 0, transparentAlpha = 0, transparentIndex = 0, sampleBuffers = 0, samples = 0, maxPbufferWidth = 0, maxPbufferHeight = 0, maxPbufferPixels = 0, optimalPbufferWidth = 0, optimalPbufferHeight = 0, swapMethod = 0, bindToTextureRgb = 0, bindToTextureRgba = 0, bindToMipmapTexture = 0, bindToTextureTargets = 0, yInverted = 0, sRGBCapable = 1} idx = <optimised out> #5 st_framebuffer_reuse_or_create (st=st@entry=0x19dfce0, fb=<optimised out>, stfbi=stfbi@entry=0x19e7a30) at src/mesa/state_tracker/st_manager.c:728 No locals. #6 0x00007fa32409e8cc in st_api_make_current (stapi=<optimised out>, stctxi=0x19dfce0, stdrawi=0x19e7a30, streadi=0x19e7a30) at src/mesa/state_tracker/st_manager.c:747 st = 0x19dfce0 stdraw = 0x640064 stread = 0x1300000006 ret = <optimised out> #7 0x00007fa324074a20 in XMesaMakeCurrent2 (c=c@entry=0x195bb00, drawBuffer=0x19e7e90, readBuffer=0x19e7e90) at src/gallium/state_trackers/glx/xlib/xm_api.c:1194 No locals. #8 0x00007fa3240783c8 in glXMakeContextCurrent (dpy=0x194e900, draw=8388610, read=8388610, ctx=0x195bac0) at src/gallium/state_trackers/glx/xlib/glx_api.c:1177 drawBuffer = <optimised out> readBuffer = <optimised out> xmctx = 0x195bb00 glxCtx = 0x195bac0 firsttime = 0 '\000' no_rast = 0 '\000' #9 0x00007fa32407852f in glXMakeCurrent (dpy=<optimised out>, drawable=<optimised out>, ctx=<optimised out>) at src/gallium/state_trackers/glx/xlib/glx_api.c:1211 No locals. Acked-by: Brian Paul <brianp@vmware.com>
* glapi: remove u_mutex wrapper code, use c99 thread mutexes directlyBrian Paul2014-03-065-24/+14
| | | | | | v2: fix initializer mistake spotted by Chia-I Wu. Reviewed-by: Chia-I Wu <olv@lunarg.com>