Commit Graph

37100 Commits

Author SHA1 Message Date
Kristian Høgsberg
22266c391f glx: Remove support for MESA_swap_frame_usage
The extension never worked, the implementation returns GLX_BAD_CONTEXT
when enabling the frame tracking.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
70887d5172 glx: Move __driScreen into the dri screen privates 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
089fc37c6f glx: Move DRI1 specific extensions and code to DRI1 screen private 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
9e546ecfd4 glx: Move DRI2 extensions to DRI2 screen private 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
cb2a66fd0c glx: Drop support for GLX_MESA_allocate_memory
Only r200 implemented it.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
f972115d33 glx: Add screen privates for dri drivers and moved some fields there
GLXscreenConfigs is badly named and a dumping ground for a lot of stuff.
This patch creates private screen structs for the dri drivers and moves
some of their fields over there.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
a296d96de4 glx: Rename various DRI structs away from obnoxious __GLXfooRec convention
Enough is enough.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
308e13ecd1 glx: Factor out common code from dri2WaitGL() and dri2WaitX() 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
b006d465ea glx: Dont use dri2WaitX() to update fake front
This saves a superfluous flush and a create/destryo region.
2010-07-19 22:45:50 -04:00
Eric Anholt
f9d11b8cee i965: Mostly fix glsl-max-varyings.
There was confusion on both the size of message we can send, and on
what the URB destination offset means.

The remaining problems appear to be due to spilling of regs in the
fragment shader being broken.
2010-07-19 19:29:48 -07:00
Eric Anholt
e179fa9a0a i965: Clean up message register setup in emit_vertex_write(). 2010-07-19 19:29:03 -07:00
Eric Anholt
09788ce10e i965: Reduce repeated calculation of the attribute-offset-in-VUE.
This cleans up some chipset dependency sprinkled around, and fixes a
potential overflow of the attribute offset array for many vertex
results.
2010-07-19 19:29:03 -07:00
Eric Anholt
e29cff6273 i965: Clarify the nr_regs calculation in brw_clip.c 2010-07-19 19:29:03 -07:00
Eric Anholt
bdcaaed6ff i965: Don't set up VUE space for the disabled user clip distances on gen6. 2010-07-19 19:29:03 -07:00
Brian Paul
37692e5dc9 draw: fix incorrect instancing divisor in LLVM code 2010-07-19 18:29:12 -06:00
Ian Romanick
cd6764ed6e linker: Remove the FINISHME comment for intrastage linking 2010-07-19 14:50:43 -07:00
Ian Romanick
1a03a644d2 linker: Remove redundant check for 'main' in shaders
This is now handled in link_intrastage_shaders.
2010-07-19 14:50:43 -07:00
Ian Romanick
25f51d3b9b linker: Track and validate GLSL versions used in shaders 2010-07-19 14:50:43 -07:00
Ian Romanick
b64e979971 glsl2: Use Elements macro 2010-07-19 14:50:43 -07:00
Ian Romanick
fc9ae101b4 linker: Recursively resolve function calls in imported functions 2010-07-19 14:50:43 -07:00
Ian Romanick
532c2d3085 linker: look up function signatures during linking instead of using callee
Instead of using ir_call::callee, search for the signature in the
linked shader.  This will allow resolving calls from functions
imported from other shaders.  The ir_call::callee pointer in the
imported function will still reference a signature in the original shader.
2010-07-19 14:50:43 -07:00
Ian Romanick
5adbf0bff1 linker: Pull find_matching_signature out of call_link_visitor
The list of shaders to search needs to be provided as an explicit
parameter to support coming changes.  At that point there is no reason
for it to be in the class.  Also, fix some of the 'const' decorators.
2010-07-19 14:50:43 -07:00
Ian Romanick
b95897b89d glsl2: Explicitly walk lists in ir_function::parameter_lists_match
Give ir_function::parameter_lists_match_exist similar treatment.  Make
the parameters const, and propogate the constness as far as it will
trivially go.
2010-07-19 14:50:43 -07:00
Ian Romanick
de415b7f4b linker: Add comment about bug in initializer handling 2010-07-19 14:50:43 -07:00
Ian Romanick
8fe8a814b0 linker: First bits of intrastage, intershader function linking
This handles the easy case of linking a function in a different
compilation unit that doesn't call any functions or reference any
global variables.
2010-07-19 14:50:43 -07:00
Ian Romanick
a48a2b66e8 ir_function_signature: Make actual_parameters public 2010-07-19 14:50:43 -07:00
Ian Romanick
3880d07f4b linker: Remove some unnecessary includes 2010-07-19 14:50:43 -07:00
Kenneth Graunke
61a44ccaef exec_list: Fix foreach_list_safe.
It now works correctly when nodes are removed, as it was originally
intended to do; it no longer processes nodes added to the list before
the current node, nor those added immediately after the current node.

This matches the behavior of Linux's list_for_each_safe.
2010-07-19 14:49:34 -07:00
Brian Paul
374c74f4c4 mesa: remove restart.c from build 2010-07-19 15:29:03 -06:00
Ian Romanick
303c99f12f linker: Use foreach_list_safe in move_non_declarations
The node being processed may be removed from the list and put in a
different list.  Not using the safe version caused list processing to
change streams after moving a node.
2010-07-19 12:36:32 -07:00
Ian Romanick
9303e358cb linker: Move global instructions from the linked shader first
For the shader containing 'main', use the linked shader (i.e., the
clone of the original shader that contained main) as the source for
global instructions to move into main.
2010-07-19 12:36:32 -07:00
Marek Olšák
3b189d888a r300g: fix possible crash in destroy_context
The problem is destroy_context is almost NEVER called.
The only test for destroy_context I know is compiz.

