Commit graph

48156 commits

Author SHA1 Message Date
Brian Paul
2ace9ffc8e mesa: plug in dispatch functions for GL_ARB_texture_storage 2011-10-31 10:52:57 -06:00
Brian Paul
29eb2e8944 mesa: compile new texstore.c file 2011-10-31 10:52:56 -06:00
Brian Paul
a7d9e449f0 mesa: init extension entry for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
7d577d703d mesa: display list dispatch for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
a0d736b3b7 mesa: new glTexImage error checks for GL_ARB_texture_storage
If the texture memory was allocated with glTexStorage1/2/3D() we can
only change the image data with glTexSubImage calls.
2011-10-31 10:52:56 -06:00
Brian Paul
fbc419314e mesa: glGetTexParameter support for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
a8fcb7927b mesa: implement new functions for GL_ARB_texture_storage
This is the glTexStorage1D/2D/3D() functions.  Basically do error
checking then call the driver hook to actually allocate memory.
2011-10-31 10:52:56 -06:00
Brian Paul
ae9bef240d glapi: regenerated API files for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
af95504dad glapi: new API specs for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
2e322bb8d1 mesa: add new driver hook for AllocTextureStorage() 2011-10-31 10:52:56 -06:00
Brian Paul
b296315881 mesa: add new fields for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
José Fonseca
1e9d8934a1 svga: Flush the hwtnl primitives before writing to buffers.
svga keeps a small queue of similar primitive draws in order to coalesce
them into a single draw primitive command.

But the buffers referred in primitives not yet emitted were being ignored
in the considerations to flush or not the context.

This fixes piglit vbo-map-remap, vbo-subdata-sync, vbo-subdata-zero, and
Seeker.

Based on investigation and patch from Brian Paul.

Reviewed-By: Brian Paul <brianp@vmware.com>
2011-10-31 15:22:09 +00:00
Thomas Hellstrom
c04b9d1d56 st/xa: Plug a pipe context leak.
Forgot to destroy the pipe context on xa context destroy.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-31 14:35:23 +01:00
Thomas Hellstrom
037e7a68f5 pipebuffer/debug: Fix a recursive mutex lock
pb_debug_manager_dump was trying to take a lock already
held by all callers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jos Fonseca <jfonseca@vmware.com>
2011-10-31 13:25:39 +01:00
Dave Airlie
56d30bb00d radeon/r200: drop remains of r300/r600 support along with old drm 1.x kernel
This drops all the old drmSupports* checks since KMS does them all, and it
also drop R300_CLASS and R600_CLASS.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-30 16:40:56 +00:00
Chia-I Wu
e252af3406 llvmpipe: fix a crash in non-SSE path
It is a typo went unnoticed.
2011-10-30 20:05:05 +08:00
Chia-I Wu
d1d456a774 intel: enable GL_OES_draw_texture 2011-10-30 20:00:07 +08:00
Chia-I Wu
b4dc35d9bc meta: add _mesa_meta_DrawTex()
It is set to dd->DrawTex.

Reviewed-by: Brian Paul <brianp@vmware.com>

