summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* u_blitter: don't use user buffersMarek Olšák2012-04-031-18/+23
|
* gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.Vinson Lee2012-04-031-1/+7
| | | | | | | llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/vdpau: fix deadlock in PresentationQueueQuerySurfaceStatusChristian König2012-04-031-1/+2
| | | | Signed-off-by: Christian König <[email protected]>
* r600g: remove dead code in r600_update_derived_stateMarek Olšák2012-04-031-6/+0
|
* gallivm: Maximum loop iterationsJames Benton2012-04-033-3/+45
| | | | | | | | Limits maximum loop iterations in a TGSI shader to prevent infinite loops from occurring, any iteration in any loop counts towards this limit Signed-off-by: José Fonseca <[email protected]>
* gallivm: Simplify/reorder minimax helper.José Fonseca2012-04-031-10/+15
|
* swrast: Fix memory leaks in blit_linear.Vinson Lee2012-04-021-0/+9
| | | | | | | | | Fixes Coverity resource leak defects. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: Demote 'type' from ir_instruction to ir_rvalue and ir_variable.Kenneth Graunke2012-04-026-7/+14
| | | | | | | | | | | | | Variables have types, expression trees have types, but statements don't. Rather than have a nonsensical field that stays NULL in the base class, just move it to where it makes sense. Fix up a few places that lazily used ir_instruction even though they actually knew the particular subclass. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Remove ir_call::get_callee() and set_callee().Kenneth Graunke2012-04-0218-40/+24
| | | | | | | | | | | | | Previously, set_callee() performed some assertions about the type of the ir_call; protecting the bare pointer ensured these checks would be run. However, ir_call no longer has a type, so the getter and setter methods don't actually do anything useful. Remove them in favor of accessing callee directly, as is done with most other fields in our IR. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Convert ir_call to be a statement rather than a value.Kenneth Graunke2012-04-0220-208/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aside from ir_call, our IR is cleanly split into two classes: - Statements (typeless; used for side effects, control flow) - Values (deeply nestable, pure, typed expression trees) Unfortunately, ir_call confused all this: - For void functions, we placed ir_call directly in the instruction stream, treating it as an untyped statement. Yet, it was a subclass of ir_rvalue, and no other ir_rvalue could be used in this way. - For functions with a return value, ir_call could be placed in arbitrary expression trees. While this fit naturally with the source language, it meant that expressions might not be pure, making it difficult to transform and optimize them. To combat this, we always emitted ir_call directly in the RHS of an ir_assignment, only using a temporary variable in expression trees. Many passes relied on this assumption; the acos and atan built-ins violated it. This patch makes ir_call a statement (ir_instruction) rather than a value (ir_rvalue). Non-void calls now take a ir_dereference of a variable, and store the return value there---effectively a call and assignment rolled into one. They cannot be embedded in expressions. All expression trees are now pure, without exception. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Split out ir_reader's ability to read ir_dereference_variables.Kenneth Graunke2012-04-021-8/+20
| | | | | | | | | | Most of the time, we just want to read an ir_dereference, so there's no need to have these in separate functions. However, the next patch will want to read an ir_dereference_variable directly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Move constant expression handling from calls to signatures.Kenneth Graunke2012-04-022-8/+25
| | | | | | | | | | | | | | | When translating a call from AST to HIR, we need to decide whether it can be evaluated to a constant before emitting any code (namely, the temporary declaration, assignment, and call.) Soon, ir_call will become a statement taking a dereference of where to store the return value, rather than an rvalue to be used on the RHS of an assignment. It will be more convenient to try evaluation before creating a call. ir_function_signature seems like a reasonable place. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Use ir_rvalue to represent generic error_type values.Kenneth Graunke2012-04-0213-41/+80
| | | | | | | | | | | | | | | | | | | | | | Currently, ir_call can be used as either a statement (for void functions) or a value (for non-void functions). This is rather awkward, as it's the only class that can be used in both forms. A number of places use ir_call::get_error_instruction() to construct a generic value of error_type. If ir_call is to become a statement, it can no longer serve this purpose. Unfortunately, none of our classes are particularly well suited for this, and creating a new one would be rather aggrandizing. So, this patch introduces ir_rvalue::error_value(), a static method that creates an instance of the base class, ir_rvalue. This has the nice property that you can't accidentally try and access uninitialized fields (as it doesn't have any). The downside is that the base class is no longer abstract. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Combine AST-level and IR-level parameter mode checking loops.Kenneth Graunke2012-04-021-82/+85
| | | | | | | | | | | | | generate_call() and ast_function_expression::hir() both tried to verify that 'out' and 'inout' parameters used l-values. Irritatingly, it turned out that this was not redundant; both checks caught -some- cases. This patch combines the two into a single "complete" function that does all the parameter mode checking. It also adds a comment clarifying why AST-level checking is necessary in the first place. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Split up function matching and call generation a bit more.Kenneth Graunke2012-04-021-35/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have one big function, match_signature_by_name, which found a matching signature, performed out-parameter conversions, and generated the ir_call. As the code for matching against built-in functions became more complicated, I split it internally, creating generate_call(). However, I left the same awkward interface. This patch splits it into three functions: 1. match_signature_by_name() This now takes a name, a list of parameters, the symbol table, and returns an ir_function_signature. Simple and one purpose: matching. 2. no_matching_function_error() Generate the "no matching function" error and list of prototypes. This was complex enough that I felt it deserved its own function. 3. generate_call() Do the out-parameter conversion and generate the ir_call. This could probably use more splitting. The caller now has a more natural workflow: find a matching signature, then either generate an error or a call. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Don't trust loop analysis in the presence of function calls.Kenneth Graunke2012-04-022-0/+34
| | | | | | | | | | | | | | | | | | | | | Function calls may have side effects that alter variables used inside the loop. In the fragment shader, they may even terminate the shader. This means our analysis about loop-constant or induction variables may be completely wrong. In general it's impossible to determine whether they actually do or not (due to the halting problem), so we'd need to perform conservative static analysis. For now, it's not worth the complexity: most functions will be inlined, at which point we can unroll them successfully. Fixes Piglit tests: - shaders/glsl-fs-unroll-out-param - shaders/glsl-fs-unroll-side-effect NOTE: This is a candidate for release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/aub: Dump a final bitmap from DestroyContext.Kenneth Graunke2012-04-023-29/+41
| | | | | | | | | | | | | | | Certain applications don't call SwapBuffers before exiting. Yet, we'd really like to see a bitmap containing the final rendered image even if they choose never to present it. In particular, Piglit tests (at least with -auto -fbo) fall into this category. Many of them failed to dump any images at all. Dumping one final image at context destruction time seems to work. We may wish to pursue a more elegant solution later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* r600g: unduplicate code for PS partial flushMarek Olšák2012-04-011-4/+2
|
* r600g: determine in advance if hw has vertex cacheMarek Olšák2012-04-013-14/+16
|
* r600g: optimize r600_resource_vaMarek Olšák2012-04-015-18/+11
| | | | Avoid calling get_radeon_bo and inline it.
* targets/{xvmc,vdpau,va}: remove all objects on make cleanMarcin Slusarz2012-04-013-3/+3
|
* intel: add PCI IDs for Ivy Bridge GT2 server variantEugeni Dodonov2012-04-013-1/+5
| | | | | | | Those IDs are used by Bromolow. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Eugeni Dodonov <[email protected]>
* linker: Fix memory leak in count_uniform_size::visit_field.Vinson Lee2012-03-311-2/+1
| | | | | | | | | Fixes a Coverity resource leak defect. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Add some PCI IDs for Haswell.Kenneth Graunke2012-03-303-2/+25
| | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set "Shader Channel Select" fields in Haswell's SURFACE_STATE.Kenneth Graunke2012-03-303-1/+37
| | | | | | | | | | | | These can be used to implement EXT_texture_swizzle without baking state-dependent swizzle instructions into the shader and forcing recompiles. For now, just set them to pass-through mode, so everything continues to work as it did on Ivybridge. We can optimize this later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fill in Sample Mask in Haswell's 3DSTATE_PS.Kenneth Graunke2012-03-302-0/+5
| | | | | | | We only need one sample, since we don't support multisampling yet. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set "Stencil Buffer Enable" bit on Haswell.Kenneth Graunke2012-03-302-1/+5
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set Line Stipple enable bit in 3DSTATE_SF for Haswell.Kenneth Graunke2012-03-302-0/+5
| | | | | | | Apparently this needs to be the same as in 3DSTATE_WM. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Update max VS/PS threads shift offsets for Haswell.Kenneth Graunke2012-03-304-4/+10
| | | | | | | These now start at bit 23 instead of bit 24/25. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Disable HiZ on Haswell for now.Kenneth Graunke2012-03-301-1/+1
| | | | | | | | Getting HiZ working means updating all the state packets for resolves and clears. It's not worth doing until we get the basics working. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add initial IS_HASWELL() macros.Kenneth Graunke2012-03-303-5/+14
| | | | | | | | | | | For now, these all return 0, as I don't yet want to enable Haswell support. Eventually they will be filled in with proper PCI IDs. Also add an is_haswell field similar to is_g4x to make it easy to distinguish Gen7 and Gen7.5. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Avoid explicit accumulator operands in SIMD16 mode on Gen7.Kenneth Graunke2012-03-301-0/+3
| | | | | | | | | | | | | | | According to the BSpec ISA volume's "Accumulator Register" section: "[DevIVB] SIMD16 execution on dwords is not allowed when accumulator is explicit source or destination operand." Fixes piglit tests: - fs-multiply-const-ivec4 - fs-multiply-const-uvec4 - fs-multiply-ivec4-const - fs-multiply-uvec4-const Signed-off-by: Kenneth Graunke <[email protected]>
* gallium/postprocess: document serious issue causing undefined behaviorMarek Olšák2012-03-301-0/+4
|
* r600g: cleanup after get_query_result changeMarek Olšák2012-03-302-35/+9
| | | | Finally, union r600_query_result can be removed.
* r300g: cleanup after get_query_result changeMarek Olšák2012-03-301-10/+13
|
* gallium/util: add helper function util_query_clear_resultMarek Olšák2012-03-301-0/+30
|
* gallium: adapt to get_query_result interface changeMarek Olšák2012-03-3016-29/+32
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: make get_query_result return union* and not void*Marek Olšák2012-03-302-1/+55
| | | | | | | | | | | | | | | This replaces the cryptic void* parameter with a union. (based on union r600_query_result) Users of this can still pass uint64* in it, but that cannot work for every query type, obviously. Most importantly, the code now documents what should be expected from get_query_result. This also adds pipe_query_data_pipeline_statistics as per the D3D11 docs. v2: fix indentation, add comments and use the doxygen style Reviewed-by: Brian Paul <[email protected]>
* configure: Add --with-llvm-shared-libsTom Stellard2012-03-301-2/+13
| | | | | | This option allows targets to link against the LLVM shared library instead of the static libs. With LLVM 2.9, his saves ~11 MB for each of the r300 target libraries.
* shared-glapi: Include from builddirKristian Høgsberg2012-03-291-0/+1
| | | | | | Fixes out-of-tree builds. https://bugs.freedesktop.org/show_bug.cgi?id=47649
* gallivm: Fix method overriding in raw_debug_ostream.Vinson Lee2012-03-281-3/+3
| | | | | | | Use matching type qualifers to avoid method hiding. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* egl_dri2: use gbm_surface as the native window type in drm platformAnder Conselvan de Oliveira2012-03-282-1/+324
|
* gbm: Create hooks for dri2_loader_extension in dri backendAnder Conselvan de Oliveira2012-03-282-2/+66
| | | | | | Pass a dri2_loader extension to the dri driver when gbm creates the dri screen. The implementation jumps through pointers in the gbm device so that an EGL on GBM implementation can provide the real implementations.
* gbm: Add gbm_surface interfaceAnder Conselvan de Oliveira2012-03-285-5/+186
| | | | | | | | | | | | The idea here is to be able to create an egl window surface from a gbm_surface. This avoids the need for the surfaceless extension and lets the EGL platform handle buffer allocation, while keeping the user in charge of somehow presenting the buffers (using kms page flipping, for example). gbm_surface_lock_front_buffer() locks a surface's front buffer and returns a gbm bo representing it. This bo should later be returned to the gbm surface using gbm_surface_release_buffer().
* draw: fix missing immediates bug in polygon stipple codeBrian Paul2012-03-281-0/+5
| | | | | | | | The function that counts the number of TGSI immediates also needs to emit the immediates. This fixes assorted failures when using polygon stipple with fragment shaders that have their own immediates. NOTE: This is a candidate for the 8.0 branch.
* vl: move winsys helper out of winsys directoryChristian König2012-03-2830-78/+52
| | | | | | | | | They aren't winsys of their own, just help dealing with them. v2: add some more comments in vl_winsys.h Signed-off-by: Christian König <[email protected]>
* Use -no-undefined libtool flag in src/glx/Makefile.amJon TURNEY2012-03-281-1/+1
| | | | | | | | "Use -no-undefined to assure libtool that the library has no unresolved symbols at link time, so that libtool will build a shared library on platforms that require that all symbols are resolved when the library is linked." Signed-off-by: Jon TURNEY <[email protected]>
* intel: fix un-blanced map_refcount issueYuanhan Liu2012-03-281-4/+4
| | | | | | | | | | | | | | | This is a regression introduced by commit cdcfd5, which forget to increase the map_refcount for successfully-mapped region. Thus caused a wrong non-blanced map_refcount. This would fix the regression found in the two following webglc testcase on Pineview platform: texture-npot.html gl-max-texture-dimensions.html Cc: Anuj Phogat <[email protected]> Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* glx:dri_common.c: check psc->driScreen->createDrawable return valueWang YanQing2012-03-281-0/+6
| | | | | | | | | | createDrawable may return NULL value, we should check it, or it will make a segment failed. [minor-indent-issue-fixed-by: Yuanhan Liu] Signed-off-by: Wang YanQing <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* r600g: also disable transform feedback on caymanMarek Olšák2012-03-281-3/+4
| | | | | It's said to cause troubles there. The env var is R600_STREAMOUT again.