Commit Graph

41887 Commits

Author SHA1 Message Date
Chia-I Wu 9767d3b5ad glapi: Fix OpenGL ES 1.1 and 2.0 interop.
Move _glapi_* symbols from libGLESv1_CM.so and libGLESv2.so to
libglapi.so.  This makes sure an app will get only one copy of glapi in
its address space.

Note that with this change, libGLES* and libglapi must be built from the
same source tree and distributed together.  This requirement comes from
the fact that the dispatch offsets used by these libraries are
re-assigned whenever GLAPI XMLs are changed.
2011-01-20 17:15:50 +08:00
Chia-I Wu 97185bf265 mapi: Add support for bridge mode.
In bridge mode, mapi no longer implements glapi.h.  It becomes a user of
glapi.h.  Imagine an app that uses both libGL.so and libGLESv2.so.
There will be two copies of glapi in the app's memory.  It is possible
that _glapi_get_dispatch does not return what _glapi_set_dispatch set,
if they access different copies of the global variables.  The solution
to this situation to build either one of the libraries as a bridge to
the other.  Or build both libraries as bridges to another shared
glapi library.
2011-01-20 17:15:50 +08:00
Chia-I Wu 96c52d16c1 mapi: u_current_table may be renamed.
When MAPI_MODE_GLAPI is defined, u_current_table is renamed to
_glapi_Dispatch or _glapi_tls_Dispatch.  The ASM dispatchers should not
use hardcoded name.
2011-01-20 17:15:50 +08:00
Chia-I Wu 6fc152f660 mapi: Add a new glapi.h implementation.
The new implementation is based on mapi.  No new script is needed.  As
noted in sources.mk, the way to use it is to compile MAPI_GLAPI_SOURCES
with MAPI_MODE_GLAPI defined.
2011-01-20 17:15:50 +08:00
Chia-I Wu 23a89f1872 mapi: Fix glapi printers for gl_and_es_API.xml.
Fix GLAPIPrinter, ES1APIPrinter, and ES2APIPrinter to output files that
are ready for compilation.  Since gl_and_es_API.xml is based on
gl_API.xml, the hidden and handcode attributes of entries have to be
overridden for ES1APIPrinter and ES2APIPrinter.
2011-01-20 17:15:50 +08:00
Chia-I Wu 7828f554ab mapi: Allow prefix to be macro.
Treat prefix as macro when it is all uppercase.  Generate PREFIX(name)
instead of PREFIXname when it is a macro.
2011-01-20 17:15:49 +08:00
Chia-I Wu f71a9acf59 mapi: Add the ability to parse GLAPI XML.
A prerequisite if we want to convert vgapi.csv to vgapi.xml, or to use
mapi for glapi.
2011-01-20 17:15:49 +08:00
Chia-I Wu 323b5e323a glapi: Add gl_and_es_API.xml.
gl_and_es_API.xml defines OpenGL ES 1.1 and 2.0 API as well as OpenGL
API.  It consists of gl_API.xml and the newly added es_EXT.xml,
ARB_get_program_binary.xml, OES_single_precision.xml, and
OES_fixed_point.xml.
2011-01-20 17:15:49 +08:00
Kenneth Graunke 4fafde6a8c doxygen: Add glsl to the Makefile and .gitignore. 2011-01-19 23:49:54 -08:00
twied aec19381ec Add machine generated files to .gitignore 2011-01-19 23:48:47 -08:00
Kenneth Graunke 21031b4e88 glsl: Don't bother unsetting a destructor that was never set.
This was totally copied and pasted from glsl_symbol_table.
2011-01-19 23:40:33 -08:00
Chia-I Wu c116a0e2dc autoconf: Fail when --with-state-trackers is incomplete.
When --enable-openvg or --enable-gallium-egl is enabled,
--with-state-trackers must have vega or egl.
2011-01-20 15:04:34 +08:00
Henri Verbeet 21148e6a88 softpipe: Bind samplers to views instead of the underlying resource.
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-19 21:47:27 -07:00
Henri Verbeet 54fdc351dd softpipe: Get rid of the redundant resource parameter to get_sampler_variant().
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-19 21:47:27 -07:00
Dave Airlie 8c68362d7c r200: fix up some problems with TFP on r200 2011-01-20 14:35:09 +10:00
Brian Paul 7e86d9bd8c llvmpipe: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33284
2011-01-19 18:46:59 -07:00
Eric Anholt b41d323c90 i965/fs: Take the shared mathbox into account in instruction scheduling.
I don't have evidence for this amounting to any improvement,
but it does codify a bit more what we understand so far about
the pipeline.
2011-01-19 16:30:00 -08:00
Eric Anholt 382c2d99da i965/fs: Add a helper function for detecting math opcodes. 2011-01-19 16:29:14 -08:00
Eric Anholt 1991d92207 i965/fs: Assign URB/CURB register numbers after instruction scheduling.
This fixes a bunch of unnecessary barriers due to the scheduler not
knowing what that arbitrary register description refers to when trying
to reason about its dependencies.

