Commit Graph

36995 Commits

Author SHA1 Message Date
Brian Paul ef2d10cd45 softpipe: fix sp_tile_cache_flush_clear() regression 2010-07-21 16:00:52 -06:00
Jerome Glisse 600c85efdb Revert "dri2: Remove an unused variable."
glx_info is used if X_DRI2SwapBuffers is defined
This reverts commit c0ca2bfb2a.
2010-07-21 17:40:37 -04:00
Jerome Glisse 0bca8fbfda r600g: add support for all R6XX/R7XX asic
This configure some of the value properly based on
asic so others asic than RV710 works too.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-21 17:05:37 -04:00
Dave Airlie 4b2820534e r600g: add r600 compile mode to compiler.
some of the ALU instructions are different on r6xx vs r7xx,
separate the alu translation to separate files, and use family
to pick which compile stage to use.
2010-07-21 17:05:37 -04:00
Dave Airlie 9433d0e801 r600g: add family retrival
allow pipe driver to get the family of the gpu.
2010-07-21 17:05:36 -04:00
Marek Olšák 1a3fa3e910 llvmpipe: say no to depth clamp
The other drivers just return 0 without the assert.
2010-07-21 22:54:34 +02:00
Marek Olšák ca7ead03da r300g: implement depth clamp
Depth clamping seems to be implicit if clipping is disabled.

It's not perfect, but it's good enough for wine and passes
the corresponding piglit tests.
2010-07-21 22:54:34 +02:00
Marek Olšák 5725738ef6 r300g: cleanup clip state emission 2010-07-21 22:54:34 +02:00
Marek Olšák 9ca48de106 draw: disable depth clipping if depth clamp is enabled 2010-07-21 22:54:34 +02:00
Marek Olšák c304869ec0 st/mesa: implement depth clamp 2010-07-21 22:54:34 +02:00
Marek Olšák 4460e9f0a1 cso: handle depth clamp 2010-07-21 22:54:34 +02:00
Marek Olšák f47c9b0880 gallium: add depth clamp to the interface 2010-07-21 22:54:34 +02:00
Carl Worth 56d33f8e2b ir_to_mesa: Add missing initializion of lod_info variable.
To quiet a compiler warning.
2010-07-21 13:52:33 -07:00
Carl Worth a0cfe8c440 glsl: Fix missing initialization of yylloc.source
In both the preprocessor and in the compiler proper, we use a custom
yyltype struct to allow tracking the source-string number in addition
to line and column. However, we were previously relying on bison's
default initialization of the yyltype struct which of course is not
aware of the source field and leaves it uninitialized.

We fix this by defining our own YYLLOC_DEFAULT macro expanding on the
default version (as appears in the bison manual) and adding
initialization of yylloc.source.
2010-07-21 13:52:33 -07:00
Carl Worth 19e3771cff Add missing initialization of inOutFlags pointer.
This quiets a compiler warning, (and ensures a segmentation fault rather
than memory corruption if this variable is written through before being
initialized elsewhere).
2010-07-21 13:26:26 -07:00
Carl Worth 9d1a61efbe Makefiles: Don't complain if depend file to be included doesn't exist.
While bootstrapping the dependencies, make will see the "include depend"
directive before the depend file has been created. To avoid a spurious
warning in this case we use "-include" instead, (which differs precisely
in the fact that it will not emit a diagnostic if the named file does
not exist).
2010-07-21 13:19:33 -07:00
Carl Worth 171a25eaba i965: Remove an unused variable.
To quiet a compiler warning.
2010-07-21 13:17:22 -07:00
Carl Worth c0ca2bfb2a dri2: Remove an unused variable.
To quiet a compiler warning.
2010-07-21 13:17:05 -07:00
Carl Worth 349fa9ced7 Regenerate program/lex.yy.c
Based on the two recent changes to program_lexer.l.
2010-07-21 13:13:46 -07:00
Carl Worth b4a08a0d87 Avoid more warnings in flex-generated code.
This avoids two "function defined but not used" warnings. For the yyinput
function we define YY_NO_INPUT which tells flex to simply not generate this
function.

For unput, we add a call to this function, but inside a while(0) so
that it will quiet the warning without actually changing any
functionality.
2010-07-21 13:11:46 -07:00
Carl Worth 3c716a7ec2 Avoid warnings in flex-generated code.
Add declarations for two functions generated in the flex ouput. It
would be nicer if flex simply declared these generated functions as
static, but for now we can at least avoid the warning this way.
2010-07-21 12:49:01 -07:00
Carl Worth c24bcad9f8 glsl: Correctly handle unary plus operator.
Previously, any occurence of the unary plus operator would trigger a
bogus type mismatch error. Fix this by making the ast_plus case look
more like the ast_neg case as far as type-checking is concerned.

With this change the shaders/CorrectPreprocess8.frag test in piglit
now passes.
2010-07-21 11:42:27 -07:00
Brian Paul aa9003e20e draw: tweak aa line width threshold and sampling
Set sampler max_lod to avoid sampling the 1x1 and 2x2 mipmap levels.

Fixes piglit line-aa-width test, fd.o bug 29160.
2010-07-21 11:38:43 -06:00
Patrice Mandin c052213fb3 nouveau/nvfx: Add new PIPE_CAP values
Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-07-21 19:28:45 +02:00
Brian Paul 3662afd87d gallivm: replace has_indirect_addressing field with indirect_files field
Instead of one big boolean indicating indirect addressing, use a
bitfield indicating which register files are accessed with indirect
addressing.

