Commit graph

19790 commits

Author SHA1 Message Date
Corbin Simpson
2e22bd8460 radeon-gallium: Support new info ioctls in addition to classic getparams.
This makes non-hybrid kernels like newttm from drm-next-radeon work
while avoiding breakage with Fedora/Ubuntu/etc.
2009-05-11 09:05:33 -07:00
Brian Paul
7c3d7353d7 mesa: updated comments for _mesa_generate_mipmap() 2009-05-11 10:02:27 -06:00
Brian Paul
6697311b21 i965: handle extended swizzle terms (0,1) in get_src_reg()
Fixes failed assertion in progs/glsl/twoside.c (but still wrong rendering).
2009-05-11 09:47:32 -06:00
Brian Paul
7c2fe42ded mesa: better handling/printing of driver-specific opcodes, register files
Drivers such as i965 define extra instruction opcodes and register files.
Improve the program printing code to handle those opcodes/files better.
2009-05-11 09:47:32 -06:00
Corbin Simpson
53c2cc8fef radeon-gallium: Clean up some of the BO counting logic. 2009-05-09 00:45:48 -07:00
Corbin Simpson
a738d2b4c2 r300-gallium: vs: Make imms work, cleanup some of the switches. 2009-05-09 00:45:48 -07:00
Corbin Simpson
c4c5bf31a7 r300-gallium: Start VS dumper. 2009-05-09 00:45:48 -07:00
Corbin Simpson
7e347a0f49 r300-gallium: vs: Add SLT, clean up MAX.
This should be all the opcodes for basic TCL.
2009-05-09 00:45:48 -07:00
Corbin Simpson
9b10777148 r300-gallium: vs: Add MAX. 2009-05-09 00:45:48 -07:00
Corbin Simpson
e669ce01d4 r300-gallium: vs: Add scalar setup, RSQ.
Icky icky icky icky. Icky icky, icky icky. Icky.
2009-05-09 00:45:48 -07:00
Corbin Simpson
c6d2b4a495 r300-gallium: vs: Add writemasks. 2009-05-09 00:45:47 -07:00
Corbin Simpson
ce758a21b9 r300-gallium: Fix bad cast. Space accounting completely works now.
Boy, is my face red. :C
2009-05-08 22:05:18 -07:00
Corbin Simpson
1b26c2bbae r300-gallium, radeon: BO handling fixes, some useful asserts. 2009-05-08 19:41:08 -07:00
Corbin Simpson
bed917641c radeon-gallium: Shut up Valgrind. 2009-05-08 19:41:08 -07:00
Corbin Simpson
cd59933d9f r300-gallium, radeon: A couple cleanups.
Trying to track down goddamn bugs. :C
2009-05-08 19:41:08 -07:00
Corbin Simpson
4816764777 r300-gallium: Finish space accounting.
Still broken...
2009-05-08 19:41:08 -07:00
Robert Ellison
1d11220771 i965: improve debug logging
Looking for memory leaks that were causing crashes in my environment
in a situation where valgrind would not work, I ended up improving
the i965 debug traces so I could better see where the memory was
being allocated and where it was going, in the regions and miptrees
code, and in the state caches.  These traces were specific enough
that external scripts could determine what elements were not being
released, and where the memory leaks were.

I also ended up creating my own backtrace code in intel_regions.c,
to determine exactly where regions were being allocated and for what,
since valgrind wasn't working.  Because it was useful, I left it in,
but disabled and compiled out.  It can be activated by changing a flag
at the top of the file.
2009-05-08 16:57:08 -06:00
Robert Ellison
fc6d89145d i965: fix memory leak in context/renderbuffer region management
A temporary change to the intelMakeCurrent() function to make
it work with frame buffer objects causes the static regions
associated with the context (the front_region, back_region,
and depth_region) to take on an additional reference, with
no corresponding release.  This causes a memory leak if a
program repeatedly creates and destroys contexts.

The fix is the corresponding hack, to unreference these
regions when the context is deleted, but only if the
framebuffer objects are still present and the same
regions are still referenced within.