The result is rescheduling in the convolution kernel shader in
Lightsmark, which results in avoiding register spilling and increasing
the performance of the first scene from 6-7 fps midway through the
panning to 11fps.  The register spilling was a regression from Mesa
7.9 to Mesa 7.10.
2011-01-19 16:29:14 -08:00
Eric Anholt 63879d90ac i965/fs: Add an instruction scheduler.
Improves performance of my GLSL demo by 5.1% (+/- 1.4%, n=7).  It also
reschedules the giant multiply tree at the end of
glsl-fs-convolution-1 so that we end up not spilling registers,
producing the expected level of performance.
2011-01-19 16:29:11 -08:00
Eric Anholt 3f2fe31eee i965/fs: Add a helper for detecting texturing opcodes. 2011-01-19 16:29:10 -08:00
Christian König a124490262 r600g: fix segfault if texture operand is a literal
This fixes Bug 33262
2011-01-19 23:48:02 +01:00
Brian Paul 3ee60a3558 mesa: implement glGetShaderPrecisionFormat()
Drivers should override the default range/precision info as needed.
No drivers do this yet.
2011-01-19 07:41:55 -07:00
Brian Paul 34613c66ac gallium/docs: document result type for some types of queries 2011-01-19 07:41:55 -07:00
Dave Airlie a5da4acb95 radeon: avoid segfault on 3D textures.
This is a candidate for 7.9 and 7.10
2011-01-19 16:27:13 +10:00
Dave Airlie 4832403c38 radeon: oops didn't need this logbase2 fn 2011-01-19 16:17:03 +10:00
Dave Airlie c6fb88fc5a radeon: calculate complete texture state inside TFP function
(really not sure why I'm doing this).

This is a candidate for 7.9 and 7.10 branches.
2011-01-19 16:11:29 +10:00
Ben Skeggs c73a1c18b2 dri/nouveau: allow multiple maps of surface buffers
Can happen during swrast fallbacks if a buffer is somehow bound as
a render target and a texture.

Fixes gnome-shell on nv20, and gets it mostly working on nv10.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-01-19 15:51:57 +10:00
Dave Airlie f7bab47e6c radeon/r200: fix fbo-clearmipmap + gen-teximage
sw clears were being used and not getting the correct offsets in the span
code.

also not emitting correct offsets for CB draws to texture levels.

(I've no idea why I'm playing with r100).

This is a candidate for 7.9 and 7.10
2011-01-19 12:55:04 +10:00
Eric Anholt 568e008365 i965: Fix a comment typo. 2011-01-18 16:30:59 -08:00
Eric Anholt 8ce425f3e3 i965: Fix a bug in i965 compute-to-MRF.
Fixes piglit glsl-fs-texture2d-branching.  I couldn't come up with a
testcase that didn't involve dead code, but it's still worthwhile to
fix I think.
2011-01-18 16:30:59 -08:00
Christian König ba700d2ead r600g: fix reserve_cfile for R700+
According to R700 ISA we have only two channels for cfile constants.
This patch makes piglit tests "glsl1-constant array with constant
indexing" happy on RV710.
2011-01-19 00:40:28 +01:00
Chad Versace 46f7105df4 glsl: Fix segfault due to missing printf argument
Fixes the following Piglit tests:
glslparsertest/shaders/array2.frag
glslparsertest/shaders/dataType6.frag

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-18 15:23:18 -08:00
Chad Versace 45e8e6c6b1 glsl: Fix semantic checks on precision qualifiers
The check for
   Precision qualifiers only apply to floating point and integer types.
was incomplete. It rejected only type 'bool' and structures.
2011-01-18 14:43:49 -08:00
Brian Paul 42dbc2530b llvmpipe: make sure binning is active when we begin/end a query
This fixes a potential failure when a begin/end_query is the first
thing to happen after flushing the scene.

NOTE: This is a candidate for the 7.10 and 7.9 branches.
2011-01-18 14:02:01 -07:00
Brian Paul fb7a8dedfa softpipe: rename some functions for consistency 2011-01-18 14:02:01 -07:00
Henri Verbeet 9e964baaf3 r600g: Kill trailing whitespace. 2011-01-18 20:57:04 +01:00
Henri Verbeet 7e2e8d09f7 r600g: Remove the unused eg_states_inc.h and r600_states_inc.h. 2011-01-18 20:57:04 +01:00
Henri Verbeet 495dec0a2b r600g: Simplify some r600_bc_add_alu_type() calls to r600_bc_add_alu(). 2011-01-18 20:57:04 +01:00
Brian Paul 90ff6178a2 vbo: initialize num_instances in a few places
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=33247
There might still be some issues with drawing multiple instances
with VBO splitting to investigate someday.
2011-01-18 12:18:32 -07:00
Eric Anholt d5a53ad271 ra: Take advantage of the adjacency list in finding a node to spill.
This revealed a bug in ra_get_spill_benefit where we only considered
the benefit of the first adjacency we were to remove, explaining some
of the ugly spilling I've seen in shaders.  Because of the reduced
spilling, it reduces the runtime of glsl-fs-convolution-1 36.9% +/-
0.9% (n=5).
2011-01-18 10:17:50 -08:00
Eric Anholt ea8e21856e ra: Remove unused "name" field in regs. 2011-01-18 10:17:48 -08:00
Eric Anholt 604022abed ra: Take advantage of the adjacency list in ra_select() too.
Reduces runtime of glsl-fs-convolution-1 another 13.9% +/- 0.6% (n=5).
2011-01-18 10:17:44 -08:00
Eric Anholt 7cf648da63 ra: Add an adjacency list to trade space for time in ra_simplify().
This was recommended in the original paper, but I figued "make it run"
before "make it fast".  Now we make it fast.  Reduces the runtime of
glsl-fs-convolution-1 by 12.7% +/- 0.6% (n=5).
2011-01-18 10:17:40 -08:00
Eric Anholt 58c988ada5 glsl: Skip the rest of loop unrolling if no loops were found.
Shaves 1.6% (+/- 1.0%) off of ff_fragment_shader glean texCombine time
(n=5).
2011-01-18 10:17:37 -08:00
Eric Anholt 754b9c5363 ra: Trade off some space to get time efficiency in ra_set_finalize().
Our use of the register allocator in i965 is somewhat unusual.
Whereas most architectures would have a smaller set of registers with
fewer register classes and reuse that across compilation, we have 1,
2, and 4-register classes (usually) and a variable number up to 128
registers per compile depending on how many setup parameters and push
constants are present.  As a result, when compiling large numbers of
programs (as with glean texCombine going through ff_fragment_shader),
we spent much of our CPU time in computing the q[] array.  By keeping
a separate list of what the conflicts are for a particular reg, we
reduce glean texCombine time 17.0% +/- 2.3% (n=5).

We don't expect this optimization to be useful for 915, which will
have a constant register set, but it would be useful if we were switch
to this register allocator for Mesa IR.
2011-01-18 10:17:34 -08:00
Brian Paul 5b58b8c579 softpipe: added some null pointer checks
This shouldn't really be needed but it may help with
http://bugs.freedesktop.org/show_bug.cgi?id=32309
2011-01-18 09:59:28 -07:00
Brian Paul c97e4532bb softpipe: s/tex_cache/fragment_tex_cache/
Just to be more consistant with the vertex and geometry tex cache fields.
2011-01-18 09:59:28 -07:00
José Fonseca 843f537cfb Remove executables from source tree. 2011-01-18 15:25:30 +00:00
Andre Maasikas 4ef3e261a4 r600c: preserve correct buffer when using fbo
Hopefully better than previous - this passes more mipgen tests
2011-01-18 16:25:19 +02:00