Commit Graph

16167 Commits

Author SHA1 Message Date
Brian Paul 2e77a39d2f mesa: add support for 'invariant' keyword for GLSL 1.20
(cherry picked from commit 448156f769)

Conflicts:

	src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
2009-01-06 08:35:16 -07:00
Brian Paul 4adeac5af1 mesa: reformat comments, rewrap lines, etc for a little better readability
(cherry picked from commit b632e5aa7f)
2009-01-06 08:32:44 -07:00
Brian Paul 62bf6cf6c7 gallium: Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV
This is copied from Ian's commit a330933bb7
2009-01-06 08:08:26 -07:00
José Fonseca 8ee1df0652 scons: Specify C99 throughout all the tree.
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.

Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
2009-01-05 15:24:56 +00:00
Brian Paul 49c40b10c7 gallium: implement TGSI_OPCODE_DP2A, add sqrt to NRM3/NRM4 2008-12-24 14:14:07 +01:00
Keith Whitwell fc4cea08fe tgsi: fix incomplete rename of loop counter variable 2008-12-23 18:16:49 +00:00
Keith Whitwell f5d4274b4a draw: allow driver-override of draw_need_pipeline() 2008-12-23 15:11:41 +00:00
Michal Krol ed7ba03256 tgsi: Dump indirect register swizzle. 2008-12-23 15:13:59 +01:00
Michal Krol 4b3c74b4d6 tgsi: Return 0.0 for negative constant register indices. 2008-12-22 21:43:07 +01:00
Michal Krol b8e68f2e55 tgsi: Keep address register as a floating point. 2008-12-22 21:43:05 +01:00
José Fonseca 417a78bdad softpipe: Don't fill surfaces's winsys fields.
This is sometimes checked to distinguish between texture views and
(deprecated) standalone surfaces.
2008-12-22 20:23:59 +00:00
José Fonseca fc16ba8553 softpipe: Call surface_alloc_storage to get the pipebuffer for display targets.
Otherwise blitting from display target surfaces to front screen fails in
several platforms.
2008-12-22 20:20:58 +00:00
Jerome Glisse 5f36c5b2c5 softpipe: initialize refcount and winsys 2008-12-22 18:56:20 +00:00
Jerome Glisse 85bc49a6f1 softpipe: convert to use texture instead of surface 2008-12-22 18:56:09 +00:00
José Fonseca ae7e75d610 gallium: const correctness. 2008-12-22 16:55:27 +00:00
José Fonseca 229424b2d7 Ignore new tests executables. 2008-12-21 13:48:43 +00:00
José Fonseca 9127a03bcb gallium: Fix typo in define name. 2008-12-20 12:59:51 +00:00
José Fonseca b901e1f212 gallium: Simple and efficient cache.
Fixed size hash table. Collisions are handled by simply destroying the
previous entry.

It hasn't received much testing yet.
2008-12-19 20:06:11 +00:00
Brian Paul 030a7a320c gallium: replace #elif with #else 2008-12-19 07:33:17 -07:00
Brian Paul 59a168d5c9 tgsi: scan for additional info: uses_fogcoord, uses_frontfacing 2008-12-18 18:08:32 -07:00
Brian Paul 78a204f507 gallium: fix two-sided lighting test in state tracker
This fixes two-sided lighting for vertex shaders.
2008-12-18 16:12:08 -07:00
Robert Ellison 36c7bb697d Gallium: fix for conform test
The following construction in util_surface_copy() in
gallium/auxiliary/util/u_rect.c, introduced in commit
d177c9ddda, incorrectly inverts
the Y coordinate in the last parameter to pipe_copy_rect().

      /* If do_flip, invert src_y position and pass negative src stride
*/
      pipe_copy_rect(dst_map,
                     &dst->block,
                     dst->stride,
                     dst_x, dst_y,
                     w, h,
                     src_map,
                     do_flip ? -(int) src->stride : src->stride,
                     src_x,
                     do_flip ? w - src_y : src_y);

The intention is to start at the last Y coordinate line and move
backwards, in the case of a flip; in that case, the correct
calculation is "src_y + h - 1", not "w - src_y".

