Commit graph

38635 commits

Author SHA1 Message Date
Jon TURNEY
2b9dac397b Make XF86VIDMODE extension optional
Code in glx/glxcmds.c which uses the XF86VIDMODE extension is already guarded.  Also use
that guard to control inclusion of the xf86vmode.h header, and only enable that guard if the
XF86VIDMODE extension is found by pkgconfig.

This changes the behaviour on platforms which XF86VIDMODE exists, in that XF86VIDMODE used to
be mandatory, but is now optional.

Presumably other build systems are already arranging for -DXF86VIDMODE to be supplied to the
complier when glxcmds.c is compiled, so are not affected by this change

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-09-07 13:30:19 -04:00
Kristian Høgsberg
dd2658d0ac glx: Drop unused dri2proto.h include 2010-09-07 13:30:12 -04:00
Kristian Høgsberg
60fce15447 glx: Move dpy and scr fields out of direct rendering conditional
Nothing direct rendering specific about these fields.  Moving them out
makes no-direct-rendering compilation work again.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-07 12:41:09 -04:00
Jon TURNEY
ae9487c299 Some fixes for GLX_INDIRECT_RENDERING only build
This fixes some of the build issues with GLX_INDIRECT_RENDERING but !GLX_DIRECT_RENDERING due to recent changes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-07 12:33:11 -04:00
nobled
6561a64a69 dri: Make it a little clearer that we're not dereferencing a NULL pointer 2010-09-07 12:26:33 -04:00
nobled
1b8c9fef11 dri: Use the right type for the API token
Pass mesa_api to CreateContext, and abort early
if the requested API isn't recognized.
2010-09-07 12:26:33 -04:00
Chia-I Wu
28c790ab31 libgl-xlib: Fix --enable-gallium-llvm build.
Check MESA_LLVM and link to LLVM as other targets do.
2010-09-07 23:54:25 +08:00
Chia-I Wu
d5c5a5aea0 llvmpipe: Add lp_rast_debug.c to Makefile. 2010-09-07 23:04:43 +08:00
Jon TURNEY
23e2dec1a1 glx: Only clear the stored context tag when the context has been unbound
The calling order of ->bind and ->unbind changed and then ->unbind would
clear the currentContextTag of the old context before ->bind could reuse
it in the make current request, in the indirect case.

Instead, clear the old currentContextTag if and only if we send a request
to the server to actually unbind it or reassign it to another context.

https://bugs.freedesktop.org/show_bug.cgi?id=29977

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-09-07 09:07:23 -04:00
José Fonseca
a7c4541d27 llvmpipe: Refactor lp_scene_add_resource_reference
Less goto spaghetti.
2010-09-07 14:02:29 +01:00
José Fonseca
9cd45b8edf llvmpipe: Fix negated logic in lp_scene_add_resource_reference().
Fixes performance regression.
2010-09-07 14:02:29 +01:00
Keith Whitwell
9df8a7565d llvmpipe: move more coef setup into lp_setup_coef.c 2010-09-07 14:02:29 +01:00
Keith Whitwell
afba373cb1 llvmpipe: declare fence handle struct 2010-09-07 14:02:29 +01:00
Keith Whitwell
f25836d7b2 llvmpipe: rasterization debugging helpers 2010-09-07 14:02:29 +01:00
Keith Whitwell
9f6e8e1d6b llvmpipe: use opcodes instead of function pointers in bins
Also, move some state from rasterizer struct to the scene.
2010-09-07 14:02:15 +01:00
Keith Whitwell
040e59851a llvmpipe: rearrange queries 2010-09-07 14:01:50 +01:00
Keith Whitwell
6419ecd02c llvmpipe: enforce fixed memory limit on scenes 2010-09-07 14:01:43 +01:00
Keith Whitwell
c512ba88a7 llvmpipe: clean up deferred zstencil clears 2010-09-07 13:22:55 +01:00
Keith Whitwell
18452c1e87 llvmpipe: rework fences and queries 2010-09-07 13:22:55 +01:00
Keith Whitwell
5024d9b90e llvmpipe: move whole-tile emit into a function 2010-09-07 13:22:55 +01:00
Keith Whitwell
71e27ef21c llvmpipe: put fs variant dumping in a function 2010-09-07 13:22:54 +01:00
Tilman Sauerbeck
98e277111b Replace reference to tgsi-instruction-set.txt.
That file has been replaced by tgsi.rst.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-09-07 09:48:22 +01:00
Luca Barbieri
4a730b773f nouveau: restore nouveau_class.h for nv04-nv20
Sorry, I deleted the Gallium copy without realizing that the DRI
one was just a symlink to it.
2010-09-07 08:22:43 +02:00
Luca Barbieri
09782c727d nvfx: fix return in vp main 2010-09-06 18:08:36 +02:00
José Fonseca
079c884060 mesa: Define C99's __func__ macro on MSVC. 2010-09-06 13:57:44 +01:00
Dave Airlie
35e01b79cb r600g: add error print for no literals for r700s as well 2010-09-06 10:38:29 +10:00
Dave Airlie
2caf6f5e84 r600g: fixup r700 assembler for clamp/relative addressing 2010-09-06 10:35:51 +10:00
Dave Airlie
48cdad70d9 r600g: add script to generate header file with offsets into state objects.
This was inherently fragile as any changes to r600_states.h would also
need manual updating of all of the bits in radeon.h. Just add a simple
python script to do the conversion, its not hooked up to make at all.

