summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* scons: add code to generate the various GL API filesBrian Paul2012-05-317-2/+137
| | | | | | | This fixes recent build breakage when we began building the generated API files from xml as part of the normal build process. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=50475
* draw: simplify index buffer specificationBrian Paul2012-05-3115-76/+56
| | | | | Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with draw_set_indexes() which simply takes a pointer and an index size.
* glsl/tests: Plumb $(PYTHON2) and $(PYTHON_FLAGS) into optimization-test.Kenneth Graunke2012-05-302-2/+6
| | | | | | | | | | | | | | | | | | Some distributions (like Arch Linux) make /usr/bin/python Python 3, rather than Python 2. Since compare_ir uses /usr/bin/env python, such systems will fail to run optimization-test, causing 'make check' to always fail. Automake's TESTS_ENVIRONMENT variable provides a mechanism to run programs or set environment variables in the test environment. Ideally, I think we would want to use AM_TESTS_ENVIRONMENT, since TESTS_ENVIRONMENT is supposed to be user-overridable. However, it isn't supported using the default/serial test runner. Fixes 'make check' on Arch Linux and Gentoo. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Matt Turner <[email protected]>
* ralloc: Add some basic unit tests.Kenneth Graunke2012-05-303-0/+44
| | | | | | | | | I started writing unit tests for a new piece of code, and discovered they all failed due to a bug in ralloc. Clearly it needs a test suite. v2: Rename to 'ralloc-test' and fix copyright date. (idr review) Signed-off-by: Kenneth Graunke <[email protected]>
* ralloc: Fix ralloc_parent() of memory allocated out of the NULL context.Kenneth Graunke2012-05-301-1/+1
| | | | | | | | | | | | If an object is allocated out of the NULL context, info->parent will be NULL. Using the PTR_FROM_HEADER macro would be incorrect: it would say that ralloc_parent(ralloc_context(NULL)) == sizeof(ralloc_header). Fixes the new "null_parent" unit test. NOTE: This is a candidate for the 7.9, 7.10, 7.11, and 8.0 branches. Signed-off-by: Kenneth Graunke <[email protected]>
* automake: Check for 'indent' and fall back to 'cat' if not found.Kenneth Graunke2012-05-302-0/+9
| | | | | | | | | | | The glapi generator code uses indent to produce more readable code. However, we don't want to make GNU indent a hard build dependency; check for it in configure.ac and fall back to 'cat' if it's not available. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50484 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Ben Widawsky <[email protected]>
* mesa: don't compile integer clear shaders for unsupported APIsOliver McFadden2012-05-301-1/+1
| | | | | | | | | | | | | | Discovered while running the Khronos conformance test suite and receiving "implementation error: meta program compile failed." This bug was recently introduced by the i965 clear patch set and would only be detected while using the ES2 API and only on gen6+ hardware. Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Implement destination clipping and scissoringPaul Berry2012-05-291-5/+67
| | | | | This patch implements clipping and scissoring of the destination rect for blits that use the blorp engine (e.g. MSAA blits).
* mesa: Clean up some dricore-related detritus in the old Makefile.Eric Anholt2012-05-291-23/+7
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* automake: Convert dricore building to automake.Eric Anholt2012-05-294-42/+105
| | | | | | | | | | | This is performed in a subdirectory to avoid needing to convert all of src/mesa/Makefile in one go. I can now cherry-pick a commit containing glapi XML changes, do "(cd src/mapi/glapi/gen && make) && make", and get a working driver. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* automake: Add a prefix variable to the common sources lists.Eric Anholt2012-05-293-277/+279
| | | | | | | | | | | In order to do the minimal change for libdricore conversion to automake, I need to put its Makefile.am in a subdirectory. Automake gets whiny/broken if you use GNU make features like "addprefix" or "$(FILES:%=../%)" to munge your *_SOURCES. So, use a plain old variable to be able to substitute in that "../" Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* automake: Rename variables in sources.mak to be automake compatible.Eric Anholt2012-05-296-74/+74
| | | | | | | | *_SOURCES is reserved for files lists for particular automake targets. Also, "-" in the variable names is not allowed. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove generated source files during make clean.Eric Anholt2012-05-291-0/+12
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: Enable silent rules for generation when used from automake.Eric Anholt2012-05-291-3/+3
| | | | | | | | This variable won't be set when called from non-automake makefiles, but it cleans up shared-glapi's output. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* shared-glapi: Don't forget to clean our built file.Eric Anholt2012-05-291-0/+1
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Restore installing of libGL for non-dri builds.Eric Anholt2012-05-291-3/+7
| | | | | | Reported-by: Sven Joachim <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove the generated glapi from source control, and just build it.Eric Anholt2012-05-2921-116266/+21
| | | | | | | | | | | Mesa already always depends on python to build. The checked in changes are not reviewed (because any trivial change rewrites the world). We also have been pushing commits between xml change and regen where at-build-time xml-generated code disagrees with committed xml-generated code. And worst of all, sometimes we ("I") check in *stale* xml-generated code. Acked-by: Ian Romanick <[email protected]>
* i830: Fix crash for GL_STENCIL_TEST in i830Enable()Kurt Roeckx2012-05-291-1/+1
| | | | | | | | | | | commit 87f12bb2d95236c7b025d1a8be56b5ab1683d702 tried to fix rb->mt being NULL, but change this case wrong. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kurt Roeckx <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nv50: hook up forgotten short constant buffer upload methodMarcin Slusarz2012-05-291-0/+1
| | | | Fixes crash in xorg st.
* radeon/llvm: Update and fix some commentsTom Stellard2012-05-292-12/+6
|
* radeonsi: Remove use.sgpr* intrinsics, use load instructions insteadTom Stellard2012-05-295-74/+57
| | | | | | | | | | We now model loading uses sgpr values with LLVM IR load instructions that use the USER_SGPR address space. The definition of the sgpr parameter to the use_sgpr() helper function in radeonsi_shader.c has changed so that you can pass raw sgpr values rather than having to divide the sgpr value you want to use by the dword width of the type you want to load.
* radeonsi: Handle TGSI CONST registersTom Stellard2012-05-2912-100/+254
| | | | | We now emit LLVM load instructions for TGSI CONST register reads, which are lowered in the backend to S_LOAD_DWORD* instructions.
* radeon/llvm: Remove AMDILIntrinsicInfo::GetDeclaration fuction bodyTom Stellard2012-05-291-20/+1
| | | | | | | This function was causing compile errors in the tablegen'd code for some intrinsic definitions. I don't think we really need this function, so I'm removing the function body just as a temporary solution. I'll look into removing the entire AMDILIntrinsicInfo class later.
* radeon/llvm: Remove AMDILTargetMachineTom Stellard2012-05-2919-363/+90
|
* nouveau: unreference fences on resource destructionChristoph Bumiller2012-05-292-0/+6
|
* nvc0: optimize blend cso by checking which by-RT data actually differsChristoph Bumiller2012-05-291-65/+94
| | | | Can save about 200 bytes of command buffer space.
* nvc0: don't upload UCPs if the shader doesn't use themChristoph Bumiller2012-05-291-1/+1
|
* nvc0/ir: allow 64-bit constant loads on nve4Christoph Bumiller2012-05-292-1/+3
| | | | Looks like only 128-bit access doesn't work.
* nvc0/ir: fix texture barrier insertion to prevent WAW hazardsChristoph Bumiller2012-05-296-29/+88
| | | | Fixes, for instance, object highlighting in Diablo 3 (wine).
* nvc0/ir: TEX doesn't support JOIN modifier eitherChristoph Bumiller2012-05-291-0/+1
|
* gallium: add st_api feature mask to prevent advertising MS visualsChristoph Bumiller2012-05-294-12/+37
| | | | | | | | | | | | | | v2: use a define for the maximum sample count v3: also test odd sample counts (r300 supports MS3) While multisample renderbuffers are supported by mesa, MS visuals are not, so we need a way to tell dri/st not to advertise them even if the gallium driver does support multisampled surfaces. Otherwise applications selecting these non-functional visuals would run into trouble ... Reviewed-by: Brian Paul <[email protected]>
* nv30: Fix generic passing to fragment program in NV34.Roy Spliet2012-05-253-5/+9
|
* nv30: handle user index buffersChristoph Bumiller2012-05-254-17/+27
|
* radeon/llvm: Use a custom inserter for MASK_WRITETom Stellard2012-05-254-34/+36
|
* radeon/llvm: Use tablegen pattern to lower bitconvertTom Stellard2012-05-254-294/+11
|
* radeon/llvm: Use a custom inserter to lower FNEGTom Stellard2012-05-255-22/+15
|
* radeon/llvm: Use a custom inserter to lower CLAMPTom Stellard2012-05-259-84/+41
|
* radeon/llvm: Use a custom inserter to lower FABSTom Stellard2012-05-2510-42/+41
|
* r600g: handle R16G16B16_FLOAT and R32G32B32_FLOAT in translate_colorswapKai Wasserbäch2012-05-251-0/+2
| | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50318 Signed-off-by: Kai Wasserbäch <[email protected]>
* draw: fix primitive restart bug by using the index buffer offsetBrian Paul2012-05-251-3/+6
| | | | | | | | | | | The code which scans the index buffer for restart indexes wasn't adding the index buffer offset so we were always starting at offset=0. The offset is usually zero so it wasn't noticed before. Fixes a failure in the piglit primitive-restart test when testing vertex data + index data in a single VBO. NOTE: This is a candidate for the 8.0 branch.
* svga: remove the special zero-stride vertex array codeBrian Paul2012-05-259-153/+12
| | | | | This code actually hasn't been needed for some time now. We can just treat a zero-stride vertex array like any other non-zero-stride array.
* gallium/docs: beef up the docs related to color clampingBrian Paul2012-05-252-3/+18
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: add GALLIUM_LOG_FILE option for logging output to a fileBrian Paul2012-05-252-6/+25
| | | | Useful for logging different runs to files and diffing, etc.
* i965/msaa: Enable 4x MSAA on Gen7.Paul Berry2012-05-252-9/+9
| | | | | | | | | | | | | | | | | | Basic 4x MSAA support now works on Gen7. This patch enables it. As with Gen6, MSAA support is still fairly preliminary. In particular, the following are not yet supported: - 8x oversampling (Gen7 has hardware support for this, but we do not yet expose it). - Fully general blits between MSAA and non-MSAA buffers. - Formats other than RGBA8, DEPTH24, and STENCIL8. - Centrold interpolation. - Coverage parameters (glSampleCoverage, GL_SAMPLE_ALPHA_TO_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_VALUE, GL_SAMPLE_COVERAGE_INVERT). Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/msaa: Implement manual blending operation for Gen7.Paul Berry2012-05-251-23/+67
| | | | | | | | | | | | | | | On Gen6, the blending necessary to blit an MSAA surface to a non-MSAA surface could be accomplished with a single texturing operation. On Gen7, the WM program must fetch each sample and blend them together manually. From the Bspec (Shared Functions/Messages/Initiating Message/Message Types/sample): [DevIVB+]:Number of Multisamples on the associated surface must be MULTISAMPLECOUNT_1. This patch implements the manual blend operation. Acked-by: Kenneth Graunke <[email protected]>
* i965/msaa: Modify blorp code to account for Gen7 MSAA layouts.Paul Berry2012-05-253-68/+151
| | | | | | | | | | | | | | | | | | | Since blorp uses color textures and render targets to do all its work (even when blitting stencil and depth data), it always has to configure the Gen7 GPU to use the new "sliced" MSAA layout. However, when blitting stencil or depth data, the actual MSAA layout is interleaved (as in Gen6). Therefore, blorp has to do extra coordinate transformation work to account for the interleaving manually. This patch causes blorp to perform the necessary extra coordinate transformations. It also modifies the blorp SURFACE_STATE setup code for Gen7, so that it does not try to correct the surface width and height to account for MSAA, since "sliced" MSAA layout doesn't affect the surface width or height. Acked-by: Kenneth Graunke <[email protected]>
* i965/msaa: Validate Gen7 surface state constraints.Paul Berry2012-05-253-3/+109
| | | | | | | | | When a Gen7 SURFACE_STATE is configured for MSAA, a number of additional constaints come in to play. This patch adds a function gen7_check_surface_setup() which verifies that all of those constraints are met. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/msaa: Properly handle sliced layout for Gen7.Paul Berry2012-05-2510-58/+162
| | | | | | | | | | | | | | | | | | | | | | | | | Starting in Gen7, there are two possible layouts for MSAA surfaces: - Interleaved, in which additional samples are accommodated by scaling up the width and height of the surface. This is the only layout available in Gen6. On Gen7 it is used for depth and stencil surfaces only. - Sliced, in which the surface is stored as a 2D array, with array slice n containing all pixel data for sample n. On Gen7 this layout is used for color surfaces. The "Sliced" layout has an additional requirement: it must be used in ARYSPC_LOD0 mode, which means that the surface doesn't leave any extra room between array slices for miplevels other than 0. This patch modifies the surface allocation functions to use the correct layout when allocating MSAA surfaces in Gen7, and to set the array offsets properly when using ARYSPC_LOD0 mode. It also modifies the code that populates SURFACE_STATE structures to ensure that ARYSPC_LOD0 mode is selected in the appropriate circumstances. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/msaa: Add defines for Gen7.Paul Berry2012-05-251-0/+5
| | | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Enable blorp blits on Gen7.Paul Berry2012-05-252-2/+4
| | | | | | | | | | | | | Gen7 support for blorp (blits using the render bath) now works for non-MSAA purposes. This patch enables it. Since blorp operations re-use the logic for HiZ ops, this required adding a case to the switch statement in gen7_blorp_emit_wm_config(), to allow for the case where no HiZ op is being performed. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>