Reported by Vinson Lee.

FDO bug #29150.
2010-07-19 21:12:52 +02:00
Marek Olšák
fd03dd203f util: remove the dummy field in mempool
It should allocate less memory now.
2010-07-19 21:05:47 +02:00
Eric Anholt
5304493c40 glsl2: Fix lexing of octal values, including "0".
When faced with a constructor like 'ivec4(0, 2, 0, 0)', we would
manage to get a value of 2 instead of 0 for the first "0".  Usually 2
characters past "0" would point at some junk and lex as 0 anyway.

Fixes glsl-octal and glsl-unused-varyings.
2010-07-19 11:58:03 -07:00
Vinson Lee
95ca22001a scons: Fix Mac OS X SCons build on 32-bit CPUs.
The Mac OS X SCons build failed on 32-bit CPUs starting with commit
2f6d47a7c8 during linking of graw-null.
The build succeeds though on a 64-bit CPU. See FDO bug 29117.

This was the compiler error.
scons: building associated VariantDir targets: build/darwin-x86-debug
  Linking build/darwin-x86-debug/gallium/targets/graw-null/libgraw.dylib ...
Undefined symbols:
  "_lp_swizzled_cbuf", referenced from:
      _lp_swizzled_cbuf$non_lazy_ptr in libllvmpipe.a(lp_rast.os)
      _lp_swizzled_cbuf$non_lazy_ptr in libllvmpipe.a(lp_rast_tri.os)
     (maybe you meant: _lp_swizzled_cbuf$non_lazy_ptr)
  "_lp_dummy_tile", referenced from:
      _lp_dummy_tile$non_lazy_ptr in libllvmpipe.a(lp_rast.os)
      _lp_dummy_tile$non_lazy_ptr in libllvmpipe.a(lp_rast_tri.os)
      _lp_dummy_tile$non_lazy_ptr in libllvmpipe.a(lp_setup.os)
     (maybe you meant: _lp_dummy_tile$non_lazy_ptr)

The patch adds -fno-common to all Mac OS X builds to work around this issue.
2010-07-19 11:31:44 -07:00
Eric Anholt
82d4b9593b glsl2: Fix the expression type for atan's pi * sign(y).
Fixes CorrectFunction.vert.
2010-07-19 10:47:12 -07:00
Eric Anholt
95c08920ea i915: Ask the compiler to flatten out all the if statements that it can. 2010-07-19 10:47:08 -07:00
Eric Anholt
29ce44ad2b glsl2: Add a pass for converting if statements to conditional assignment.
This will be used on 915 and similar hardware of that generation.
2010-07-19 10:21:38 -07:00
Eric Anholt
d16044ad4d glsl2: Give IR nodes a type field.
This is a big deal for debugging if nothing else ("what class is this
ir_instruction, really?"), but is also nice for avoiding building a
whole visitor or an if (node->as_whatever() || node->as_other_thing())
chain.
2010-07-19 09:50:29 -07:00
Eric Anholt
ee7b2b3f44 ir_to_mesa: Do validation on the IR tree. 2010-07-19 09:50:26 -07:00
Brian Paul
369e9272de util: add dummy field to empty structure types
Empty structure types aren't allowed with MSVC.
I haven't tested this change.  Hope I haven't broken it...
2010-07-19 10:50:11 -06:00
Eric Anholt
4802fd905a ir_to_mesa: Don't do lowering passes on an errored-out shader. 2010-07-19 09:44:30 -07:00
Marek Olšák
d1671ceb71 r300g: fix typo 2010-07-19 17:33:40 +02:00
Marek Olšák
7b31b235d0 r300g: use memory pools for buffer_create and get_transfer
The improvement in Tremulous: 68.9 fps -> 71.1 fps.
2010-07-19 17:12:11 +02:00
Marek Olšák
ad44b775e3 util: add a memory pool for equally sized memory allocations
malloc/free are in O(1).
2010-07-19 17:12:11 +02:00
Marek Olšák
4fd39a8d69 st/mesa: fix FRAMEBUFFER_UNSUPPORTED with the D24S8 format
Fixes FDO bug #29116.

NOTE: this is a candidate for the 7.8 branch
2010-07-19 17:11:23 +02:00
Kristian Høgsberg
3750ebd540 glx: Fix drawable lookup in DRI2 event handler
DRI2 events are sent to the X drawable ID used to create the DRI2 drawable,
not the GLX drawable ID.  So when an event comes in, we need to look up
the __GLXDRIdrawable by its X drawable ID, which needs a new hash table.
2010-07-19 09:37:38 -04:00
Eric Anholt
b29d31cd67 ir_to_mesa: Rename struct temp_entry, which is used for all variables now. 2010-07-18 18:13:07 -07:00
Eric Anholt
7b13014942 ir_to_mesa: Add support for function calls.
Unlike the previous compiler, in this case we emit only one copy of
the function regardless of how many times it's called.
2010-07-18 18:13:06 -07:00
Eric Anholt
1f47245bdd glsl2: Remove the const disease from function signature's callee. 2010-07-18 18:13:06 -07:00