summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix building mesa with assembly enabled since a112ca5dJon TURNEY2012-07-161-2/+3
| | | | | | | | | | | | a112ca5d rather crassly smashed all the compiler flags together into AM_CFLAGS. Separate them out the way they were before, putting pre-processor flags into AM_CPPFLAGS, so assembly source gets preprocessed with the correct pre-processor flags as well. Also, remove unneeded CFLAGS from AM_CFLAGS, and CXXFLAGS from AM_CXXFLAGS Signed-off-by: Jon TURNEY <[email protected]> Tested-by: Brian Paul <[email protected]>
* intel: Fix build broken by ETC1 patchChad Versace2012-07-161-0/+12
| | | | | | | I suck at resolving merge conflicts and broke the build in a5a34b1. This patch adds the missing field intel_mipmap_tree::wraps_etc1. Signed-off-by: Chad Versace <[email protected]>
* intel: Enable GL_OES_compressed_ETC1_RGB8_textureChad Versace2012-07-164-1/+78
| | | | | | | | | | | | | | | Enable it for all hardware. No current hardware supports ETC1, so this patch implements it by translating the ETC1 data to RGBX data during the call to glCompressedTexImage2D(). For details, see the doxygen for intel_mipmap_tree::wraps_etc1. Passes the Piglit test spec/OES_compressed_ETC1_RGB8_texture/miptree and the ETC1 test in the GLES2 conformance suite. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa: Add function for decoding ETC1 texturesChad Versace2012-07-162-0/+40
| | | | | | | | | Add function _mesa_etc1_unpack_rgba8888. It is intended to be used by glCompressedTexSubImage2D to decode ETC1 textures into RGBA. CC: Chia-I <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* gallium/util, mesa: Refactor etc1 unpack functionChad Versace2012-07-162-24/+35
| | | | | | | | | | Move the body of util_etc1_rgb8_unpack_rgba_unorm8 into a new function that can be shared between gallium and dri drivers, texcompress_etc_tmp.h:etc1_unpack_rgba8888. CC: Chia-I <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* gbm: Rename gbm_bo_get_pitch to gbm_bo_get_strideKristian Høgsberg2012-07-164-7/+7
| | | | | We use pitch for 'pixels per row' and stride for 'bytes per row' pretty consistently in mesa and most other places, so rename the gbm API.
* gbm: Add new gbm_bo_import entry pointKristian Høgsberg2012-07-168-53/+105
| | | | | This generalizes and replaces gbm_bo_create_for_egl_image. gbm_bo_import will create a gbm_bo from either an EGLImage or a struct wl_buffer.
* llvmpipe: destroy setup variants on context destructionRoland Scheidegger2012-07-161-0/+2
| | | | | | | lp_delete_setup_variants() used to be called in garbage collection, but this no longer exists hence the setup shaders never got freed. Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: Unified common code between AoS and SoA blending.James Benton2012-07-166-162/+290
| | | | | | | Added a new file lp_bld_blend.c for the common code. Merged and added some simple optimisations. Reviewed-by: Jose Fonseca <[email protected]>
* intel: Don't call _mesa_get_format_bytes for MESA_FORMAT_NONEKristian Høgsberg2012-07-161-1/+4
| | | | | | | | | | When we don't intend to texture from or render to a __DRIimage we use __DRI_IMAGE_FORMAT_NONE. In that case, we just create the __DRIimage to reference the underlying buffer, and will create usable __DRIimages from it using createSubImage later. If we try to use _mesa_get_format_bytes() on MESA_FORMAT_NONE in a debug build, we hit an assertion, so let's not do that.
* Fix building glsl when using automake-1.12 after 68e04cc6Jon TURNEY2012-07-152-7/+12
| | | | | | | | | | | | | | | | Commit 68e04cc6 was tested using automake-1.11. Unfortunately, automake-1.12 made a "slightly backward-incompatible change" in the use of yacc with C++, and for a .yy file, the generated header file is now named .hh, not .h To work with both, write our own rule for running yacc, which generates a header file named .h, rather than using automake's rule. Also, remove things from BUILD_SOURCES which don't need to be there Also, update EXCLUDE rules in doxygen/glsl.doxy, for change of generated files from .cpp -> .cc, and glsl_lexer.h has never existed. Signed-off-by: Jon TURNEY <[email protected]>
* r600g: compute needed CS space for vertex buffers correctlyMarek Olšák2012-07-151-1/+1
|
* r600g: don't check the R600_GLSL130 env varMarek Olšák2012-07-153-6/+3
| | | | GLSL 1.3 has been enabled by default for quite a while.
* r600g: fix DB decompression on evergreenJerome Glisse2012-07-153-26/+16
| | | | | | Separated out of the hyperz patch by Marek with minor modifications. Signed-off-by: Marek Olšák <[email protected]>
* r600g: Emit vertex buffers using the same method as constant buffersTom Stellard2012-07-157-26/+55
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r600g: Unify 3D and compute vertex buffer emissionTom Stellard2012-07-155-100/+64
| | | | Signed-off-by: Marek Olšák <[email protected]>
* r600g: fix grammar constant_buffer -> constant_buffersMarek Olšák2012-07-152-17/+17
|
* radeon/llvm: Fix CR/LF in AMDILSIDevice.hAndreas Boll2012-07-131-1/+1
|
* radeon/llvm: Clean up AMDILIntrinsicInfo.cppTom Stellard2012-07-132-84/+5
|
* radeon/llvm: Coding style fixesTom Stellard2012-07-132-409/+325
|
* Fix linking gallium drivers and with dricore after defadf2b1Jon TURNEY2012-07-136-7/+7
| | | | | | | | | | | | | | | | | | | Commit defadf2b1 erroneously tries to make gallium drivers link with libdricore as a static library, not a shared library Also, change uses of DRI_LIB_DEPS in gallium driver Makefiles to GALLIUM_DRI_LIB_DEPS, so the libraries added are used in the linking the gallium driver Also, fix the path to the libdricore.so symlink, it's made in LIB_DIR, not in the libdricore directory Also repair quoting of dricore settings of DRI_LIB_DEPS and GALLIUM_DRI_LIB_DEPS variables so VERSION is interpolated in configure but TOP and LIB_DIR are interpolated later (where they are known, but VERSION isn't) Signed-off-by: Jon TURNEY <[email protected]> Signed-off-by: Tom Stellard <[email protected]>
* nouveau: implement missing timer query functionalityChristoph Bumiller2012-07-137-7/+46
|
* wayland: Stop trying to use make rules from aclocal, just copy and pasteKristian Høgsberg2012-07-133-3/+11
| | | | | | | | | Defeated by autotool, copy and paste to the rescue. https://bugs.freedesktop.org/show_bug.cgi?id=51997 https://bugs.freedesktop.org/show_bug.cgi?id=51531 Signed-off-by: Kristian Høgsberg <[email protected]>
* mesa/st: Generates TGSI that always recognizes INSTANCEID/VERTEXID as integers.José Fonseca2012-07-132-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested by running piglit draw-instanced, and by forcing llvmpipe advertise no native integer support, which now produces: VERT DCL IN[0] DCL SV[0], INSTANCEID DCL OUT[0], POSITION DCL OUT[1], COLOR DCL CONST[0..19] DCL TEMP[0], LOCAL DCL TEMP[1], LOCAL DCL TEMP[2], LOCAL DCL ADDR[0] 0: U2F TEMP[0].x, SV[0] 1: ARL ADDR[0].x, TEMP[0].xxxx 2: MOV TEMP[1].xy, CONST[ADDR[0].x+8].xyxx 3: ADD TEMP[2].x, IN[0].xxxx, TEMP[1].xxxx 4: ADD TEMP[1].x, IN[0].yyyy, TEMP[1].yyyy 5: MUL TEMP[2], CONST[16], TEMP[2].xxxx 6: MAD TEMP[2], CONST[17], TEMP[1].xxxx, TEMP[2] 7: MAD TEMP[2], CONST[18], IN[0].zzzz, TEMP[2] 8: MAD TEMP[2], CONST[19], IN[0].wwww, TEMP[2] 9: ARL ADDR[0].x, TEMP[0].xxxx 10: MOV TEMP[1], CONST[ADDR[0].x] 11: MOV OUT[0], TEMP[2] 12: MOV OUT[1], TEMP[1] 13: END
* draw,gallivm: Fix draw_get_shader_param.José Fonseca2012-07-136-31/+110
| | | | | | | | | | - Use LLVM limits when LLVM is being used, instead of TGSI limits - Provide draw_get_shader_param_no_llvm for when llvm is never used (softpipe) - Eliminate several of the hacks around draw shader caps in several drivers Unfortunately the hack for PIPE_MAX_VERTEX_SAMPLERS is still necessary. Reviewed-by: Marek Olšák <[email protected]>
* Don't explicitly link libOsmesa with libmesa's dependency libglslJon TURNEY2012-07-131-2/+1
| | | | | | | | | | The libmesa convenience library is linked with the libglsl convenience library. libOsmesa is linked with libmesa, and also directly with libglsl. When using libtool, this gives rise to duplicate symbol errors. Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* automake: convert libglapiJon TURNEY2012-07-1310-88/+75
| | | | | | | | | | | | | | | | | | | * "configure substitutions are not allowed in _SOURCES variables" in automake, so remove the AC_SUBST'ed GLAPI_ASM_SOURCES and instead use some AM_CONDITIONALS to choose which asm sources are used * Change GLAPI_LIB to point to the .la file in other Makefile.am files, and make a link to the .a file for the convenience of other Makefiles which have not yet been converted to automake v2: - Use AM_CPPFLAGS for cleaner build output - EXTRA_SOURCES is not needed - Remove libglapi.a compatibility link on clean Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* Rename X86-64_API -> X86_64_APIJon TURNEY2012-07-132-2/+2
| | | | | | | | automake doesn't allow hyphens in variable names Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* Link dri drivers with mesa or dricore libtool libraryJon TURNEY2012-07-133-5/+11
| | | | | | | | | | | | | | | | | Now mesa/drivers/dri is converted to automake, we want to update DRI_LIB_DEPS so that we link with the libmesa or libdricore libtool library, as appropriate. However, this is complicated by the fact that gallium/targets is not (yet) converted, so we can't share the DRI_LIB_DEPS autoconf variable with that anymore. Add an additional autoconf variable GALLIUM_DRI_LIB_DEPS, which is now used in gallium/targets/Makefile.dri, to link with the libdircore or libmesa native library. v2: libdricore$VERSION.a needs to be libdricore$(VERSION).a Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* Remove unused MESA_MODULES autoconf variableJon TURNEY2012-07-132-4/+0
| | | | | | Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* automake: convert libmesa and libmesagalliumJon TURNEY2012-07-136-64/+48
| | | | | | | | | | | | | | | | | * "configure substitutions are not allowed in _SOURCES variables" in automake, so instead of MESA_ASM_FILES, use some AM_CONDITIONALS to choose which architecture's asm sources are used in libmesa_la_SOURCES. (Can't remove MESA_ASM_FILES autoconf variable as it's still used in sources.mak) * Update to link with the .la file in other Makefile.am files, and make a link to the .a file for the convenience of other Makefiles which have not yet been converted to automake v2: Remove stray -static from LDFLAGS v3: Remove .a compatibility link on clean Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* Rename sparc/clip.S -> sparc/sparc_clip.SJon TURNEY2012-07-133-2/+2
| | | | | | | | | | | Automake can't handle having both clip.S and clip.c, even though they have different paths "src/mesa/Makefile.am: object `clip.lo' created by `$(SRCDIR)/sparc/clip.S' and `$(SRCDIR)/main/clip.c'" Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* automake: convert libglslJon TURNEY2012-07-1310-151/+176
| | | | | | | | | | | | | | | | | | | | v2: Use AM_V_GEN to silence generated code rules. Add BUILT_SOURCES to CLEANFILES v3: - Fix an accidental // in a path - Use automake make rules for lex/yacc rather than writing our own - Update .gitignore appropriately - Build a libglcpp convenience library rather than awkwardly including the files in libglsl and delegating the generation - Remove libglsl.a compatibility link on clean v4: - Automake's rules for lex/yacc make .cc if source is .ll or .yy, and apparently we must use those extensions "because of scons", so update everywhere glsl_parser.cpp -> glsl_parser.cc and glsl_lexer.cpp -> glsl_lexer.cc. This fixes 'make tarballs' and building with dricore enabled. Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* automake: convert libOSmesaLaurent Carlier2012-07-134-51/+56
| | | | | | | | | | | | | This also currently fix the installation of libOSmesa. v2: Remove old Makefile, libOSmesa is now versioned, fix typos v3: Keep config substitution alphabetized v4: Update .gitignore v5: Libraries will be in the builddir, not the srcdir. Reviewed-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Matt Turner <[email protected]>
* mesa,st/mesa: implement GL_RGB565 from ARB_ES2_compatibilityMarek Olšák2012-07-136-0/+29
| | | | | | | | | | This was not implemented, because the spec was changed just recently. Everything has been in place already. Gallium has PIPE_FORMAT_B5G6R5_UNORM, while Mesa has MESA_FORMAT_RGB565. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move loop over texture units into brw_populate_sampler_prog_key.Kenneth Graunke2012-07-123-82/+81
| | | | | | | | | | | The whole reason I avoided this was because it might operate on a brw_vertex_program or a brw_fragment_program. However, that isn't a problem: all we need is the gl_program base type. This avoids awkwardly passing the loop counter 'i' as a parameter, simplifies both callers, and also plumbs prog in place for future use. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Always emit alpha when nr_color_buffers == 0.Kenneth Graunke2012-07-123-11/+6
| | | | | | | | | | | | | | | If alpha-testing is enabled, we need to send alpha down the pipeline even if nr_color_buffers == 0. However, tracking whether alpha-testing is enabled in the WM program key is expensive: it causes us to compile multiple specializations of the same shader, using program cache space. This patch removes the check for alpha-testing, and simply emits alpha whenever nr_color_buffers == 0. We believe this will also be necessary for alpha-to-coverage, and it should add minimal overhead to an uncommon case. Saving the recompiles should more than make up the difference. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Use the blitter in intel_bufferobj_subdata for busy BOs on Gen6+.Kenneth Graunke2012-07-121-16/+10
| | | | | | | | | | Previously we only did this pre-Gen6, and used pwrite on Gen6+. In one workload, this cuts significant amount of overhead. v2: Simplify the function based on Eric's suggestions. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* gallivm: Use %.9g to print floats.José Fonseca2012-07-121-3/+6
| | | | | | So that we can see them in their full denormalized glory. Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Remove -ffast-math.José Fonseca2012-07-121-2/+0
| | | | | | | | | We rely on proper IEEE 754 behavior in too many places for this. See also commit 2fdbbeca43e7b57095774e4228e6eea75a180fab with equivalent change for autoconf. Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Also require recent XCB.José Fonseca2012-07-122-1/+4
| | | | And don't trip when it's not found -- simply skip building src/glx.
* mesa: Require current libxcb.Eric Anholt2012-07-125-53/+2
| | | | | | | | | | Without that, people with buggy apps that looked at just the server string for GLX_ARB_create_context would call this function that just threw an error when you tried to make a context. Google shows plenty of complaints about this. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeon/llvm: Don't use lp_build_swizzle_aos() for swizzlesTom Stellard2012-07-121-8/+13
| | | | | | | This function assumes that lp_build_context::type is a vector type, which is not true for r600 or radeonsi. This fixes an assertion failure using glamor 2D accel.
* radeonsi: Dump TGSI code prior to doing TGSI->LLVM conversion.Tom Stellard2012-07-121-1/+6
| | | | | This way if the conversion fails, we know what the TGSI shader looks like.
* i965: Delete previous workaround for textureGrad with shadow samplers.Kenneth Graunke2012-07-124-75/+5
| | | | | | | | | | | | | | | It had many problems: - The shadow comparison was done post-filtering. - It required state-dependent recompiles whenever the comparison function changed. - It didn't even work: many cases hit assertion failures. - I never implemented it for the VS. The new lowering pass which converts textureGrad to textureLod by computing the LOD value works much better. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add a lowering pass to convert TXD to TXL by computing the LOD.Kenneth Graunke2012-07-124-0/+157
| | | | | | | | | | | | | | | | | | Intel hardware doesn't natively support textureGrad with shadow comparisons. So we need to generate code to handle it somehow. Based on the equations of page 205 of the OpenGL 3.0 specification, it's possible to compute the LOD value that would be selected given the gradient values. Then, we can simply convert the TXD to a TXL. Currently, this passes 34/46 of oglconform's shadow-grad subtests; four cubemap tests are regressed. We should investigate this in the future. v2: Apply abs() to the scalar case (thanks to Eric). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl/ir_builder: Add a new swizzle_for_size() function.Kenneth Graunke2012-07-122-0/+20
| | | | | | | | This swizzles away unwanted components, while preserving the order of the ones that remain. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl/ir_builder: Add a generic constructor for unary expressions.Kenneth Graunke2012-07-122-0/+9
| | | | | | | | | I needed to compute logs and square roots in a patch I was working on, and wanted to use the convenient interface. We already have a similar constructor for binops; adding one for unops seems reasonable. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Initialize coordinate to NULL in ir_texture constructor.Kenneth Graunke2012-07-121-1/+2
| | | | | | | | | | | I ran into this while trying to create a TXS query, which doesn't have a coordinate. Since it didn't get initialized to NULL, a bunch of visitors tried to access it and crashed. Most of the time, this won't be a problem, but it's just a good idea. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/xorg: Fix build failure due to symbol clash.José Fonseca2012-07-121-0/+3
|