aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa,i965: use NewDriverState to communicate TFB state changes with the driverMarek Olšák2013-04-248-22/+42
| | | | | | | | | | | | | | | | | | | | | | | _NEW_TRANSFORM_FEEDBACK is not used by core Mesa, so it can be removed. Instead, an new private flag is added to i965 to serve the same purpose. If you're new to this: * When creating a context. you can set private dirty flags in gl_context::DriverFlags, eg.: ctx->DriverFlags.NewStateX = BRW_NEW_STATE_X; * When StateX is changed, core Mesa does: ctx->NewDriverState |= ctx->DriverFlags.NewStateX; * When you have to draw, read and clear ctx->NewDriverState. * Pros: not touching NewState, the driver decides the mapping between GL states and hw state groups, unlimited number of flags in core Mesa (still limited number of flags in the driver though) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove redundant _NEW_BUFFERS setting in ReadBufferMarek Olšák2013-04-241-1/+0
| | | | | | | already set by _mesa_readbuffer Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: add a simple path to BufferData if it only discards buffer contentsMarek Olšák2013-04-241-0/+14
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: depth-stencil-alpha state also depends on _NEW_BUFFERSMarek Olšák2013-04-241-1/+1
| | | | | | | | | because the code looks at the visual if there is a depth or stencil buffer before enabling depth or stencil, respectively. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* gallium: Replace gl_rasterization_rules with lower_left_origin and ↵José Fonseca2013-04-2357-111/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | half_pixel_center. Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <[email protected]> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <[email protected]> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <[email protected]>
* r600g: initialize CMASK and HTILE with the GPU using streamoutMarek Olšák2013-04-234-7/+80
| | | | | | | | | | | | | This fixes a crash when a resource cannot be mapped to the CPU's address space because it's too big. This puts a global pipe_context in r600_screen, which is guarded by a mutex, so that we can use pipe_context when there isn't one around. Hopefully our multi-context support is solid. Reviewed-by: Alex Deucher <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* gallium/u_blitter: implement buffer clearingMarek Olšák2013-04-232-8/+97
| | | | | | | | | | | | Although this might be useful for ARB_clear_buffer_object, I need it for initializating resources in r600g. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Brian Paul <[email protected]> v2: comment cleanups NOTE: This is a candidate for the 9.1 branch.
* r600/llvm: Read stacksize from config headerVincent Lejeune2013-04-234-3/+5
|
* /bin/bash: q : commande introuvableVincent Lejeune2013-04-232-2/+2
|
* radeon/llvm: Fix build with LLVM >= r180063Tom Stellard2013-04-231-0/+1
|
* gallivm: Fix build with LLVM >= r180063Tom Stellard2013-04-232-0/+8
|
* draw: use the prim count for ia primitivesZack Rusin2013-04-221-1/+2
| | | | | | | | | | Number of vertices to fetch doesn't always equal the number of input vertices. To correctly compute the number if IA primitives we need to use the total number of input vertices, not only those that need to be fetched. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* tgsi/scan: set correct input limits for geometry shaderZack Rusin2013-04-221-0/+17
| | | | | | | | | TGSI geometry shader input declerations are of the IN[][2] format and the dimensions of the array have to be deduced from the input primitive property. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw: add code to reset instance dependent dataZack Rusin2013-04-225-1/+31
| | | | | | | | | | | | We want to be able to reset certain parts of the pipeline, in particular the input primitive index, but only either with seperate invocations of the draw_vbo or new instances. In all other cases (e.g. new invocations due to primitive restart) that data needs to be preserved. Add a function through which we can reset instance dependent data. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* softpipe: fix streamout with an emptry geometry shaderZack Rusin2013-04-222-12/+23
| | | | | | | | | Same approach as in the llvmpipe, if the geometry shader is null and we have stream output then attach it to the vertex shader right before executing the draw pipeline. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* configure.ac: Allow OpenGL ES1 and ES2 only with enabled OpenGLAndreas Boll2013-04-231-0/+11
| | | | | | | Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x Reviewed-by: Chad Versace <[email protected]>
* i965/fs: Don't save value returned by emit() if it's not used.Matt Turner2013-04-221-11/+11
| | | | | | Probably a copy-n-paste mistake. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove extra MapBufferRange in create_beginend_table()Brian Paul2013-04-221-1/+0
| | | | | | Looks like a copy&paste typo. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Add a new clip_halfz rasterizer state.José Fonseca2013-04-228-24/+29
| | | | | | gl_rasterization_rules lumps too many different flags. Reviewed-by: Brian Paul <[email protected]>
* i965: Fix a mistake in the comments for software counters.Kenneth Graunke2013-04-221-2/+2
| | | | | | | The code doesn't set brw->query.obj to NULL, it sets query->bo to NULL. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallivm: Fix assignment of unsigned values to OUT register.José Fonseca2013-04-222-77/+61
| | | | | | | | | | | | | | TEMP is not the only register file that accept unsigned. OUT too. Actually, what determines the appropriate type of the destination value is not the opcode, but rather the register. Also cleanup/simplify code. Add a few more asserts, but also make code more robust by handling graceful if assert fails. This fixes segfault / assertion in the included vert-uadd.sh graw shader. Reviewed-by: Roland Scheidegger <[email protected]>
* i965: Apply CMP NULL {Switch} work-around to other Gen7s.Matt Turner2013-04-221-1/+4
| | | | | | | Listed in the restrictions section of CMP, but not on the work-arounds page. Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: minor indentation fixesBrian Paul2013-04-221-2/+2
|
* mesa: Introduce a globally-available minify() macro.Eric Anholt2013-04-217-36/+27
| | | | | | This matches u_minify()'s behavior, for consistency. Reviewed-by: Brian Paul <[email protected]>
* mesa: Generalize TexStorage allocator between swrast and intel.Eric Anholt2013-04-216-62/+37
| | | | | | | | | | This should be reusable for other non-gallium drivers, so we can make the extension always be available. v2: Add a more detailed comment than the old function had (recommended by Brian). Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: Add performance debug for meta code.Eric Anholt2013-04-212-3/+35
| | | | | | | | I noticed a fallback in regnum through sysprof, and wanted a nicer way to get information about it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Mention how much data we're trying to subdata in perf debug.Eric Anholt2013-04-211-2/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "gallivm: Emit vector selects."José Fonseca2013-04-211-2/+14
| | | | | | | | | | | | | | | | | | | | | | | It caused inumerous regressions (LLVM 3.1) in blending. In particular: - lp_test_blend type=u8nx16 rgb_func=sub rgb_src_factor=zero rgb_dst_factor=inv_src_color alpha_func=rev_sub alpha_src_factor=one alpha_dst_factor=const_color ... MISMATCH Src: 0 0 0 b5 49 29 0 a2 0 21 de 0 c3 1b ec 0 Src1: 2d 85 14 0 f8 0 79 a1 99 0 d8 0 59 16 0 0 Dst: 0 a9 97 0 c0 0 78 0 0 8b aa f0 bd 0 78 f6 Con: 7d 0 c0 0 0 bb 77 0 0 0 50 0 40 51 0 0 Res: 0 0 0 0 0 29 0 0 0 0 c8 0 97 1b e3 0 Ref: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 type=u8nx16 rgb_func=max rgb_src_factor=one rgb_dst_factor=inv_const_color alpha_func=min alpha_src_factor=zero alpha_dst_factor=inv_src1_alpha ... MISMATCH Src: d 0 0 e9 0 37 35 f0 62 0 0 b2 e9 f7 0 5c Src1: 8f 0 bf 0 a8 5 0 0 c4 0 d7 7 92 a 0 17 Dst: cb 0 1e 0 0 0 19 8e 0 4d 0 0 0 0 3 46 Con: aa 5a 5f 8f 0 0 bc 92 0 88 0 0 b7 8a c0 88 Res: 44 0 13 0 0 0 7 8e 0 24 0 0 0 0 1 40 Ref: 44 0 13 0 0 37 35 0 62 24 0 0 e9 f7 1 0 This reverts commit 1e266c7ef01251ecf72347a2ba1d174b035cbe3b.
* llvmpipe: verify function on blend test.José Fonseca2013-04-211-0/+2
|
* llvmpipe: Don't support Z32_FLOAT_S8X24_UINT texture sampling support either.José Fonseca2013-04-201-4/+6
| | | | | | | Because we don't support, and the u_format fallback doesn't work for zs formats. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Ignore depth-stencil state if format has no depth/stencil.José Fonseca2013-04-201-4/+10
| | | | | | Prevents assertion failures inside the driver for such state combinations. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Disable LLVM 2.7 workaround on other versions.José Fonseca2013-04-201-2/+1
| | | | | | | | | 2.7 was a particularly trouble ridden release. Furthermore, the bug no longer can be reproduced ever since the first_level state was taken in account. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Emit vector selects.José Fonseca2013-04-201-12/+2
| | | | | | | | | | | | | They are supported on LLVM 3.1, at least on x86. (I haven't tested on PPC though.) Actually lp_build_linear_mip_levels() already has been emitting them for some time. This avoids intrinsics, which tend to be an obstacle for certain optimization passes. Reviewed-by: Brian Paul <[email protected]>
* freedreno: move ir -> ir2Rob Clark2013-04-206-283/+283
| | | | | | | | There will be a new IR for a3xx, which has a very different shader ISA (more scalar oriented). So rename to avoid conflicts later when I start adding a3xx support to the gallium driver. Signed-off-by: Rob Clark <Rob Clark [email protected]>
* freedreno: cleanup some cruft left over from fdreRob Clark2013-04-202-133/+1
| | | | | | | | The standalone shader assembler needed some meta-data to know about attributes/varyings/etc, to do the shader linkage. We don't need these parts with gallium/tgsi, so just get rid of it. Signed-off-by: Rob Clark <Rob Clark [email protected]>
* gallivm: implement switch opcodeRoland Scheidegger2013-04-203-12/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be able to handle all things which make this tricky to implement. Fallthroughs, including most notably into/out of default, should be handled correctly but are quite a mess. If we see largely unoptimized switches in the wild should probably think about some "real" switch optimization pass, e.g. things like this: switch case1 someinst brk case2 default case3 someinst brk case4 someinst endswitch are legal, but the pointless case2/case3 statements not only cause condition evaluation but will turn this into a "fake" fallthrough case (because mask and defaultmask are already updated for case2 when default is encountered) requiring executing code twice. If default is at the end though, there's never any code re-execution, and if that's not the case if there's no fallthrough in (not even a fake one) and out of default there's no code re-execution neither. v2: add comments, and use enum for break type instead of magic boolean. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: use uint build context for mask instead of floatRoland Scheidegger2013-04-201-1/+1
| | | | | | Unsurprisingly noone was using it except for grabbing builder. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm/tgsi: fix up breakcRoland Scheidegger2013-04-203-2/+6
| | | | | | | | | It seems there was a typo in gallivm breakc handling (I am actually still not sure it is really needed but otherwise that statement really should go away). Also fix the wrong src argument type, even though they weren't really used. Reviewed-by: Jose Fonseca <[email protected]>
* svga: remove TGSI_OPCODE_BREAKC instruction translationRoland Scheidegger2013-04-201-1/+0
| | | | | | | While initially that opcode probably was meant for something along the lines of sm3 break_comp it has never worked that way (not even the argument count was right) and now the opcode has quite different semantics so just remove it. (Discovered by Jose Fonseca)
* gallium: document breakc and switch/case/default/endswitchRoland Scheidegger2013-04-201-6/+51
| | | | | | | docs were missing, especially the opcode-from-hell switch however is anything but obvious. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: increase nesting limit to 66Roland Scheidegger2013-04-201-2/+4
| | | | | | | | | | | This is still not really correct, since at least for sm 4.0 the nesting limit is 64 per subroutine, and subroutine nesting itself has a limit of 32, so since we have a flat stack we'd need 32*64. But this should probably be better fixed with per-subroutine stacks, since otherwise these structures get really big (like 100kB for the lp_exec_mask). Reviewed-by: Jose Fonseca <[email protected]>
* draw: implement primitive assemblerZack Rusin2013-04-187-4/+386
| | | | | | | | | | | | | | | | | | | | Input assembler needs to be able to decompose adjacency primitives into something that can be understood by the rest of the pipeline. The specs say that the adjacency primitives are *only* visible in the geometry shader, for everything else they need to be decomposed. Which in most of the cases is not an issue, because the geometry shader always decomposes them for us, but without geometry shader we were passing unchanged adjacency primitives to the rest of the pipeline and causing crashes everywhere. This commit introduces a primitive assembler which, if geometry shader is missing and the input primitive is one of the adjacency primitives, decomposes them into something that the rest of the pipeline can understand. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* util/prim: fix decomposed counts for adjacency primitivesZack Rusin2013-04-181-4/+4
| | | | | | Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* draw/so: uses the correct index with the pre clipped coordinatesZack Rusin2013-04-181-6/+6
| | | | | | | | | | | pre_clip_pos is a float[4] we just used (*float)[4] to be able to jump within the array of vertex_headers with it. So if the idx happened to be anything but 0, we'd actually read from some garbage in memory. Change it to just be a simple pointer instead of casting it to something that it's not. As suggested by Jose. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* glapi: Add counter information for glBufferData(), like glBufferSubData().Eric Anholt2013-04-191-2/+2
| | | | This causes this function to become asynchronous with glthread.
* glapi: Add parameter count information for uniforms.Eric Anholt2013-04-192-42/+42
| | | | | | This is the kind of information that would have been present for GLX, if GLX supported modern GL. This allows these entrypoints to get automatic asynchronous marshalling code generated for glthread.
* glapi: skip padding in get_called_parameter_stringPaul Berry2013-04-191-0/+2
| | | | | | | | | | | This bug is currently benign, since get_called_parameter_string() is currently only used for functions that return true for glx_function.has_different_protocol(), and none of those functions include padding. However, in order to implement marshalling of GL API functions, we'll need to use get_called_parameter_string() far more often. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix up program_parse.y to avoid uninitialized $$Paul Berry2013-04-191-0/+5
| | | | | | | | | | | Without this patch, $$.negate, $$.rgba_valid, and $$.xyzw_valid take on garbage values. At the moment this problem is benign (the garbage values happen to be zero), but in my experiments executing GL operations on a background thread, the garbage values change, leading to piglit failures. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use quotes on bool driconf options to prevent stdbool.h breakage.Eric Anholt2013-04-195-41/+48
| | | | | | | | | | | | | Since stdbool.h's "true" and "false" are #defines, they got expanded when used as macro arguments, and that expanded value was stored in the XML string, producing XML that driconf would then fail to parse. Currently no drivers included stdbool along with driconf, but I keep accidentally doing so on intel as we move towards using normal C. v2: rebase on master. Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* svga: whitespace, comment fixes in svga_pipe_query.cBrian Paul2013-04-191-41/+49
|