This also will make adding evergreen a bit easier.
2010-09-06 10:28:08 +10:00
Dave Airlie
5b82777311 r600g: fix up surface references
We end up referencing the new surf and derefing the old surface which
is a copy of the pointer to the new surf. So just bump the ref count directly.
2010-09-06 09:15:42 +10:00
Dave Airlie
3a672785df r600g: search for sampler views in context on removal.
Need to remove from context as well.
2010-09-06 09:15:42 +10:00
Dave Airlie
6ec0fff822 r600g: add missing printf operand 2010-09-06 09:15:41 +10:00
Luca Barbieri
357a7e90df nvfx: support nv30 simulation on nv40 2010-09-05 23:41:33 +02:00
Henri Verbeet
d8bba2ef69 radeon: Add radeon_buffer_objects.c. 2010-09-05 22:42:12 +02:00
Henri Verbeet
7d4f352586 r200: Add radeon_buffer_objects.c. 2010-09-05 21:58:20 +02:00
Henri Verbeet
50b9c54ef6 radeon: Make do_blit_readpixels() into a PBO work. 2010-09-05 20:26:14 +02:00
Luca Barbieri
029c181571 mesa: don't smash the stack in _mesa_find_used_registers
At some point this actually triggered, not sure if it still does.

Give a meaningful assert and refuse to smash the stack anyway.
2010-09-05 17:57:12 +02:00
Luca Barbieri
9a77d0471a mesa: don't expose unsupported GL_ARB_geometry_shader4 for now
The new GLSL compiler doesn't support it.

Advertising it prevents Unigine Heaven from working, since it attempts to
use it.
2010-09-05 17:53:16 +02:00
Luca Barbieri
beb3d030a1 nouveau: delete nouveau_class.h, move nv50 regs to nv50_reg.h
nv50 should switch to rules-ng-ng too at some point.

The classic Mesa Nouveau driver also includes a copy of nouveau_class.h,
and should convert to rules-ng-ng too and remove it.
2010-09-05 17:52:26 +02:00
Luca Barbieri
7d53a3b7a4 nvfx: move nv04_2d to rules-ng-ng 2010-09-05 17:52:26 +02:00
Luca Barbieri
d46c5ce7b6 nvfx: switch to rules-ng-ng register headers
This is the new register generation toolkit in use by nouveau.

As far as I know, this is the best register description toolkit in
existence, and you should use it too for your hardware :)

Thanks to Marcin Kościelnicki for inventing it and performing
invaluable reverse engineering work of nVidia chips.
2010-09-05 17:52:26 +02:00
Luca Barbieri
3bca263a92 nvfx: remove remaining BEGIN_RING/eng3d uses 2010-09-05 17:52:26 +02:00
Luca Barbieri
49b493ddd0 nvfx: pause occlusion queries during blitter usage
Thanks for Dave Airlie and Jerome Glisse for their code which made
me realize I need this too.
2010-09-05 17:52:26 +02:00
Luca Barbieri
14d5805235 nvfx: properly return fogcoord.w == 1
Hardware sets it to 0, so we add an ADD to put an 1 there if the
application really wants the alpha channel.
2010-09-05 17:52:25 +02:00
Luca Barbieri
76f696b1f6 nvfx: support saturate in vp
Completely untested, since Mesa apparently never uses this currently.

In particular, it might not work with scalar slot op.
2010-09-05 17:52:25 +02:00
Luca Barbieri
8e2badfc26 nvfx: add rewritten swtnl support
The old swtnl code was broken by the new shader linkage support for
GLSL.

This is a rewrite of swtnl support, which should instead work properly,
be faster and more closer to the much more tested hardware pipeline.
2010-09-05 17:52:25 +02:00
Luca Barbieri
43cfc1ed8e nvfx: use a piglit-ignored format for unknown cap message 2010-09-05 17:52:25 +02:00
José Fonseca
7d45bf8762 llvmpipe: Remove some broken MinGW hacks in the sin/cos reference code. 2010-09-05 10:40:38 +01:00
José Fonseca
1c009f970e glsl: Add new files to sconscript. 2010-09-05 10:17:51 +01:00
José Fonseca
d278ddc009 llvmpipe: Fix perspective divide interpolation.
Intuition != mathematics, so this time I actually worked out the right
formula for first order approximation of perspective interpolation.

Ironically, per quad divide actually makes things slower when compared
with per pixel divide -- probably because the divide hardware unit is
rarely used, whereas the multiply unit is typically already saturated
and the first order approximation imply more multiplications.
2010-09-05 10:17:51 +01:00
José Fonseca
b8684b2458 util: Helper function to determined whether two formats can be memcpy'ed.
These are the non-trivial conversions that this function recognizes,
which was produced by u_format_compatible_test.c:

  b8g8r8a8_unorm -> b8g8r8x8_unorm
  a8r8g8b8_unorm -> x8r8g8b8_unorm
  b5g5r5a1_unorm -> b5g5r5x1_unorm
  b4g4r4a4_unorm -> b4g4r4x4_unorm
  l8_unorm -> r8_unorm
  i8_unorm -> l8_unorm
  i8_unorm -> a8_unorm
  i8_unorm -> r8_unorm
  l16_unorm -> r16_unorm
  z24_unorm_s8_uscaled -> z24x8_unorm
  s8_uscaled_z24_unorm -> x8z24_unorm
  r8g8b8a8_unorm -> r8g8b8x8_unorm
  a8b8g8r8_srgb -> x8b8g8r8_srgb
  b8g8r8a8_srgb -> b8g8r8x8_srgb
  a8r8g8b8_srgb -> x8r8g8b8_srgb
  a8b8g8r8_unorm -> x8b8g8r8_unorm
  r10g10b10a2_uscaled -> r10g10b10x2_uscaled
  r10sg10sb10sa2u_norm -> r10g10b10x2_snorm

State trackers and pipe drivers should be updated to take advantage of
this knowledge, e.g., in surface_copy.
2010-09-05 10:17:51 +01:00