Commit graph

15227 commits

Author SHA1 Message Date
José Fonseca
27d8d6f44f scons: Add a env.CodeGenerate method to simplify code generation via python scripts.
env.CodeGenerate(
	target = 'my_source.c',
	script = 'my_generator.py',
	source = ['input.txt', 'another.txt'],
	command = 'python $SCRIPT $SOURCE > $TARGET'
)

It will take care generating all appropriate dependencies, including any
module imported by the generator script, and the respective .pyc file
side effects.
2008-07-03 15:06:24 +09:00
Brian Paul
1ca2306147 mesa: fix vertex array validation test for attribute 0 (vert pos)
We don't actually need vertex array[0] enabled when using a vertex
program/shader.

cherry-picked from master
2008-07-02 19:18:10 -06:00
Brian Paul
98b7174ad6 gallium: replace an assertion with "if (!texobj) continue"
It's possible to call update_samplers() between the time a fragment shader
is bound and when a texture image is defined (such as glClear).  This
fixes the case where we don't have a complete texture object yet.
2008-07-02 19:11:49 -06:00
Brian Paul
dad8a7c90d gallium: fix a bug in vertex program output mapping
Need to translate VERT_RESULT_PSIZ, BFC0, BFC1 to TGSI shader output slots
after all other attributes have been handled.  This fixes a bug where
generic vertex program outputs (varying vars) could get mapped to the
same slot at point size or back-face colors.
2008-07-02 19:07:11 -06:00
Brian Paul
8fb4d602db gallium: nr_attrs was off by one, updated comments, minor code movement 2008-07-02 19:05:18 -06:00
Brian Paul
39b9b05313 mesa: additional GLSL built-in constants 2008-07-02 17:10:42 -06:00
Brian Paul
dff477a5e2 mesa: when linking a shader program, make sure all the shaders compiled OK
cherry-picked from master
2008-07-02 17:08:47 -06:00
Brian Paul
40739d4ae9 mesa: added some debug code (disabled)
cherry-picked from master
2008-07-02 17:08:28 -06:00
Brian Paul
088c42c5c3 mesa: fix error codes in _mesa_shader_source(), _mesa_get_shader_source()
If the 'shader' parameter is wrong, need to either generate GL_INVALID_VALUE
or GL_INVALID_OPERATION.  It depends on whether 'shader' actually names a
'program' or is a totally unknown ID.
There might be other cases to fix...

cherry-picked from master
2008-07-02 17:08:09 -06:00
Brian Paul
16caeeab4b mesa: regenerated file 2008-07-02 17:06:26 -06:00
Brian Paul
adc709e996 mesa: added some missing equal() notEqual() intrinsics
cherry-picked from master
2008-07-02 17:05:56 -06:00
Brian Paul
8f98242d40 mesa: disable some debug assertions
We can sometimes fail these assertions because of how swizzled storage
works.  Will revisit someday.
2008-07-02 12:47:18 -06:00
Brian Paul
eab88236b3 mesa: regenerated files 2008-07-02 12:46:18 -06:00
Brian Paul
789fae163d mesa: fix all(bvec2) function typo, add missing bvec2/3/4() constuctors
cherry-picked from master
2008-07-02 12:45:55 -06:00
Brian Paul
019ad5e284 gallium: replace 128 with MAX_LABELS 2008-07-02 12:41:39 -06:00
Brian Paul
511733b862 mesa: added _mesa_print_swizzle() debugging helper 2008-07-02 12:41:39 -06:00
Roland Scheidegger
489fc4d10a mesa: fix issues around multisample enable
multisample enable is enabled by default, however gl mandates multisample
rendering rules only apply if there's also a multisampled buffer.
2008-07-02 20:22:08 +02:00
Michel Dänzer
cc31eecbcb gallium: Allow draw module to work on non-x86 platforms again. 2008-07-02 12:10:15 +02:00
José Fonseca
d16fcd07f8 pipebuffer: Debug buffer manager to detect buffer under- and overflows.
It should detect both cpu and gpu buffer overflows.
2008-07-02 12:29:07 +09:00
José Fonseca
ea4ca10b1b pipebuffer: Verify usage flag consistency. Minor cleanups. 2008-07-02 12:29:07 +09:00
Brian Paul
66b48202c2 mesa: fix a GLSL vector subscript/writemask bug
This fixes a failure for cases like:
   vec4 v;
   v[1] *= 2.0;

The v[1] actually acts like a writemask, equivalent to v.y
The fix is a bit convoluted, but will do for now.

cherry-picked from master
2008-07-01 18:40:23 -06:00
Brian Paul
eeefe175de mesa: move some functions
cherry-picked from master
2008-07-01 18:39:46 -06:00
Brian Paul
81a0acca31 mesa: make _slang_swizzle_swizzle() non-private
cherry-picked from master
2008-07-01 18:39:22 -06:00
Brian Paul
44c99ad236 mesa: better function inlining in the presence of 'return' statements
Before, the presence of a 'return' statement always prevented inlining
a function.  This was because we didn't want to accidentally return from
the _calling_ function.  We still need the semantic of 'return' when inlining
but we can't always use unconditional branches/jumps (GPUs don't always
support arbitrary branching).