[olv: set dd->DrawTex in _mesa_init_driver_functions]
2011-10-30 20:00:03 +08:00
Marek Olšák
9eac0fce83 r600g: reset the render condition to NULL when rendering unconditionally 2011-10-30 02:25:51 +02:00
Marek Olšák
b40edc63d7 r600g: shortcut ctx->screen->ws to ctx->ws 2011-10-30 02:25:51 +02:00
Eric Anholt
44c65d0e4e i965: Remove the prepare() hook from state atoms.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:26 -07:00
Eric Anholt
2649ff4d90 i965: Remove the memcpy()ed atoms array now that everything is emit()-based.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:23 -07:00
Eric Anholt
35c7e8cebe i965: Merge brw_validate_state() and brw_upload_state() together.
They were called back-to-back at this point.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:21 -07:00
Eric Anholt
68c813e8ea i965: Remove state upload code for calling prepare() now that there are none.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:17 -07:00
Eric Anholt
26cfca825d i965: Remove some old texturing debug code.
It caught one possible bug I recall in my time working on the driver,
and we haven't been setting it for non-fixed-function since the new FS
backend came along.  The bug it caught was likely a confusion about
sampler mappings, which we have tests for these days.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:15 -07:00
Eric Anholt
bd27c25ff9 i965: Finally, move the global fallbacks check to emit() time.
This was the last prepare() function, and it's the first state atom,
so it must be ready to move.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:13 -07:00
Eric Anholt
c83bfeabc6 i965: Move index buffer upload to emit() time.
It's consumed by the brw_emit_index_buffer() code at emit() time.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:11 -07:00
Eric Anholt
78a010127f i965: Do a hack job of merging VB prepare()/emit() together.
I don't really want to touch this impenetrable code in this series, so
just call the one function from the other, since no other atom cares
about them.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:09 -07:00
Eric Anholt
bf11c9e4c1 i965: Move the WM input sizes calculation to emit() time.
It's used for program compile.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:07 -07:00
Eric Anholt
dc9a753f66 i965: Move program compile to emit() time.
Only 4 other prepare() functions are left, which don't rely on this.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:03 -07:00
Eric Anholt
0969568fce i965/gen4: Move CURBE offset calculation to emit() time.
This is consumed by the unit state.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:01 -07:00
Eric Anholt
47c4d950cb i965/gen4: Fold push constant prepare()/emit() together.
While other units need to know about our constant buffer offsets,
nothing else cared about which particular BO other than the emit() half.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:59 -07:00
Eric Anholt
752cad8f33 i965/gen6: Move viewport state setup to emit() time.
Only the emit() for the pointers into the batch later in this file
cares.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:56 -07:00
Eric Anholt
8f0a54e6ff i965/gen4: Move URB fence recalculate to emit() time.
This is used by the unit state, which is at emit() time.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:54 -07:00
Eric Anholt
ab8637b03f i965: Fold the gen6/7 URB state prepare()/emit() together.
No other unit cares about the prepare state, unlike gen4-5.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:49 -07:00
Eric Anholt
395a8605fa i965: Move VS pull constant upload to emit() time.
Only needed by the emit() for VS surfaces.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:45 -07:00
Eric Anholt
c933b33dc8 i965: Fold prepare() and emit() of VS surface state setup together.
This rearranges the code a bit, and makes the upload of the binding
table take only as many surfaces as there are in use.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:42 -07:00
Eric Anholt
2b730c1f19 i965: Move WM pull constant setup to emit() time.
It's needed by the WM surface state setup, which is now emit().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:39 -07:00
Eric Anholt
4de2cfc3a0 i965/gen7: Fold WM surface state prepare()/emit() together.
These produce BRW_NEW_SURFACES (used by binding table emit()) and
BRW_NEW_NR_WM_SURFACES (used by WM unit emit()).  Fixes a bug where
with no texturing and no color buffer, we wouldn't consider the null
renderbuffer in nr_surfaces.  This was harmless because nr_surfaces is
only used for the prefetch info in the unit state.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:36 -07:00
Eric Anholt
93cabff7d6 i965/gen4: Fold WM surface state prepare()/emit() together.
These produce BRW_NEW_SURFACES (used by binding table emit()) and
BRW_NEW_NR_WM_SURFACES (used by WM unit emit()).  Fixes a bug where
with no texturing and no color buffer, we wouldn't consider the null
renderbuffer in nr_surfaces.  This was harmless because nr_surfaces is
only used for the prefetch info in the unit state.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:32 -07:00
Eric Anholt
9a5f8a98ed i965: Move sampler state to emit() time.
This is consumed by the WM unit, which is already at emit().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:30 -07:00
Eric Anholt
c4aaf85285 i965/gen4: Move unit state setup to emit() time.
It is only needed in time for brw_psp_urb_cbs(), which is also an emit().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:27 -07:00
Eric Anholt
c0574d5a90 i965/gen7: Fold prepare() and emit() of SF CLIP/VP state together.
The prepare() only made state for its emit(), not anybody else.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:24 -07:00
Eric Anholt
7a874d04a8 i965/gen4: Move CC VP to emit() time, since it's only needed by CC's emit().
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:20 -07:00
Eric Anholt
9015969e6e i965: Move push constants setup to emit() time.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:18 -07:00
Eric Anholt
f84f3322b4 i965/gen6: Move setup of CC state batches to emit time.
This is part of a series trying to eliminate the separate prepare()
hook in state upload.  The prepare() hook existed to support the
check_aperture in between calculating state updates and setting up the
batch, but there should be no reason for that any more.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:15 -07:00
Eric Anholt
78188bc537 i965: Check Fallback again after upload.
As we move state to emit() time from prepare() time, a couple of the
places that flag fallbacks will move here.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:12 -07:00
Eric Anholt
eaf4d3e6e2 i965: Remove the validated BO list, now that it's unused.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:09 -07:00
Eric Anholt
3d851ae488 i965: Use the batch save/reset code to avoid needing the BO validate step.
We were doing the BO validate step in prepare() (brw_validate_state())
hooks of atoms so that we could check_aperture before emitting the
relocation trees during brw_upload_state() that would actually make
the batchbuffer reference too much memory to be executed.  Now that
all relocations occur in the batchbuffer, we can instead
check_aperture after emitting our state into the batchbuffer, and
easily roll back, flush, and retry if we happened to go over the
limits.

This will let us remove the whole prepare() vs emit() split in our
state atoms, which is a source of tricky dependencies and duplicated
code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:05 -07:00
Eric Anholt
da8f052560 intel: Return error value from intel_batchbuffer_flush().
This will let the caller do something sensible on error, if it cares.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:16:02 -07:00