This fixes a Gallium assertion failure in the conformance tests:

      u_rect.c:65:pipe_copy_rect: Assertion `src_y >= 0' failed.
      debug_get_bool_option: GALLIUM_ABORT_ON_ASSERT = TRUE
      Trace/breakpoint trap
2008-12-18 11:25:27 -07:00
Michal Krol 97d08366aa glsl: Fix handling of nested parens in macro actual arguments. 2008-12-18 11:14:11 -07:00
Eric Anholt a402d48f84 mesa: Pass the context to query object delete cb to avoid null dereference. 2008-12-18 09:47:49 -07:00
José Fonseca 92dc8ffa71 gallium: Enable memory debugging on all windows platforms. 2008-12-18 14:59:42 +00:00
Brian Paul f9c76750a7 mesa: choose GLSL vertex shader over ARB/internal vertex program in get_fp_input_mask()
This is a work-around the for the fact that we do fragment shader state
validation before vertex shader validation (see comments in state.c) so in
get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to
date yet.

This fixes a glean glsl1 test failure.
2008-12-17 19:05:26 -07:00
Brian Paul b890fffbf4 gallium: fix memory corruption in u_gen_mipmap.c
Remove the old/initial vbuf allocation in util_create_gen_mipmap().
We were allocating a small vbuf at this point so get_next_slot() didn't have
as large of buffer as it expected.  So all but the first set_vertex_data()
was writing out of bounds.

Also added some comments.
2008-12-17 19:05:14 -07:00
Brian Paul 947d04d08b mesa: fix fixed-function test in get_fp_input_mask() - again.
The problem we're solving only occured when there was a user-defined
vertex shader but no fragment shader.  Check for that case now.
Fixes glean api2 vertex array failure.
2008-12-17 14:06:56 -07:00
Brian Paul 35bb2aa96a mesa: add missing cases for texture array targets 2008-12-17 14:06:34 -07:00
Brian Paul a8751f4916 Revert "mesa: fix vertex program test in get_fp_input_mask()"
This reverts commit cdaaf8e107.
2008-12-17 11:29:42 -07:00
Brian Paul cdaaf8e107 mesa: fix vertex program test in get_fp_input_mask()
We were accidentally using the fixed-function logic when a vertex shader was
being used.
2008-12-17 10:55:40 -07:00
Brian Paul 2a299851b9 winsys: fix depth buffer size when using stencil 2008-12-17 10:55:29 -07:00
Michal Krol 95ce6474f4 gallium: Fix PIPE_FORMAT_X8B8G8R8_SNORM definition. 2008-12-15 12:29:34 +01:00
Keith Whitwell 3a5d260cb1 gallium: fix refcount bug introduced in eb20e2984 2008-12-12 18:34:49 +00:00
Keith Whitwell 56f36ed166 Merge branch 'no-validate' into gallium-0.1 2008-12-12 17:41:49 +00:00
Keith Whitwell d2c2e9316d gallium: avoid mapping same vertex buffer in subsequent frames
Quite a few util modules were maintaining a single vertex buffer over multiple
frames, and potentially reusing it in subsequent frames.  Unfortunately that
would force us into syncrhonous rendering as the buffer manager would be
forced to wait for the previous rendering to complete prior to allowing the
map.

This resolves that issue, but requires the state tracker to issue a few new
flush() calls at the end of each frame.
2008-12-12 16:57:39 +00:00
Keith Whitwell eb20e2984e st: reduce unnecessary calls to pipe->set_vertex_buffers() 2008-12-12 16:57:38 +00:00
Keith Whitwell 8627a14ec8 st: move feedback draw function to new file 2008-12-12 16:57:38 +00:00
Keith Whitwell ec007dbe0f st: don't unilaterally ABS the argument to RSQ 2008-12-12 16:57:38 +00:00
Keith Whitwell aef455c4a7 Revert "pipebuffer: Implement proper buffer validation."
This reverts commit a6d866f72c.
2008-12-12 12:05:39 +00:00
Keith Whitwell 9b3bce6bed Revert "pipebuffer: Ondemand buffer manager."
This reverts commit 17849eafaa.
2008-12-12 12:05:30 +00:00
Keith Whitwell 71051f1f40 Revert "pipebuffer: Fix buffer overflow."
This reverts commit 55839ae064.
2008-12-12 12:05:21 +00:00
José Fonseca d725537dba glut: MinGW portability fixes.
Still, it doesn't run as well as the glut binaries...
2008-12-12 16:06:42 +09:00
José Fonseca e9e43321ee gdi: Reimplement using the WGL statetracker. 2008-12-12 16:06:34 +09:00
José Fonseca 638e942959 mesa: Bring in new mesa sub-statetracker.
Some code cleanup is still in order.
2008-12-12 16:06:28 +09:00
José Fonseca 500b304463 scons: Build progs.
Just demos and trivial dirs for starters.

Conflicts:

	.gitignore
2008-12-12 12:37:21 +09:00
José Fonseca fa6ee2c2bb scons: Allow to request the winddk toolchain. 2008-12-12 09:47:20 +09:00
Keith Whitwell 72d456494a st: reduce unnecessary calls to pipe->set_vertex_buffers() 2008-12-11 14:02:10 +00:00
Keith Whitwell e8347a6000 st: move feedback draw function to new file 2008-12-11 14:02:10 +00:00
Keith Whitwell 8355568abd st: don't unilaterally ABS the argument to RSQ 2008-12-11 14:02:10 +00:00