Now, we allow inlining functions w/ return if the return is the last
statement in the function.  This fixes the common case of a function
that returns a value, such as:

vec4 square(const in vec4 x)
{
   return x * x;
}

which effectively compiles into:

vec4 square(const in vec4 x)
{
   __retVal = x * x;
   return;
}

The 'return' can be no-op'd now and we can inline the function.

cherry-picked from master
2008-07-01 11:48:57 -06:00
Brian Paul
7d4f01413f mesa: add/fix some IrInfo entries for debugging purposes
cherry-picked from master
2008-07-01 11:48:27 -06:00
Jakob Bornecrantz
e99ce4af8a i915: Last reference to surface -> pitch 2008-07-01 15:52:37 +02:00
José Fonseca
b3da2a9524 gallium: Use the inline keyword on C++. 2008-07-01 22:04:58 +09:00
José Fonseca
846f87d826 scons: Output mapfile on windows ddk profile builds. 2008-07-01 22:04:01 +09:00
José Fonseca
810888f656 gles: Don't define GLAPIENTRY here. 2008-06-30 12:49:32 +09:00
Brian Paul
9d94d133b0 mesa: added null ptr checks 2008-06-28 16:47:39 -06:00
Brian Paul
2242769a13 s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv() 2008-06-28 16:47:22 -06:00
Brian Paul
a1ec6efce0 mesa: check FEATURE_point_size_array 2008-06-28 16:15:03 -06:00
Brian Paul
d4b100a6a1 egl: set config's EGL_CONFORMANT, EGL_RENDERABLE_TYPE, EGL_SURFACE_TYPE attributes 2008-06-28 16:04:01 -06:00
Brian Paul
8f91a83669 egl: fix default value of EGL_SURFACE_TYPE, added some sanity check assertions 2008-06-28 16:03:28 -06:00
José Fonseca
0f9a1e43bc egl: WinCE doesn't have sys/types.h 2008-06-28 20:40:44 +09:00
Zack Rusin
a7499b7fc7 egl: helps if the stride is right 2008-06-27 16:47:22 -04:00
Zack Rusin
838b0d6e48 eh, we need a buildbot... fix the compilation 2008-06-27 15:56:09 -04:00
Roland Scheidegger
429a08384c gallium: handle msaa 2008-06-27 16:10:16 +02:00
Robert Ellison
a1fb565ea7 egl: These changes allow an eglBindAPI(EGL_OPENGL_ES_API) to succeed, and to work correctly with GLES1 and GLES2.
- egl_xdri.c just sets the EGL_OPENGL_ES_BIT as well as the
  EGL_OPENGL_BIT in ClientAPIsMask

- eglconfig.c allows the renderable type to include EGL_OPENGL_ES2_BIT
  as well as EGL_OPENGL_ES_BIT.

- egl_xlib.c sets the EGL_NATIVE_RENDERABLE attribute to EGL_FALSE for
  all softpipe configurations.  (Otherwise, an eglChooseConfig() that
  looks for particular values of EGL_NATIVE_RENDERABLE will fail.)
2008-06-27 07:17:02 -06:00
Jonathan White
b028b0cc53 egl: Windows updates to the platform.h files 2008-06-27 07:13:58 -06:00
Jakob Bornecrantz
5b9d823545 i915: Fix the last of the stride/pitch changes 2008-06-27 14:33:02 +02:00
José Fonseca
fb95b603ef mesa: Replace void * arithmetic. 2008-06-27 20:56:49 +09:00
José Fonseca
4f45dbc6aa gdi: Update for cpp removal. 2008-06-27 20:56:29 +09:00
José Fonseca
891469a3a5 cell: Update for cpp removal.
Not tested -- just mymic the softpipe changes.
2008-06-27 20:10:04 +09:00
José Fonseca
4ddd659679 gallium: Drop pipe_texture->cpp and pipe_surface->cpp.
The chars-per-pixel concept falls apart with compressed and yuv images,
where more than one pixel are coded in a single data block.
2008-06-27 19:37:56 +09:00
José Fonseca
05cfb4c4b8 scons: Get x86-64<->x86 cross build of assembly files right. 2008-06-27 13:41:23 +09:00
José Fonseca
6106db4c5d scons: Fix i965/xlib build. 2008-06-27 13:01:37 +09:00
José Fonseca
fb4361a93d scons: Fix typo. 2008-06-27 12:35:18 +09:00
José Fonseca
cb09d1ef60 mesa: Use the appropriate relocation.
I don't fully understand this, but this matches the assembly code gcc
generates glapi.c and fixes following error on x86-64 with assembly:

  relocation R_X86_64_PC32 against `_gl_DispatchTSD' can not be used when making a shared object
2008-06-27 12:34:57 +09:00
José Fonseca
38d779a3e6 gallium: Describe pixel block.
Chars-per-pixel paradigm is not enough to represent compressed and yuv
pixel formats.
2008-06-26 23:39:13 +09:00