summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* svga: fix incorrect user buffer size computation for instance divisor caseBrian Paul2011-07-011-3/+3
| | | | See preceeding commit for more info.
* svga: fix incorrect user buffer size computationBrian Paul2011-07-011-1/+3
| | | | | | | | | | Viewperf uses some unusual vertex arrays where the stride is less than the element size. In this case, the stride was 4 while the element size was 12. The difference of 8 bytes causes us to miss uploading the tail bit of the array data. Typically the stride is >= the element size so there was no problem with other apps.
* svga: Handle null buffers in svga_buffer_is_user_buffer().José Fonseca2011-07-011-1/+5
|
* gallium/svga: Upload only parts of user-buffers that we actually useThomas Hellstrom2011-07-016-71/+208
| | | | | | | | | | Stream user buffer contents rather than trying to maintain persistent host / hardware copies. Resulting negative array offsets are not allowed by the hardware, (well, at least not according to header files), so adjust index bias to make all array offsets positive. Signed-off-by: Thomas Hellstrom <[email protected]>
* gallium/svga: Make use of u_upload_flush().Thomas Hellstrom2011-07-012-2/+10
| | | | | | This enables us to pack more data into single upload buffers. Signed-off-by: Thomas Hellstrom <[email protected]>
* gallium/util: Upload manager optimizationsThomas Hellstrom2011-07-012-13/+42
| | | | | | | | | | | | Make sure that the upload manager doesn't upload data that's not dirty. This speeds up the viewperf test proe-04/1 a factor 5 or so on svga. Also introduce an u_upload_unmap() function that can be used instead of u_upload_flush() so that we can pack even more data in upload buffers. With this we can basically reuse the upload buffer across flushes. Signed-off-by: Thomas Hellstrom <[email protected]>
* svga: Flush when switching between HW to SW TNL, after updating need_swtnl.José Fonseca2011-07-012-11/+15
| | | | | Also, only flush when going from HW TNL to SW TNL, given it is impossible for the buffers resulting from SWTNL to be ever referred by HW TNL path.
* egl: fix a compiler warningChia-I Wu2011-07-011-0/+1
|
* st/egl: fix a typoChia-I Wu2011-07-011-2/+2
| | | | Wrong goto labels.
* st/egl: remove unused headerChia-I Wu2011-07-011-3/+0
|
* autoconf: fix --disable-glxChia-I Wu2011-07-011-16/+23
| | | | | | | libdrm is used in multiple places. Always check for it and set have_libdrm. Each user can then check the variable. This is useful when only EGL and DRI drivers are needed.
* autoconf: fix --disable-driChia-I Wu2011-07-011-20/+13
| | | | | Define GLX_INDIRECT_RENDERING and GLX_DIRECT_RENDERING when $enable_glx, not $enable_dri.
* autoconf: add --enable-{dri,glx,osmesa}Chia-I Wu2011-07-011-124/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is that DRI driver, libGL and libOSMesa are libraries that can be independently enabled, yet --with-driver does not allow us to easily do that, if not impossible. This also matches what --enable-{egl,xorg,d3d1x} do for the respective libraries. There are two libGL providers: Xlib-based and DRI-based. They cannot coexist. To be able to choose between them, --enable-xlib-glx is also added. With this commit, --with-driver=dri can be replaced by $ ./configure --enable-dri --enable-glx --disable-osmesa --with-driver=xlib can be replaced by $ ./configure --disable-dri --enable-glx --enable-osmesa \ --enable-xlib-glx and --with-driver=osmesa can be replaced by $ ./configure --disable-dri --disable-glx --enable-osmesa Some combinations that cannot be supported with --with-driver will produce errors at the moment. But in the future, we would like to support, for example, $ ./configure --enable-dri --disable-glx --enable-egl (build libEGL and DRI drivers, but not libGL) Note that this commit still keeps --with-driver for transitional purpose.
* gallivm: Pass in CPU name to createTargetMachine when on llvm-3.0.Vinson Lee2011-06-301-0/+4
| | | | | llvm-3.0svn revision 134127 changed createTargetMachine to take in an additional argument of the CPU name.
* gallivm: Rename TargetInstrDesc to MCInstrDesc when using llvm-3.0.Vinson Lee2011-06-301-0/+4
| | | | llvm-3.0svn revision 134021 renamed TargetInstrDesc to MCInstrDesc.
* docs: add GL3 GLX todoMarek Olšák2011-06-301-1/+2
|
* r600g: fix check for empty csVadim Girlin2011-06-303-4/+4
|
* docs: update GL3 status - vertex texturesMarek Olšák2011-06-301-1/+1
| | | | They work fine on r600g.
* scons: Expose pkg-config in a simpler manner.José Fonseca2011-06-3017-82/+113
|
* scons: Buid libGL.so (WIP).José Fonseca2011-06-304-4/+20
|
* scons: Make declaration-after-statement and pointer-arith just warnings.José Fonseca2011-06-301-2/+2
| | | | Necessary, in order to build the whole tree.
* i915g: Implement surface format fixup without adding an extra instruction.Stéphane Marchesin2011-06-301-31/+54
| | | | We also avoid writing output color twice, which might not work when we run out of phases.
* i915g: update TODO.Stéphane Marchesin2011-06-291-0/+2
|
* target/egl-static: fix a compiler warningChia-I Wu2011-06-301-0/+3
|
* i915g: Try to do better in the shader compiler.Stéphane Marchesin2011-06-293-20/+41
| | | | | | - Copy i915c's support for phases, that should allow us to run a coupe more shaders. - Fix the error messages. - Still try to proceed when we get a shader that's too long.
* Gallium:draw:aaline and aapoint: Restore the old hooks when we destroy our ↵Stéphane Marchesin2011-06-292-0/+17
| | | | stage.
* glsl: Don't use MOD_TO_FRACT lowering on GLSL 1.30's % operator.Kenneth Graunke2011-06-291-1/+1
| | | | | | | | | | | | | MOD_TO_FRACT was designed to lower the GLSL 1.20 mod() function, which operates on floating point values. However, we also use ir_binop_mod for GLSL 1.30's % operator, which operates on integers. For now, make MOD_TO_FRACT only apply to floating-point mod operations. In the future, we may want to add a lowering pass for integer-based mod. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Fix DIV_TO_MUL_RCP lowering for uint result types.Kenneth Graunke2011-06-291-2/+7
| | | | | | | | f2i results in an int/ivec; we need i2u to get a uint/uvec. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Distinguish "type mismatch" error messages for modulus operator.Kenneth Graunke2011-06-291-3/+11
| | | | | | | | | | | | | Previously, it would simply say "type error" in three different cases: - The LHS is not an integer - The RHS is not an integer - The LHS and RHS have different base types (int vs. uint) Now the error messages state the specific problem. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Find the "closest" signature when there are multiple matches.Kenneth Graunke2011-06-291-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, ir_function::matching_signature had a fatal bug: if a function had more than one non-exact match, it would simply return NULL. This occured, for example, when looking for max(uvec3, uvec3): - max(vec3, vec3) -> score 1 (found first) - max(ivec3, ivec3) -> score 1 (found second...used to return NULL here) - max(uvec3, uvec3) -> score 0 (exact match...the right answer) This did not occur for max(ivec3, ivec3) since the second match found was an exact match. The new behavior is to return a match with the lowest score. If there is an exact match, that will be returned. Otherwise, a match with the least number of implicit conversions is chosen. Fixes piglit tests max-uvec3.vert and glsl-inexact-overloads.shader_test. NOTE: This is a candidate for the 7.10 and 7.11 branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Use i2u and u2i to implement constructor conversions.Kenneth Graunke2011-06-291-6/+29
| | | | | | | | | | | | | | Inspired by a patch from Bryan Cain <[email protected]>. Fixes piglit tests: - ctor-int-uint.vert - ctor-ivec4-uvec4.vert - ctor-uint-int.vert - ctor-uvec4-ivec4.vert Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Implement new ir_unop_u2i and ir_unop_i2u opcodes.Kenneth Graunke2011-06-292-0/+10
| | | | | | | | | | No MOV is necessary since signed/unsigned integers share the same bit-representation; it's simply a question of interpretation. In particular, the fs_reg::imm union shouldn't need updating. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* ir_to_mesa: "Support" u2f, i2u, and u2i operations by doing nothing.Kenneth Graunke2011-06-291-1/+3
| | | | | | | | | Mesa IR actually stores all numbers as floating point, so this is totally a farce, but we may as well keep it going. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Revert "fix conversions from uint to bool and from..."Kenneth Graunke2011-06-291-3/+3
| | | | | | | | | | Reverts commit f41e1db3273a31285360241c4342f0a403ee0b03 "fix conversions from uint to bool and from float/bool to uint" f2i, b2i, and b2i should not accept uint types. Use i2u and u2i. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Add ir_unop_i2u and ir_unop_u2i operations.Bryan Cain2011-06-294-1/+30
| | | | | | | | | | | | | | | | | These are necessary to handle int/uint constructor conversions. For example, the following code currently results in a type mismatch: int x = 7; uint y = uint(x); In particular, uint(x) still has type int. This commit simply adds the new operations; it does not generate them, nor does it add backend support for them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Use the default values of ir_assignment() in lower_mat_op_to_vec.Eric Anholt2011-06-291-24/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Allow ir_assignment() constructor to not specify condition.Eric Anholt2011-06-291-1/+1
| | | | | | | | | | | We almost never want to specify a condition, and when we do we're already thinking about it (because we're writing a lowering pass generating the condition), so a default argument should make the code more pleasant to read. NOTE: This is a candidate for the 7.11 branch (we want to be able to cherry-pick future code). Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Avoid making a temporary for lower_mat_op_to_vec if not needed.Eric Anholt2011-06-291-0/+11
| | | | | | | | | | | | | Our copy propagation tends to be bad at handling the later array accesses of the matrix argument we moved to a temporary. Generally we don't need to move it to a temporary, though, so this avoids needing more copy propagation complexity. Reduces instruction count of some Unigine Tropics and Sanctuary fragment shaders that do operations on uniform matrix arrays by 5.9% on gen6. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Make lower_mat_op_to_vec track derefs, not variables.Eric Anholt2011-06-291-71/+56
| | | | | | | We were constrained to using temporaries because we were assuming variables all over. This simplifies things a bit. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Rename lower_mat_op_to_vec operands/results to be less hungarian.Eric Anholt2011-06-291-74/+74
| | | | | | | | | | | This awkward typing was to avoid shadowing the function argument (the matrix) with the temporary deref (the column) before the get_column()/get_element()s were moved into the expression/assignment constructors. They're about to become not-variables, so the current names had to go. This change is almost mechanical (other than column_expr), so it should make the next diff clearer. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Move get_{column,element} to expression args.Eric Anholt2011-06-291-43/+22
| | | | | | | | I think this makes the code more obvious by moving the declarations to their single usage (now that we aren't using them to get at the ->type field for expression constructors). Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Drop explicit types of lower_mat_op_to_vec expressions.Eric Anholt2011-06-291-27/+6
| | | | | | The constructor can figure it out for us these days. Reviewed-by: Kenneth Graunke <[email protected]>
* drisw: Remove cargo culting that breaks GLX 1.3 ctorsAdam Jackson2011-06-291-4/+0
| | | | Signed-off-by: Adam Jackson <[email protected]>
* glx: Verify that drawable creation on the client side actually workedAdam Jackson2011-06-292-26/+63
| | | | | | ... and clean up if it didn't. Signed-off-by: Adam Jackson <[email protected]>
* glx: Alias glXFreeContextEXT to glXDestroyContextAdam Jackson2011-06-291-14/+6
| | | | Signed-off-by: Adam Jackson <[email protected]>
* i965/gen7: Add missing ! to brw->gs.prog_active assertion.Kenneth Graunke2011-06-291-1/+1
| | | | | | | | | A typo in commit c173541d9769 accidentally removed the !. It's supposed to assert that there is _not_ an active GS program. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38762 Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: bump version to 7.12 (devel)Brian Paul2011-06-293-4/+4
|
* configs: add libdrm cflags to linux-llvm configBrian Paul2011-06-291-0/+3
|
* i915g: Move definition of M_PI in i915_fpc_translate.cJon TURNEY2011-06-291-5/+3
| | | | | | | | Move defintion of M_PI (for the benefit of <math.h> which do not define it), to before the first use of it Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: s/tex_usage/bindings/ in st_format.hBrian Paul2011-06-291-1/+1
| | | | Just be consistent with the .c file.