Commit graph

92185 commits

Author SHA1 Message Date
Kristian Høgsberg
efaf90b03e Move swap_interval to new extension mechanism. 2007-10-10 19:14:10 -04:00
Kristian Høgsberg
ac3e838fa7 Move the copySubBuffer extension over to the new mechanism. 2007-10-10 18:57:57 -04:00
Brian
178beffd35 update comments (s/softpipe/gallium/ etc) 2007-10-10 16:51:09 -06:00
Kristian Høgsberg
f616a263a2 Implement new screen extension API.
This new API lets the loader examine DRI level extensions provided by the
driver in a forward compatible manner.

Much of the churn in the DRI interface is adding support for new
extensions or removing old, unused extensions.  This new extension
mechanism lets the loader query the extensions provided by the driver
and implement the extensions it knows about.  Deprecating extensions
is done by not exporting that extension in the list, which doesn't
require keeping old function pointers around to preserve ABI.
2007-10-10 18:47:22 -04:00
Kristian Høgsberg
295dc2d225 Stop passing in unused fbconfigs to createNewScreen. 2007-10-10 18:46:51 -04:00
Kristian Høgsberg
64106d0d9a Pull createNewScreen entry point into dri_util.c.
This pulls the top level createNewScreen entry point out of the drivers
and rewrites __driUtilCreateNewScreen in dri_util.c to be the new entry point.

The change moves more logic into the common/ layer and changes the
createNewScreen entry point to only be defined in one place.
2007-10-10 18:36:14 -04:00
Brian
babdd1f651 minor optimization for color/z results 2007-10-10 16:21:28 -06:00
Kristian Høgsberg
efd03a278a Replace open-coded major, minor, and patch version fields with __DRIversionRec. 2007-10-10 18:20:08 -04:00
Brian
d37e048cd1 disable some assertions which pop up during window resize, but can be ignored for now 2007-10-10 16:19:49 -06:00
Kristian Høgsberg
5987a03f99 Convert all DRI entrypoints to take pointers to __DRI* types.
The entrypoints take a mix of __DRIscreen * and void * (screen private)
arguments (similarly for contexts and drawables).  This patch does away
with passing the private void pointer and always only passes the fully
typed __DRIscreen pointer and always as the first argument.

This makes the interface more consistent and increases type safety, and
catches a bug where we would pass a screen private to DRIdrawable::getSBC.
2007-10-10 18:00:18 -04:00
Kristian Høgsberg
aac367f48a Remove screenConfigs from __DRIscreen.
The screenConfigs field of __DRIscreen points back to the containing
__GLXscreenConfigs struct.  This is a serious abstraction violation; it
assumes that the loader is libGL and that there *is* a __GLXscreenConfigs
type in the loader.

Using the containerOf macro, we can get from the __DRIscreen pointer to
the containing __GLXscreenConfigs struct, at a place in the stack
where the above is a valid assumption.  Besides, the __DRI* structs shouldn't
hold state other than the private pointer.
2007-10-10 18:00:13 -04:00
Brian
d0bca086ab fix get_result_vector() since fp output slots are not fixed anymore 2007-10-10 15:45:57 -06:00
Brian
9f8cfa75ca fix softpipe_clear() to handle ps->offset!=0 (such as when rendering to texture and level!=0) 2007-10-10 15:09:57 -06:00
Kristian Høgsberg
fa72013ada Drop mostly unused __DRIid typedef. 2007-10-10 17:09:48 -04:00
Kristian Høgsberg
9590ba97ad Avoid deadlock in GarbageCollectDRIDrawables.
__glXinitialize() can't be called with the GLX lock held.  Just
pass in the __GLXscreenConfigs pointer so we don't have to look it
up in __GLXdisplayPrivate.
2007-10-10 17:09:36 -04:00
Kristian Høgsberg
8ed5c7ca05 Drop createContext and destroyContext from DRIinterfaceMethods.
As for createDrawable and destroyDrawable, these functions immediately
upon entry to driCreateNewContext and immediately before exit from
driDestroyContext.  Instead of passing function pointers back and forth
just obtain the drm_context_t prior to calling DRIscreen::createNewContext
and pass it as a parameter.

This change also lets us keep the DRI context XID in the libGL loader only.
2007-10-10 17:09:16 -04:00
Kristian Høgsberg
4ff95e78e1 Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.
All the DRI driver did was call the createDrawable callback immediately
upon entry to DRIscreen::createNewDrawable to get the drm_drawable_t.
We can just call that before calling into the DRI driver and pass the
returned drm_drawable_t as an argument to the DRI entry point.

Likewise for destroyDrawable.