Most shaders that use indirect addressing only use it to access the
constant buffer.  So no need to use an array for temporary registers
in this case.
2010-07-21 10:16:32 -06:00
Brian Paul 85206e56a1 tgsi: added tgsi_shader_info::indirect_files field
Indicates which register files are accessed with indirect addressing.
2010-07-21 10:16:32 -06:00
Brian Paul 0115f07507 gallivm: refactor code into get_indirect_offsets() function 2010-07-21 10:16:32 -06:00
Brian Paul 890976e02d gallivm: added comment 2010-07-21 10:16:32 -06:00
Brian Paul be22e1e781 gallivm: remove extraneous braces 2010-07-21 10:16:32 -06:00
Brian Paul f674ed6b06 gallivm: no longer do indirect addressing in get_temp_ptr() 2010-07-21 10:16:32 -06:00
Brian Paul 105ed7dfd4 gallivm: implement correct indirect addressing of temp registers
As with indexing the const buffer, the ADDR reg may have totally
different values for each element.  Need to use a gather operation.
2010-07-21 10:16:32 -06:00
Brian Paul 695814a15b gallivm: re-org, comments for get_temp_ptr() 2010-07-21 10:16:31 -06:00
Brian Paul 6921a6dd4e draw: whitespace clean-up 2010-07-21 10:16:31 -06:00
Keith Whitwell d350695a6b gallium: remove pointless bitfield restrction in pipe_vertex_element
This used to be a somewhat packed struct, but no longer.  Remove the
last remaining bitfield tag.
2010-07-21 16:30:38 +01:00
Brian Paul ec0e7b16bb gallivm: rename a var to avoid compiler warnings 2010-07-21 08:08:12 -06:00
Brian Paul 4363d4d0b9 gallivm: fix indirect addressing of constant buffer
The previous code assumed that all elements of the address register
were the same.  But it can vary from pixel to pixel or vertex to
vertex so we must use a gather operation when dynamically indexing
the constant buffer.

Still need to fix this for the temporary register file...
2010-07-20 18:50:35 -06:00
Brian Paul b0636f78aa gallivm: added lp_build_const_int32() helper 2010-07-20 18:50:35 -06:00
Ian Romanick f38d15b80d glsl2: glsl_type has its own talloc context, don't pass one in 2010-07-20 17:48:25 -07:00
Ian Romanick a7ba9a7919 linker: Do post-link lowering and optimization
The lowering code should probably be moved elsewhere.
2010-07-20 17:48:24 -07:00
Ian Romanick 60e2d06d1c glsl2: Implement utility routine to talloc reparent an IR tree 2010-07-20 17:48:24 -07:00
Ian Romanick 2462a536ea glsl2: Add a constructor for _mesa_glsl_parse_state
Coming changes to the handling of built-in functions necessitate this.
2010-07-20 17:48:24 -07:00
Ian Romanick 7e2aa91507 glsl2: Add and use new variable mode ir_var_temporary
This is quite a large patch because breaking it into smaller pieces
would result in the tree being intermitently broken.  The big changes
are:

    * Add the ir_var_temporary variable mode

    * Change the ir_variable constructor to take the mode as a
      parameter and correctly specify the mode for all ir_varables.

    * Change the linker to not cross validate ir_var_temporary
      variables.

    * Change the linker to pull all ir_var_temporary variables from
      global scope into 'main'.
2010-07-20 17:48:24 -07:00
Eric Anholt 1124e5a3cb ir_to_mesa: Validate the linked shaders as well.
This caught the failure in cloning of ir_dereference_record.
2010-07-20 17:30:11 -07:00
Eric Anholt f141fa63a4 glsl2: Check that nodes in a valid tree aren't error-type.
We're good at propagating error types around, but finding when the
first one was triggered can be painful if we aren't paying attention.
2010-07-20 17:30:10 -07:00
Eric Anholt fade78edcb glsl2: strdup the field names used in dereference_record.
Otherwise, after linking and freeing the old data, the pointer would
dangle.  Partial fix for glsl1-struct*.
2010-07-20 17:30:10 -07:00
Eric Anholt 21b0dbd799 glsl2: talloc the glsl_struct_field[] we use to look up structure types.
Since the types are singletons across the lifetime of the compiler,
repeatedly compiling a program with the same structure type defined
would drop a copy of the array on the floor per compile.

This is a bit tricky because the static GLSL types are not called with
the talloc-based new, so we have to use the global type context, which
may not be initialized yet.
2010-07-20 17:30:10 -07:00
Eric Anholt b6e92ad7da glsl2: Don't claim a match on structure types with different field names.
We regularly do lookups on the field names of the structure to find
the types within the struct, so returning a structure type with bad
names will lead to lots of error types being found.
2010-07-20 17:30:10 -07:00
Kenneth Graunke 094cf8c199 glsl2: Add support for the .length() method on arrays.
Fixes piglit test glsl-array-length, and provides proper error messages
for negative piglit tests array-length-110.frag, array-length-unsized.frag,
and array-length-args.frag.
2010-07-20 17:13:17 -07:00
Kenneth Graunke 1036a7ebae glsl2: Remove incorrect assertion in the parser.
This assertion is triggered by method calls (i.e. array.length()), where
subexpressions[1] is an ast_function_call expression.  Since the
assertion itself had a comment saying it could be removed eventually,
simply do so.

Causes negative glslparser tests array-length-110.frag,
array-length-args.frag, and array-length-unsized.frag to pass, but only
because the length() method is not supported yet.
2010-07-20 17:13:17 -07:00
Kenneth Graunke 2b7c42b40a glsl2: Disallow non-constant array indexing for unsized arrays.
Fixes piglit test unsized-array-non-const-index.vert.
2010-07-20 17:13:17 -07:00