mesa.git
15 years agoMerge branch 'mesa_7_5_branch'
Jakob Bornecrantz [Sun, 14 Jun 2009 14:56:34 +0000 (16:56 +0200)]
Merge branch 'mesa_7_5_branch'

15 years agoprogs/glsl: compile with scons and glew
Keith Whitwell [Mon, 29 Jun 2009 13:13:58 +0000 (14:13 +0100)]
progs/glsl: compile with scons and glew

Get most of these working with scons.

15 years agoscons: Don't raise an exception when DXSDK is not found.
José Fonseca [Mon, 29 Jun 2009 11:56:47 +0000 (12:56 +0100)]
scons: Don't raise an exception when DXSDK is not found.

Unfortunately scons does not check if a tool exists before it invokes
its generate function.

15 years agoRevert "r200: make use of DMA buffers for Elts a lot better."
Dave Airlie [Mon, 29 Jun 2009 10:15:47 +0000 (20:15 +1000)]
Revert "r200: make use of DMA buffers for Elts a lot better."

This reverts commit 0952645fe04a27968565ea4d913500c23b1b11e3.

Need to revisit where this is going wrong

15 years agoscons: Disable optimizations only for gcc-4.2
José Fonseca [Sun, 28 Jun 2009 10:12:22 +0000 (11:12 +0100)]
scons: Disable optimizations only for gcc-4.2

gcc-4.2's optimizer has a strange bug where it looses code from inner
loops in certain situations. For example, if the appearently innocent
looking code below is compiled with gcc-4.2 -S -O1, the inner loop's
code is missing from the outputed assembly.

   struct Size {
      unsigned width;
   };

   struct Command {
      unsigned length;
      struct Size sizes[32];
   };

   extern void emit_command(void *command, unsigned length);

   void
   create_surface( struct Size size, unsigned faces, unsigned levels)
   {
      struct Command cmd;
      unsigned face;
      unsigned level;

      cmd.length = faces*levels*sizeof(cmd.sizes[0]);

      for(face = 0; face < faces; ++face) {
 for(level = 0; level < levels; ++level) {
    cmd.sizes[face*levels + level] = size;
    // This should generate a shrl statement, but the whole for body
    // disappears in gcc-4.2 -O1/-O2/-O3!
    size.width >>= 1;
 }
      }

      emit(&cmd, sizeof cmd.length + cmd.length);
   }

Note that this is not specific to MinGW's gcc-4.2 crosscompiler (the
version typically found in debian/ubuntu's mingw32 packages). gcc-4.2 on
Linux also displays the same error. gcc-4.3 and above gets this
correctly though.

Updated MinGW debian packages with gcc-4.3 are available from
http://people.freedesktop.org/~jrfonseca/debian/pool/main/m/

15 years agoscons: Use -Bsymbolic linker option.
José Fonseca [Sun, 28 Jun 2009 09:54:23 +0000 (10:54 +0100)]
scons: Use -Bsymbolic linker option.