Also, DRIdrawablePrivate::draw isn't used anywhere, and since the
driver no longer needs the XID of the drawable we can now drop that.
2007-10-10 17:07:26 -04:00
Kristian Høgsberg
b068af2f3b Key drm_i915_flip_t typedef off of the ioctl #define instead. 2007-10-10 17:07:01 -04:00
Brian
8b68104b90 free/unreference pipe_surface in get_texel() 2007-10-10 15:05:24 -06:00
Brian
2b31b413f9 use correct mipmap level in st_render_texture() 2007-10-10 14:13:21 -06:00
Kristian Høgsberg
aceccda56b Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.
Many DRI entry points took a __DRInativeDisplay pointer and a screen
index as arguments.  The only use for the native display pointer was to
pass it back to the loader when looking up the __DRIscreen for the given
screen index.

Instead, let's just pass in the __DRIscreen pointer directly, which
let's drop the __DRInativeDisplay type and the getScreen function.

The assumption is now that the loader will be able to retrieve context
from the __DRIscreen pointer when necessary.
2007-10-10 15:32:15 -04:00
Brian
e23a7b2ea4 use pipe_region_reference() in softpipe_get_tex_surface() to fix refcount error 2007-10-10 11:40:04 -06:00
Brian
500e3af175 fix width/height padding that caused failed assertion upon window resize 2007-10-10 11:04:48 -06:00
Brian
03ff9c96bf replace 'brick' with correct program name in printfs 2007-10-10 10:56:48 -06:00
Brian
fa7a589876 Size of input_to_index array should be VERT_ATTRIB_MAX.
This fixes an out of bounds array write that was causing the glsl/bump demo to render incorrectly.
2007-10-10 10:33:38 -06:00
Brian
44200421e8 Merge tgsi_mesa_compile_fp_program() and tgsi_mesa_compile_vp_program() into tgsi_translate_mesa_program(). 2007-10-10 09:44:54 -06:00
Brian
013ce15595 remove unused var 2007-10-10 09:43:37 -06:00
Mrc Gran
de3073d377 fix force_s3tc_enable option 2007-10-10 09:15:42 -06:00
Dan Nicholson
b182613f2f Ignore more generated files in progs/
Many of the directories in progs/ were missing .gitignore files or
were tracking generated files. This patch is basically the process of
running `make' in each directory and then finding the untracked files
with `git-ls-files -o --exclude-per-directory=.gitignore'. The existing
files were also sorted.
2007-10-10 08:44:58 -06:00
Brian
d4c3f26662 start on a unified vertex/fragment program translation function 2007-10-09 16:56:25 -06:00
Brian
11a46c61e0 Generate DCLs for temporaries. 2007-10-09 16:28:01 -06:00
Brian
578962d624 Finish up decls for packed fragment program outputs. 2007-10-09 16:20:00 -06:00
Brian
bc139a19b0 Pack fragment program outputs to be consistant with vertex programs.
Previously, output[0] was always Z and output[1] was color.  Now output[0]
will be color if Z is not written.
In shade_quad() use the semantic info to determine which quantity is in
which output slot.
2007-10-09 14:55:22 -06:00
Brian
342bc50c3d update some comments 2007-10-09 14:52:26 -06:00
Brian
aec1f8e4f8 More work on flow control for CAL/RET. 2007-10-09 14:40:11 -06:00
Brian
31bd01f93b New ATTRIB interpolation type for vertex program inputs/declarations. 2007-10-09 14:36:14 -06:00
Brian
47ff9428ee Don't emit semantic info for vertex program inputs. 2007-10-09 14:31:45 -06:00
Brian
94490f63c8 Use linked fragment shader inputs (if present) to determine which outputs are needed. 2007-10-09 14:12:26 -06:00
Brian
9509afe97c Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-10-09 12:36:56 -06:00
Zou Nan hai
de803f538c Non Square Matrix 2007-10-09 15:05:10 +08:00
Zou Nan hai
ae5aa1f906 fix for prev commit 2007-10-09 14:35:28 +08:00
Zou Nan hai
e2dff35f95 INT support 2007-10-09 14:26:01 +08:00
Zou Nan hai
82d4aa4055 shadow sampler fix.
1. spec requite result (0, 0, 0, 1) instead of (0, 0, 0, 0)
  2. support shadow sampler in simd8
2007-10-09 14:14:59 +08:00
Dave Airlie
8909f1131a i915: workout max relocs from batch buffer size 2007-10-09 14:36:04 +10:00
Dave Airlie
7e83c15fa0 i915: fixup up bufmgr to pass num buffers to kernel
remove unneeded entry points
2007-10-09 12:18:50 +10:00
Sergio Monteiro Basto
4599683b48 i915: Fix undefined ALIGN symbol from 77e0523fb7. 2007-10-08 11:09:38 -07:00
Zou Nan hai
ac985708f4 Only vertex program fix, bypass tnl vertex program 2007-10-08 15:34:03 +08:00
Jerome Glisse
32699696e3 r300: fragprog tex instruction now take writemask into acount. 2007-10-07 22:49:56 +02:00
Patrice Mandin
d85e8b088b nouveau: move nv10 clear command, for usage by other gpu 2007-10-06 02:30:24 +02:00
Dave Airlie
0ba57d02cd i915: drop complex list handling for now
If this proves a win later we can add it back but at the moment
I don't think it's required yet
2007-10-05 14:41:32 +10:00