Commit Graph

41923 Commits

Author SHA1 Message Date
Chia-I Wu
bb770af3a5 scons: Add support for GLES.
GLES can be enabled by running scons with

  $ scons gles=yes

When gles=yes is given, the build is changed in three ways.  First,
libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2.  This makes
DRI drivers and libEGL support and advertise GLES support.  Second, GLES
libraries will be created.  They are libGLESv1_CM, libGLESv2, and
libglapi.  Last, libGL or opengl32 will link to libglapi.  This change
is required as _glapi_* will be declared as __declspec(dllimport) in
libmesa.a on windows.  libmesa.a expects those symbols to be defined in
another DLL.  Due to this change to GL, GLES support is marked
experimental.

Note that GLES requires libxml2-python to generate some of its sources.
2011-01-22 11:59:05 +08:00
Chia-I Wu
3f04314ae2 mapi: ENTRY_CURRENT_TABLE_GET should be stringified.
So that it can be renamed to _glapi_get_dispatch.
2011-01-22 11:58:38 +08:00
Kenneth Graunke
0db3161036 glcpp: Regenerate parser files. 2011-01-21 15:41:19 -08:00
Kenneth Graunke
6ecee54a9a glcpp: Remove use of talloc reference counting.
We almost always want to simply steal; we only need to copy when copying
a token list (in which case we're already cloning stuff anyway).
2011-01-21 15:41:19 -08:00
Kenneth Graunke
e256e4743c glsl, i965: Remove unnecessary talloc includes.
These are already picked up by ir.h or glsl_types.h.
2011-01-21 15:41:19 -08:00
Kenneth Graunke
819f92deaa ra: Use the same context when realloc'ing arrays.
The original allocations use regs->regs as the context, so talloc will
happily ignore the context given here.  Change it to match to clarify
that it isn't changing.
2011-01-21 15:39:57 -08:00
Chad Versace
b66be7518a glsl: Improve error message when read-only vars are written
Improves the cases when:
* an explicit assignment references the read-only variable
* an 'out' or 'inout' function parameter references the read-only variable
2011-01-21 14:06:28 -08:00
Chad Versace
01a584d093 glsl: Mark 'in' variables at global scope as read-only
Fixes Piglit tests:
spec/glsl-1.30/compiler/storage-qualifiers/static-write-centroid-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-02.frag
2011-01-21 14:06:28 -08:00
Chad Versace
f633b993b0 glsl: Remove unused class ast_declaration_statment 2011-01-21 14:06:25 -08:00
Jakob Bornecrantz
8af583f6e8 i915g: Don't (un)map vbuf on each (un)map call 2011-01-21 20:53:29 +01:00
Jakob Bornecrantz
0c3352b6df i915g: Don't do unnecessary copies of constants
Even tho st/mesa use user buffers for constants align buffers
other state trackers doesn't use user buffers.
2011-01-21 20:53:29 +01:00
Jakob Bornecrantz
2e60aa511d i915g: Don't emit FS constants when VS contants change 2011-01-21 20:53:29 +01:00
Jakob Bornecrantz
7287964f94 i915g: Use slab allocator for transfers
Also remove unused i915_transfer struct
2011-01-21 20:53:29 +01:00
Jakob Bornecrantz
484edfc815 st/dri: Fix warning 2011-01-21 20:53:29 +01:00
Christian König
a40305dcdb r600g: check if hardware blits are possible bevore enabling tilling 2011-01-21 19:47:24 +01:00
Alex Deucher
4b3789427f r600g: FLT_TO_INT_FLOOR is trans instruction
Add missing evergreen FLT_TO_INT_FLOOR instruction.
2011-01-21 12:41:23 -05:00
Dave Airlie
a637280e42 mesa: EXT_framebuffer_sRGB interface additions.
This adds the get/enable enums and internal gl_config storage
for this extension.

In theory this is all that is needed to enable this extension
from what I can see, since its not mandatory to implement the
features if you don't advertise the visuals or the fb configs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-21 19:56:13 +10:00
Andre Maasikas
634e889bb5 r600c: get OQ results only for 4 DBs on r600 class
- since evergreen addition which increased this to 8 depth backends
  other bytes may contain garbage values
2011-01-21 11:48:03 +02:00
Brian Paul
af4e2f4665 docs: update README.WIN32 per Karl's request 2011-01-20 18:52:53 -07:00
Ian Romanick
2fb0aebd4a intel: Fix typeos from 3d028024 and 790ff232
...and remove egg from face.
2011-01-20 13:51:07 -08:00
Ian Romanick
790ff232e2 i915: Set correct values for range/precision of fragment shader types 2011-01-20 13:35:59 -08:00
Ian Romanick
3d028024e5 i965: Set correct values for range/precision of fragment shader types 2011-01-20 13:35:59 -08:00
Ian Romanick
04dca296e0 mesa: Set correct values for range/precision of shader integer types 2011-01-20 13:35:59 -08:00
Ian Romanick
dde3270c19 mesa: Connect glGetShaderPrecisionFormat into the dispatch table 2011-01-20 13:35:59 -08:00
Brian Paul
37233f1ee0 softpipe: check for null pointers during context create/destroy
See http://bugs.freedesktop.org/show_bug.cgi?id=32309
Apparently, malloc() is failing during context creation.  Not
checking for nulls here led to crashes elsewhere.
2011-01-20 13:46:57 -07:00
Brian Paul
4ef955a12a graw: fix logic error in pixel format selection
The loop to choose a pixel format for the window was incrementing
'i' after we succeeded in creating the window so if we chose format[0]
for graw_create_window_and_screen() we were putting format[1] in
the pipe_resource template for creating the render target.

This only worked because of the order of the elements in the formats[]
array.

The graw_xlib.c code now properly compares the requested gallium pixel
format against the visual's color layout.

Update all the graw demos to fix the off-by-one-i error.
2011-01-20 13:37:26 -07:00
Ian Romanick
22eeb1b331 Fix the build from 887d2b64
Thanks to all the include frobbing, GLuint is not known in some places
that included enums.h.
2011-01-20 11:30:14 -08:00
Brian Paul
887d2b647b mesa: clean-up _mesa_lookup_prim_by_nr()
Remove the redundant public _mesa_prim_name[] array.
2011-01-20 09:44:33 -07:00
Brian Paul
fe49dcb3b0 mesa: move extra prim mode #defines 2011-01-20 09:44:33 -07:00
Brian Paul
b62e78c783 vbo: added comment 2011-01-20 09:44:33 -07:00
Brian Paul
cfae745a8b mesa: minor formatting fixes 2011-01-20 09:10:03 -07:00
Brian Paul
7330f8b2bc st/mesa: clean up the sampler view format code 2011-01-20 08:56:36 -07:00
Brian Paul
751fe9058b mesa: document sRGBDecode field 2011-01-20 08:56:36 -07:00
Brian Paul
f579a05a9f st/mesa: formatting, whitespace fixes 2011-01-20 08:56:32 -07:00
Andre Maasikas
c20778e76f r600c: bump sq gpr resources if a shader needs more than default
ideally this should be set once in the beginning of CS but there's
no way to change values there while in the middle of rendering.
For now reemitting SQ setup seems to work probably due to
r700WaitForIdleClean after each render

currently does not to try to decrease values once increased

fixes hangs in glsl-vs-vec4-indexing-temp-src-in-nested-loop-combined
glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined for my rv740
maybe more for other chips
2011-01-20 13:11:56 +02:00
Chia-I Wu
e8c7d7598f glapi: Fix OpenGL and OpenGL ES interop.
When --enable-shared-glapi is specified, libGL will share libglapi with
OpenGL ES instead of defining its own copy of glapi.  This makes sure an
app will get only one copy of glapi in its address space.

The new option is disabled by default.  When enabled, libGL 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.

For GLX, indirect rendering for has_different_protocol() functions is
tricky.  A has_different_protocol() function is assigned only one
dispatch offset, yet each entry point needs a different protocol opcode.
It cannot be supported by the shared glapi.  The fix to this is to make
glXGetProcAddress handle such functions specially before calling
_glapi_get_proc_address.

Note that these files are automatically generated/re-generated

 src/glx/indirect.c
 src/glx/indirect.h
 src/mapi/glapi/glapi_mapi_tmp.h
2011-01-20 17:15:50 +08:00
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