summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i915: set SPRITE_POINT_ENABLE bit correctlyYuanhan Liu2012-04-094-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SPRITE_POINT_ENABLE bit is set, the texture coord would be replaced, and this is only needed when we called something like glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE). And more, we currently handle varying inputs as texture coord, we would be careful when setting this bit and set it just when needed, or you will find the value of varying input is not right and changed. Thus we do set SPRITE_POINT_ENABLE bit only when all enabled tex coord units need do CoordReplace. Or fallback is needed to make sure the rendering is right. With handling the bit setup at i915_update_sprite_point_enable(), we don't need the relative code at i915Enable then. This patch would _really_ fix the webglc point-size.html test case and of course, not regress piglit point-sprite and glean-pointSprite testcase. NOTE: This is a candidate for stable release branches. v2: fallback just when all enabled tex coord units need do CoordReplace (Eric) v3: move the sprite point validate code at I915InvalidateState (Eric) v4: sprite point enable bit update based on _NEW_PROGRAM, too add relative _NEW-state comments to show what state is being used(Eric) Signed-off-by: Yuanhan Liu <[email protected]>
* glx: fix compile warningsYuanhan Liu2012-04-091-0/+2
| | | | | | | | Fix 'set but not used' warnings; gl_version, gl_versions_profiles and glx_extensions variables are used just only HAVE_XCB_GLX_CREATE_CONTEXT is defined. Thus those warnings are shown when that macro isn't defined. Signed-off-by: Yuanhan Liu <[email protected]>
* st/xa: Link with -Wl,-r instead of -r.Johannes Obermayr2012-04-071-1/+1
| | | | | This is required to link with clang: /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400160.
* tgsi: Fix conflict with fortify printf redirect in glibc.Johannes Obermayr2012-04-071-17/+17
| | | | | | | | | | | | | | | | Fixes clang error: tgsi/tgsi_dump.c:72:12: error: no member named '__printf_chk' in 'struct dump_ctx' ctx->printf( ctx, "%u", e ); ~~~ ^ /usr/include/bits/stdio2.h:109:3: note: expanded from macro 'printf' __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__) ^ Idea stolen from: http://www.mail-archive.com/[email protected]/msg210998.html Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix max_offset computation for base vertexBrian Paul2012-04-061-2/+18
| | | | | | | | | | | | | | Add the maximum base vertex offset to max_index for computing the buffer size. Fixes a failed assertion in the u_upload_mgr.c code with the VMware svga driver. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48141 v2: incorporate Marek's suggestions. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Marek Olšák <[email protected]>
* svga: add missing cases for PIPE_CAP_x queriesBrian Paul2012-04-061-7/+42
| | | | | | | | | Return 0 for features we don't support. Added debug_printf() warnings when we fail to handle a new PIPE_CAP_x case. That will alert us to interfaces changes in the future. We don't want to just ignore new PIPE_CAPs and possibly miss something important. Reviewed-by: José Fonseca <[email protected]>
* svga: return 1 for PIPE_CAP_VERTEX_COLOR_UNCLAMPED queryBrian Paul2012-04-061-0/+7
| | | | | | | | | | | Before, we weren't clamping the vertex colors produced by ARB vertex programs. This could result in some rendering being too bright (in ETQW, for example). Also add cases for PIPE_CAP_VERTEX_COLOR_CLAMPED and PIPE_CAP_FRAGMENT_COLOR_CLAMPED with comments to be complete. Reviewed-by: José Fonseca <[email protected]>
* svga: handle TGSI_SEMANTIC_CLIPDIST/VERTEX semanticsBrian Paul2012-04-061-0/+7
| | | | | | | We can't support these vertex attributes, but don't die in an assertion. Issue a warning instead. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48142
* gallium/docs: fix typosBrian Paul2012-04-061-2/+2
|
* i965: Actually upload sampler state pointers for the VS unit on Gen6.Kenneth Graunke2012-04-051-1/+1
| | | | | | | | | | | | | | We already program all the sampler state correctly, we just didn't give the GPU a pointer to it for the VS stage. Thus, any texturing other than texelFetch() wouldn't work. Fixes piglit test vs-textureLod-miplevels and 99 of oglconform's glsl-bif-tex subtests. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallivm: Updated lp_build_log2_approx to use a more accurate polynomial.James Benton2012-04-053-34/+43
| | | | | | | Tested with lp_test_arit with 100% passes and piglit tests with 100% pass for log but some tests still fail for pow. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Updated lp_build_polynomial to compute odd and even terms ↵James Benton2012-04-051-7/+25
| | | | | | separately to decrease data dependency for faster runtime. Signed-off-by: José Fonseca <[email protected]>
* xatracker: fix the build of a 32bit lib on a 64bit osAlexandre Demers2012-04-051-1/+1
| | | | | | we were missing cflags. Signed-off-by: Zack Rusin <[email protected]>
* r600g: inline r600_upload_index_bufferMarek Olšák2012-04-043-14/+5
|
* r600g: inline r600_upload_const_bufferMarek Olšák2012-04-043-50/+32
|
* r600g: handle DISCARD_WHOLE_RESOURCE for buffersMarek Olšák2012-04-042-1/+60
| | | | | | This should prevent stalls and therefore increase perfomance in some cases. Reviewed-by: Alex Deucher <[email protected]>
* r600g: invalidate caches at the beginning of CSMarek Olšák2012-04-041-0/+9
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove dead code after the reworkMarek Olšák2012-04-045-125/+8
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: rework state emission of constant buffersMarek Olšák2012-04-046-93/+188
| | | | | | | | Framerate in ipers: before: 43.6 FPS after: 46.6 FPS Reviewed-by: Alex Deucher <[email protected]>
* r600g: rework state emission of vertex buffersMarek Olšák2012-04-047-67/+93
| | | | | | | | | | | | This reduces a little of CPU overhead. The idea is to translate pipe vertex buffers directly into the CS and not using any intermediate representations. Framerate in Torcs: before: 32.2 after: 34.6 Reviewed-by: Alex Deucher <[email protected]>
* r600g: kill off the fallback for crazy src_offset valuesMarek Olšák2012-04-043-51/+17
| | | | | | | st/mesa doesn't allow src_offset to be greater than stride and the maximum stride r600 supports is 2047. Reviewed-by: Alex Deucher <[email protected]>
* st/xvmc: fix library installation dirAlexandre Demers2012-04-043-4/+15
| | | | | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47878 v2: some reordering and while at it also fix the comment in Makefile.xvmc Signed-off-by: Christian König <[email protected]>
* r300g/swtcl: fix crash when back color is present in vertex shaderMarek Olšák2012-04-041-39/+56
| | | | The shader transformation code sometimes produced invalid TGSI.
* r300g/swtcl: initialize some Draw optionsMarek Olšák2012-04-041-0/+3
|
* r300g/swtcl: fix polygon offsetMarek Olšák2012-04-041-0/+4
|
* r300g/swtcl: don't expose shader subroutine supportMarek Olšák2012-04-041-0/+1
| | | | RET in the main function doesn't work. This should be fixed in Draw, but meh.
* r300g: initialize state & render functions before creating u_vbuf & u_blitterMarek Olšák2012-04-043-11/+15
|
* r300g/swtcl: don't enter u_vbuf_mgrMarek Olšák2012-04-045-34/+48
|
* r300g/swtcl: don't print an error when getting ClipVertexMarek Olšák2012-04-044-9/+21
| | | | Draw can do it just fine.
* st/egl: Update to the new wl_shm_pool interfaceBenjamin Franzke2012-04-033-3/+10
|
* 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.