This prevents the error

  relocation R_X86_64_PC32 against symbol `_gl_DispatchTSD' can not be used when making a shared object; recompile with -fPIC

when building on x86_64 architecture.

15 years agor300g: YCbCr and sRGB textures.
Corbin Simpson [Sat, 27 Jun 2009 18:58:00 +0000 (11:58 -0700)]
r300g: YCbCr and sRGB textures.

15 years agor300g: Fix EXT_packed_depth_stencil functionality.
Corbin Simpson [Sat, 27 Jun 2009 17:57:03 +0000 (10:57 -0700)]
r300g: Fix EXT_packed_depth_stencil functionality.

Allow Z24S8 to be a true texture.

15 years agost/dri: Fix last depth bits logic
Jakob Bornecrantz [Sat, 27 Jun 2009 17:55:37 +0000 (19:55 +0200)]
st/dri: Fix last depth bits logic

15 years agoradeon: Always initialize front and back renderbuffers if present
Nicolai Hähnle [Mon, 1 Jun 2009 20:17:07 +0000 (22:17 +0200)]
radeon: Always initialize front and back renderbuffers if present

This fixes an assertion in glReadPixels from the front buffer.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agoradeon: Update .gitignore
Nicolai Hähnle [Sat, 27 Jun 2009 16:08:44 +0000 (18:08 +0200)]
radeon: Update .gitignore

Add all source files that are symlink'ed from common radeon code to the
ignore list.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agor300g: EXT_provoking_vertex.
Corbin Simpson [Sat, 27 Jun 2009 04:48:09 +0000 (21:48 -0700)]
r300g: EXT_provoking_vertex.

15 years agor300g: S3TC.
Corbin Simpson [Sat, 27 Jun 2009 04:13:57 +0000 (21:13 -0700)]
r300g: S3TC.

tests/texcompress2 doesn't work, but tests/texcmp does (more or less.)

15 years agor300g: Use real texture formats.
Corbin Simpson [Sat, 27 Jun 2009 03:37:06 +0000 (20:37 -0700)]
r300g: Use real texture formats.

What bugs me is that the YUV444 format somehow worked properly. :3

15 years agor300g: Definitively forbid unusable Z buffer/stencil formats.
Corbin Simpson [Sat, 27 Jun 2009 02:39:24 +0000 (19:39 -0700)]
r300g: Definitively forbid unusable Z buffer/stencil formats.

15 years agor300g: Comment out assert for now.
Corbin Simpson [Sat, 27 Jun 2009 00:42:52 +0000 (17:42 -0700)]
r300g: Comment out assert for now.

Will fix with better constant refactoring later.

15 years agor300g: Be more specific on surface_copy fallbacks.
Corbin Simpson [Sat, 27 Jun 2009 00:39:34 +0000 (17:39 -0700)]
r300g: Be more specific on surface_copy fallbacks.

15 years agor300g: PIPE_CAP_TGSI_CONT_SUPPORTED.
Corbin Simpson [Fri, 26 Jun 2009 23:32:53 +0000 (16:32 -0700)]
r300g: PIPE_CAP_TGSI_CONT_SUPPORTED.

15 years agor300-gallium: Ensure that no dirty state goes unemitted.
Corbin Simpson [Tue, 9 Jun 2009 06:52:43 +0000 (23:52 -0700)]
r300-gallium: Ensure that no dirty state goes unemitted.

15 years agoMerge branch 'arb_vertex_array_object'
Brian Paul [Fri, 26 Jun 2009 23:49:14 +0000 (17:49 -0600)]
Merge branch 'arb_vertex_array_object'

15 years agoMerge branch 'mesa_7_5_branch'
Brian Paul [Fri, 26 Jun 2009 23:07:07 +0000 (17:07 -0600)]
Merge branch 'mesa_7_5_branch'

Conflicts:

Makefile
src/gallium/drivers/softpipe/sp_screen.c
src/mesa/main/version.h

15 years agodocs: detect when too many varying vars are used
Brian Paul [Fri, 26 Jun 2009 22:54:44 +0000 (16:54 -0600)]
docs: detect when too many varying vars are used

15 years agoglsl: check number of varying variables against the limit
Brian Paul [Fri, 26 Jun 2009 22:53:46 +0000 (16:53 -0600)]
glsl: check number of varying variables against the limit

Link fails if too many varying vars.

(cherry picked from master, commit cc58fbcf2c5c88f406818db60910f537e03610d6)

15 years agodocs: fix typos, remove old text from relnotes file
Brian Paul [Fri, 26 Jun 2009 22:47:57 +0000 (16:47 -0600)]
docs: fix typos, remove old text from relnotes file

15 years agodocs: bring over news updates from 7.4 branch
Brian Paul [Fri, 26 Jun 2009 22:46:21 +0000 (16:46 -0600)]
docs: bring over news updates from 7.4 branch

15 years agodocs: bring in 7.4.3 and 7.4.4 release notes, news
Brian Paul [Fri, 26 Jun 2009 22:45:54 +0000 (16:45 -0600)]
docs: bring in 7.4.3 and 7.4.4 release notes, news

15 years agodocs: increase max varying vars to 16
Brian Paul [Fri, 26 Jun 2009 22:41:54 +0000 (16:41 -0600)]
docs: increase max varying vars to 16

15 years agomesa: raise MAX_VARYING (number of shader varying vars) to 16
Brian Paul [Fri, 26 Jun 2009 22:33:46 +0000 (16:33 -0600)]
mesa: raise MAX_VARYING (number of shader varying vars) to 16

16 is the limit for now because of various 32-bit bitfields.

(cherry picked from master, commit 4e762395ef7e8c332c16fd0c11025cfa52763a45)

15 years agointel / DRI2: Additional flush of fake front-buffer to real front-buffer
Ian Romanick [Fri, 26 Jun 2009 20:30:16 +0000 (13:30 -0700)]
intel / DRI2: Additional flush of fake front-buffer to real front-buffer

To maintain correctness, the server will copy the real front-buffer to
a newly allocated fake front-buffer in DRI2GetBuffersWithFormat.
However, if the DRI2GetBuffersWithFormat is triggered by glViewport,
this will copy stale data into the new buffer.  Fix this by flushing
the current fake front-buffer to the real front-buffer in
intel_viewport.

Fixes bug #22288.

15 years agomesa: bump version to 7.5-rc4
Brian Paul [Fri, 26 Jun 2009 19:16:08 +0000 (13:16 -0600)]
mesa: bump version to 7.5-rc4

15 years agodocs: document for/continue bug fix
Brian Paul [Fri, 26 Jun 2009 19:15:17 +0000 (13:15 -0600)]
docs: document for/continue bug fix

15 years agocell: PIPE_CAP_TGSI_CONT_SUPPORTED query
Brian Paul [Fri, 26 Jun 2009 18:51:05 +0000 (12:51 -0600)]
cell: PIPE_CAP_TGSI_CONT_SUPPORTED query

15 years agosoftpipe: PIPE_CAP_TGSI_CONT_SUPPORTED query
Brian Paul [Fri, 26 Jun 2009 18:50:58 +0000 (12:50 -0600)]
softpipe: PIPE_CAP_TGSI_CONT_SUPPORTED query

15 years agogallium: added PIPE_CAP_TGSI_CONT_SUPPORTED
Brian Paul [Fri, 26 Jun 2009 18:50:45 +0000 (12:50 -0600)]
gallium: added PIPE_CAP_TGSI_CONT_SUPPORTED

15 years agoglsl: move/simplify error checking for 'return' statements
Brian Paul [Fri, 26 Jun 2009 18:34:03 +0000 (12:34 -0600)]
glsl: move/simplify error checking for 'return' statements

15 years agoglsl: overhaul 'return' statement handling
Brian Paul [Fri, 26 Jun 2009 17:33:05 +0000 (11:33 -0600)]
glsl: overhaul 'return' statement handling

A new node type (SLANG_OPER_RETURN_INLINED) is used to denote 'return'
statements inside inlined functions which need special handling.

All glean glsl1 tests pass for EmitContReturn=FALSE and TRUE.

15 years agoglsl: predicate assignments according to __returnFlag
Brian Paul [Thu, 25 Jun 2009 20:01:43 +0000 (14:01 -0600)]
glsl: predicate assignments according to __returnFlag

Fixes glean "function with early return (3)" case (when EmitContReturn=FALSE).

15 years agoglsl: added slang_variable::is_global field
Brian Paul [Thu, 25 Jun 2009 20:02:41 +0000 (14:02 -0600)]
glsl: added slang_variable::is_global field

15 years agoglsl: silence a problem warning
Brian Paul [Thu, 25 Jun 2009 17:52:37 +0000 (11:52 -0600)]
glsl: silence a problem warning

15 years agoglsl: code refactoring for return statements
Brian Paul [Thu, 25 Jun 2009 17:32:37 +0000 (11:32 -0600)]
glsl: code refactoring for return statements

15 years agoglsl: fix assorted regressions related to early-return-removal
Brian Paul [Thu, 25 Jun 2009 17:12:26 +0000 (11:12 -0600)]
glsl: fix assorted regressions related to early-return-removal

15 years agoglsl: comments, field reordering
Brian Paul [Thu, 25 Jun 2009 16:20:21 +0000 (10:20 -0600)]
glsl: comments, field reordering

15 years agoglsl: rework loop nesting code
Brian Paul [Thu, 25 Jun 2009 15:50:37 +0000 (09:50 -0600)]
glsl: rework loop nesting code

15 years agoglsl: remove test for loop unrolling when we hit conditional cont/break
Brian Paul [Thu, 25 Jun 2009 15:30:53 +0000 (09:30 -0600)]
glsl: remove test for loop unrolling when we hit conditional cont/break

This is no longer needed since we added the new
_slang_loop_contains_continue_or_break() function/test.

15 years agoglsl: checkpoint: predicate __retVal = expr with __returnFlag
Brian Paul [Wed, 24 Jun 2009 23:02:34 +0000 (17:02 -0600)]
glsl: checkpoint: predicate __retVal = expr with __returnFlag

The glean "function with early return (1)" test passes now.

15 years agoglsl: use new helper functions in _slang_gen_logical_and/or()
Brian Paul [Wed, 24 Jun 2009 22:37:01 +0000 (16:37 -0600)]
glsl: use new helper functions in _slang_gen_logical_and/or()

15 years agoglsl: add comments
Brian Paul [Wed, 24 Jun 2009 22:36:24 +0000 (16:36 -0600)]
glsl: add comments

15 years agoglsl: checkpoint: replace 'return' with __returnFlag=true;
Brian Paul [Wed, 24 Jun 2009 22:28:32 +0000 (16:28 -0600)]
glsl: checkpoint: replace 'return' with __returnFlag=true;

Needed for "remove early returns" transformation.

15 years agoglsl: fix up scoping for parent/children in slang_operation_copy()
Brian Paul [Wed, 24 Jun 2009 22:25:00 +0000 (16:25 -0600)]
glsl: fix up scoping for parent/children in slang_operation_copy()

This will need more testing, but no regressions seen so far.

15 years agoglsl: fix uninitialized var in _slang_gen_for_without_continue()
Brian Paul [Wed, 24 Jun 2009 22:12:20 +0000 (16:12 -0600)]
glsl: fix uninitialized var in _slang_gen_for_without_continue()

15 years agoglsl: added slang_operation_free_children()
Brian Paul [Wed, 24 Jun 2009 22:04:33 +0000 (16:04 -0600)]
glsl: added slang_operation_free_children()

15 years agoglsl: added slang_oper_num_children() helper
Brian Paul [Wed, 24 Jun 2009 19:16:49 +0000 (13:16 -0600)]
glsl: added slang_oper_num_children() helper

15 years agoglsl: check-point: declare _returnFlag
Brian Paul [Wed, 24 Jun 2009 14:40:56 +0000 (08:40 -0600)]
glsl: check-point: declare _returnFlag

15 years agoglsl: added slang_operation_insert_child()
Brian Paul [Tue, 23 Jun 2009 23:07:12 +0000 (17:07 -0600)]
glsl: added slang_operation_insert_child()

15 years agoglsl: use slang_generate_declaration() to consolidate some code
Brian Paul [Tue, 23 Jun 2009 22:55:10 +0000 (16:55 -0600)]
glsl: use slang_generate_declaration() to consolidate some code

15 years agoglsl: remove obsolete comment
Brian Paul [Tue, 23 Jun 2009 22:17:06 +0000 (16:17 -0600)]
glsl: remove obsolete comment

15 years agost/mesa: query PIPE_CAP_TGSI_CONT_SUPPORTED
Brian Paul [Tue, 23 Jun 2009 20:28:43 +0000 (14:28 -0600)]
st/mesa: query PIPE_CAP_TGSI_CONT_SUPPORTED

15 years agoglsl: implement _slang_gen_while_without_continue()
Brian Paul [Tue, 23 Jun 2009 20:05:11 +0000 (14:05 -0600)]
glsl: implement _slang_gen_while_without_continue()

15 years agoglsl: fix a bug involving 'continue' in 'for' loops
Brian Paul [Tue, 23 Jun 2009 19:33:28 +0000 (13:33 -0600)]
glsl: fix a bug involving 'continue' in 'for' loops

Need to execute the for loop's increment code before we continue.
Add a slang_assemble_ctx::CurLoopOper field to keep track of the containing
loop and avoid the "cont if true" path in this situation.

Plus, assorted clean-ups.

15 years agoglsl: added slang_oper_child_const()
Brian Paul [Tue, 23 Jun 2009 18:46:11 +0000 (12:46 -0600)]
glsl: added slang_oper_child_const()

15 years agoglsl: use _slang_loop_contains_continue_or_break() to check for unrolling
Brian Paul [Tue, 23 Jun 2009 16:57:59 +0000 (10:57 -0600)]
glsl: use _slang_loop_contains_continue_or_break() to check for unrolling

The previous test failed for nested loops.

15 years agoglsl: use new _slang_loop_contains_continue() helper function
Brian Paul [Thu, 18 Jun 2009 23:25:47 +0000 (17:25 -0600)]
glsl: use new _slang_loop_contains_continue() helper function

15 years agoglsl: implement continue->break translation for do-while loops
Brian Paul [Thu, 18 Jun 2009 23:08:10 +0000 (17:08 -0600)]
glsl: implement continue->break translation for do-while loops

15 years agoglsl: added slang_operation_literal_int/bool() helper functions
Brian Paul [Thu, 18 Jun 2009 22:57:53 +0000 (16:57 -0600)]
glsl: added slang_operation_literal_int/bool() helper functions

15 years agoglsl: don't allocate 0-length children array in slang_operation_copy()
Brian Paul [Thu, 18 Jun 2009 22:57:23 +0000 (16:57 -0600)]
glsl: don't allocate 0-length children array in slang_operation_copy()

15 years agoglsl: remove debug code, misc clean-up
Brian Paul [Thu, 18 Jun 2009 20:24:30 +0000 (14:24 -0600)]
glsl: remove debug code, misc clean-up

15 years agoglsl: implement continue->break transformation for for-loops
Brian Paul [Thu, 18 Jun 2009 20:14:53 +0000 (14:14 -0600)]
glsl: implement continue->break transformation for for-loops

15 years agoglsl: added slang_operation_add_children() and slang_oper_child() helpers
Brian Paul [Thu, 18 Jun 2009 20:11:59 +0000 (14:11 -0600)]
glsl: added slang_operation_add_children() and slang_oper_child() helpers

15 years agoglsl: added slang_assemble_ctx::EmitContReturn field, init
Brian Paul [Thu, 18 Jun 2009 20:11:38 +0000 (14:11 -0600)]
glsl: added slang_assemble_ctx::EmitContReturn field, init

15 years agodemos: improve argv parsing in fslight.c
Brian Paul [Thu, 18 Jun 2009 18:43:43 +0000 (12:43 -0600)]
demos: improve argv parsing in fslight.c

15 years agoglsl: don't unroll loops containing continue/break
Brian Paul [Wed, 17 Jun 2009 19:51:35 +0000 (13:51 -0600)]
glsl: don't unroll loops containing continue/break

Just search the AST in _slang_can_unroll_for_loop().

15 years agoRevert "slang: if/else/break & if/else/continue work for unrolled loops"
Brian Paul [Wed, 17 Jun 2009 19:48:52 +0000 (13:48 -0600)]
Revert "slang: if/else/break & if/else/continue work for unrolled loops"

We should just check if the loop contains a continue/break in the
_slang_can_unroll_for_loop() test function...

This reverts commit 989856bde47d699d7e18798df4013fbf962e1d4b.

Conflicts:

src/mesa/shader/slang/slang_codegen.h

15 years agoglsl: Added gl_shader_state::EmitContReturn field
Brian Paul [Wed, 17 Jun 2009 17:57:39 +0000 (11:57 -0600)]
glsl: Added gl_shader_state::EmitContReturn field

This is the start of a glsl-continue-return feature branch to support
a GLSL code generator option for 'continue' and 'return' statements.
Some targets don't support CONT or RET statements so we'll need to
try to generate code that does not use them...

15 years agodocs: updated Mesa release instructions
Brian Paul [Wed, 24 Jun 2009 01:21:04 +0000 (19:21 -0600)]
docs: updated Mesa release instructions

15 years agoscons: Tool to build with DirectX SDK.
José Fonseca [Fri, 26 Jun 2009 18:51:57 +0000 (19:51 +0100)]
scons: Tool to build with DirectX SDK.

Also works with MinGW, as long as the path to the DirectX SDK top
directory is set in the DXSDK_DIR environment variable.

15 years agoscons: Don't use C specific options with g++
José Fonseca [Fri, 26 Jun 2009 18:50:12 +0000 (19:50 +0100)]
scons: Don't use C specific options with g++

15 years agoi965: fix fetching constants from constant buffer in glsl path
Roland Scheidegger [Fri, 26 Jun 2009 18:38:07 +0000 (20:38 +0200)]
i965: fix fetching constants from constant buffer in glsl path

the driver used to overwrite grf0 then use implicit move by send instruction
to move contents of grf0 to mrf1. However, we must not overwrite grf0 since
it's still used later for fb write.
Instead, do the move directly do mrf1 (we could use implicit move from another
grf reg to mrf1 but since we need a mov to encode the data anyway it doesn't
seem to make sense).
I think the dp_READ/WRITE_16 functions may suffer from the same issue.
While here also remove unnecessary msg_reg_nr parameter from the dataport
functions since always message register 1 is used.

15 years agoconfigs/darwin: Set CXX to g++.
Vinson Lee [Fri, 26 Jun 2009 18:36:32 +0000 (12:36 -0600)]
configs/darwin: Set CXX to g++.

15 years agotgsi: correct handling of return value from util_vsnprintf
Keith Whitwell [Fri, 26 Jun 2009 12:43:10 +0000 (13:43 +0100)]
tgsi: correct handling of return value from util_vsnprintf

We were failing to deal with:
  - vsnprintf returns negative value on error.
  - vsnprintf returns the number of chars that *would* have been
    written on truncation.

15 years agoaux/indices: don't use 'prim' value once it is known to be bad
Keith Whitwell [Fri, 26 Jun 2009 12:44:20 +0000 (13:44 +0100)]
aux/indices: don't use 'prim' value once it is known to be bad

Theoretical bugfix only - no known case where this might happen.

15 years agowgl: Handle flush after a window is destroyed.
José Fonseca [Wed, 24 Jun 2009 13:46:07 +0000 (14:46 +0100)]
wgl: Handle flush after a window is destroyed.

Fixes assertion failure with conform.

15 years agodemos: fix issues in glxcontexts.c
Brian Paul [Tue, 23 Jun 2009 15:31:27 +0000 (09:31 -0600)]
demos: fix issues in glxcontexts.c

The reshape() function was called when there was no GLX context so
the viewport/modelview/projection setup wasn't doing anything.  Move
the call to reshape() into draw().

Also, remove -stereo, -fullscreen options and do some general clean-up.

15 years agodocs: document GL_ARB_vertex_array_object
Brian Paul [Mon, 22 Jun 2009 23:54:16 +0000 (17:54 -0600)]
docs: document GL_ARB_vertex_array_object

15 years agointel: enable GL_ARB_vertex_array_object extension
Brian Paul [Mon, 22 Jun 2009 23:54:00 +0000 (17:54 -0600)]
intel: enable GL_ARB_vertex_array_object extension

15 years agomesa: plug in glBindVertexArray, glGenVertexArrays functions
Brian Paul [Mon, 22 Jun 2009 23:52:08 +0000 (17:52 -0600)]
mesa: plug in glBindVertexArray, glGenVertexArrays functions

15 years agotests: update bufferobj.c to test GL_ARB_vertex_array_object
Brian Paul [Mon, 22 Jun 2009 23:51:30 +0000 (17:51 -0600)]
tests: update bufferobj.c to test GL_ARB_vertex_array_object

15 years agost/mesa: alphabetize lines
Brian Paul [Mon, 22 Jun 2009 23:01:44 +0000 (17:01 -0600)]
st/mesa: alphabetize lines

15 years agost/mesa: enable GL_ARB_vertex_array_object
Brian Paul [Mon, 22 Jun 2009 23:01:00 +0000 (17:01 -0600)]
st/mesa: enable GL_ARB_vertex_array_object

15 years agomesa: enforce the rule that arrays live in VBOs for GL_ARB_vertex_array_object
Brian Paul [Mon, 22 Jun 2009 22:56:35 +0000 (16:56 -0600)]
mesa: enforce the rule that arrays live in VBOs for GL_ARB_vertex_array_object

15 years agomesa: added extension flag for ARB_vertex_array_object
Brian Paul [Mon, 22 Jun 2009 22:47:45 +0000 (16:47 -0600)]
mesa: added extension flag for ARB_vertex_array_object

15 years agoi965: handle OPCODE_SWZ in the glsl path
Roland Scheidegger [Tue, 16 Jun 2009 19:38:58 +0000 (21:38 +0200)]
i965: handle OPCODE_SWZ in the glsl path

glsl compiler will not generate OPCODE_SWZ, and as a first step it would
be translated away to a MOV anyway (why?), but later internally this opcode is
generated (for EXT_texture_swizzling).
(cherry picked from commit 4ef1f8e3b52a06fcf58f78c9c36738531b91dbac)

15 years agoDisable SGI_swap_control extension for DRI2
Owen W. Taylor [Sat, 6 Jun 2009 18:46:22 +0000 (14:46 -0400)]
Disable SGI_swap_control extension for DRI2

We currently don't have support for SGI_swap_control for direct
contexts with DRI2, so disable reporting the extension. Reporting
the extension, and then having glXSwapIntervalSGI() "succeed"
but do nothing can confuse applications.

https://bugs.freedesktop.org/show_bug.cgi?id=22123
(cherry picked from commit 279143c6e808b37c333321b696d80df77f709a04)

15 years agointel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.
Michel Dänzer [Thu, 11 Jun 2009 10:09:10 +0000 (12:09 +0200)]
intel: intel_texture_drawpixels() can't handle GL_DEPTH_STENCIL.

Fixes glean depthStencil test.
(cherry picked from commit 3885b708fdbb7bbd5dd3a247c41fb9a75ee7c057)

15 years agoi965: added intelFlush() call in intel_get_tex_image()
Brian Paul [Tue, 9 Jun 2009 21:07:39 +0000 (15:07 -0600)]
i965: added intelFlush() call in intel_get_tex_image()

Fixes the render-to-texture test in progs/tests/getteximage.c
(cherry picked from commit a03b349153660e449daf4f56d750f1caef23b1a5)

15 years agomesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcs
Brian Paul [Fri, 22 May 2009 13:19:27 +0000 (07:19 -0600)]
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS/ in NV funcs
(cherry picked from commit 4dc426c01627a240bd5b148c1804c45b0d5ecd6c)

15 years agomesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBS
Brian Paul [Fri, 22 May 2009 13:26:08 +0000 (07:26 -0600)]
mesa: rename MAX_VERTEX_ATTRIBS to MAX_VERTEX_GENERIC_ATTRIBS

Be clearer that this is the number of generic vertex program/shader
attributes, not counting the legacy attributes (pos, normal, color, etc).
(cherry picked from commit 4a95185c9f30c2de7a03bb1a0653f51b53b1111d)

15 years agomesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS
Brian Paul [Thu, 21 May 2009 23:03:21 +0000 (17:03 -0600)]
mesa: s/MAX_VERTEX_PROGRAM_ATTRIBS/MAX_NV_VERTEX_PROGRAM_INPUTS
(cherry picked from commit d2a74d76c96957cf0294dcf40d29526621ada95e)

15 years agomesa: fix some potential state-restore issues in pop_texture_group()
Brian Paul [Thu, 21 May 2009 16:05:04 +0000 (10:05 -0600)]
mesa: fix some potential state-restore issues in pop_texture_group()

Call the _mesa_set_enable() functions instead of driver functions, etc.

Also, add missing code for 1D/2D texture arrays.
(cherry picked from commit aac19609bfd7c950b2577489b06886c8a8097bb2)

15 years agovbo: return VP_NONE from get_program_mode() if running fixed-func vertex program
Brian Paul [Thu, 21 May 2009 15:52:33 +0000 (09:52 -0600)]
vbo: return VP_NONE from get_program_mode() if running fixed-func vertex program

If we're running a vertex program to emulated fixed-function, we still need
to treat vertex arrays/attributes as if we're in fixed-function mode.

This should probably be back-ported to Mesa 7.5 after a bit more testing.
(cherry picked from commit dda82137d28aba846dda73da230871c115e30aaf)

15 years agomesa: create/use a fallback texture when bound texture is incomplete
Brian Paul [Fri, 1 May 2009 15:30:32 +0000 (09:30 -0600)]
mesa: create/use a fallback texture when bound texture is incomplete

When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1).  Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.

Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces.  If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).

Todo: create a fallback texture for each type of texture target?
(cherry picked from commit 3f25219c7bf0f090502489928f0f018e62c4f6cf)