Both sets of code have comment blocks referring to each
other.
2009-05-08 16:47:59 -06:00
Robert Ellison
44a4abfd4f i965: fix segfault on low memory conditions
When out of memory (in at least one case, triggered by a longrunning
memory leak), this code will segfault and crash.  By checking for the
out-of-memory condition, the system can continue, and will report
the out-of-memory error later, a much preferable outcome.
2009-05-08 16:32:29 -06:00
Robert Ellison
c230767d69 mesa: Fixed a texture memory leak
The current texture for any particular texture unit is given an additional
reference in update_texture_state(); but if the context is closed before
that texture can be released (which is quite frequent in normal use, unless
a program unbinds and deletes the texture and renders without it to force
a call to update_texture_state(), the memory is lost.

This affects general Mesa; but the i965 is particularly affected because
it allocates a considerable amount of additional memory for each allocated
texture.
2009-05-08 16:32:28 -06:00
Eric Anholt
1d663ae292 intel: Add a metaops version of glGenerateMipmapEXT/SGIS_generate_mipmaps.
In addition to being HW accelerated, it avoids the incorrect
(black) rendering of the mipmaps that SW was doing in fbo-generatemipmap.
Improves the performance of the mipmap generation and drawing in
fbo-generatemipmap by 30%.
2009-05-08 14:18:04 -07:00
Eric Anholt
b6e94f71c2 intel: Put the constant texcoords used in metaops into a vbo.
Make this be its own function for setup/teardown of the binding of these
texcoords.  No performance difference in the engine demo (I just felt dirty
not using a VBO for this), and I think it should be more resilient to
interference from current GL state.
2009-05-08 14:18:04 -07:00
Brian Paul
f09e5a5b63 i965: const qualifiers 2009-05-08 14:34:27 -06:00
Brian Paul
4e762395ef mesa: raise MAX_VARYING (number of shader varying vars) to 16
16 is the limit for now because of various 32-bit bitfields.
2009-05-08 14:35:48 -06:00
Brian Paul
17a354a119 mesa: assertions to check for too many vertex outputs or fragment inputs 2009-05-08 14:35:48 -06:00
Brian Paul
cc58fbcf2c glsl: check number of varying variables against the limit
Link fails if too many varying vars.
2009-05-08 14:35:48 -06:00
Brian Paul
87fbc9a14e mesa: issue warning for out of bounds array indexes 2009-05-08 12:45:08 -06:00
Brian Paul
e2cf522de0 i965: don't use GRF regs 126,127 for WM programs
They seem to be used for something else and using them for shader temps
seems to lead to GPU lock-ups.
Call _mesa_warning() when we run out of temps.
Also, clean up some debug code.
2009-05-08 12:45:08 -06:00
Brian Paul
40cba5489d glsl: set vertex/fragment program Ids to aid with debugging 2009-05-08 12:45:08 -06:00
Brian Paul
ccaa6463a7 mesa: more shader debug code (disabled) 2009-05-08 12:45:08 -06:00
Keith Whitwell
d5c2ad8514 mesa/st: keep surface_copy arguments positive
The src/dest x,y, and w,h arguments of the pipe->surface_copy
function are unsigned and the drivers aren't expecting negative
(or extremly-large unsigned) values as inputs.  Trim the requests
at the state-tracker level before passing down.
2009-05-08 10:04:14 +01:00
Keith Whitwell
6826bad6a7 mesa/st: remove redundant call to st_finish in CopyTexSubImage
Rendering should already have been flushed, any synchronization will
be done by the driver or memory manager.
2009-05-08 10:04:14 +01:00
José Fonseca
626b6f37ea wgl: Export pixelformats with accumulation bits. 2009-05-08 10:04:14 +01:00
Keith Whitwell
01280cff53 mesa/st: cope with non-ibo index data in st_draw_feedback.c
Previously only non-indexed or indicies-in-a-vbo cases were handled in
this code.  This change adds the missing regular indices-in-memory
case.
2009-05-08 10:04:14 +01:00
Keith Whitwell
4a333c64fa util/upload: catch failures to map_range and return error
Caller may be able to do something about this - eg flush and retry.
2009-05-08 10:04:14 +01:00
Keith Whitwell
48c7aa2648 stw: fix potential uninitialized use of curctx 2009-05-08 10:04:13 +01:00
José Fonseca
26ffd44586 wgl: Enforce a minimum 1x1 framebuffer size. 2009-05-08 10:04:13 +01:00
José Fonseca
3a43ea4946 wgl: Add assertion for missing function. 2009-05-08 10:04:13 +01:00
José Fonseca
082a086e9d wgl: Remove unused variable. 2009-05-08 10:04:13 +01:00
José Fonseca
b25168c34c mesa: Make _mesa_share_state thread safe. 2009-05-08 10:04:13 +01:00
José Fonseca
25a4156a8b wgl: Implement ShareLists. 2009-05-08 10:04:13 +01:00
Ben Skeggs
71b1c92405 nouveau: respect GALLIUM_STATE_TRACKERS_DIRS 2009-05-08 09:33:02 +10:00
Ben Skeggs
9e02fa4532 nouveau: remove dri1 code now we're using the dri state tracker 2009-05-08 09:33:02 +10:00
Ben Skeggs
b7f2b7e936 nouveau: use dri state tracker for dri1 2009-05-08 09:32:56 +10:00
Brian Paul
fa95ecb467 mesa: make the array object save/remove functions static 2009-05-07 14:34:09 -06:00
Brian Paul
32b851c807 mesa: clean-up vertex array object VBO unbinding and delete/refcounting
Don't really delete vertex array objects until the refcount hits zero.
At that time, unbind any pointers to VBOs.
2009-05-07 14:34:09 -06:00
Brian Paul
1030bf0ded mesa: reference counting for gl_array_object
Every kind of object that can be shared by multiple contexts should be
refcounted.
2009-05-07 14:34:09 -06:00
Brian Paul
9bb6684799 mesa: array object comments 2009-05-07 14:34:09 -06:00
Brian Paul
4f6b704f97 mesa: move the NullBufferObj from GLcontext to gl_shared_state
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
2009-05-07 14:34:09 -06:00
Brian Paul
105c8529e7 mesa: fix comments, s/texture/buffer/ 2009-05-07 14:34:09 -06:00