Commit graph

42391 commits

Author SHA1 Message Date
Marek Olšák
2a904fd6a0 st/mesa: set vertex arrays state only when necessary
The vertex arrays state should be set only when (_NEW_ARRAY | _NEW_PROGRAM)
is dirty. This assumes user buffer content is mutable, which will be
sorted out in the next commit. The following usage case should be much faster
now:

for (i = 0; i < 1000; i++) {
   glDrawElements(...);
}

Or even:

for (i = 0; i < 1000; i++) {
   glSomeStateChangeOtherThanArraysOrProgram(...);
   glDrawElements(...);
}

The performance increase from this may be significant in some apps and
negligible in others. It is especially noticable in the Torcs game (r300g):
    Before: 15.4 fps
    After: 20 fps

Also less looping over attribs in st_draw_vbo yields slight speed-up
in apps with lots of glDraw* calls.
2011-02-14 21:50:08 +01:00
Marek Olšák
cdca3c58aa gallium: remove pipe_vertex_buffer::max_index
This is redundant to pipe_draw_info::max_index and doesn't really fit
in the optimizations I plan.
2011-02-14 21:50:08 +01:00
Marek Olšák
d5062fb3a3 gallium: always save and restore vertex buffers using cso_cache 2011-02-14 21:50:07 +01:00
Marek Olšák
cfaf217135 vbo: bind arrays only when necessary
We don't need to call bind_arrays in the vbo module if the states
which the function depends on are not dirty.
2011-02-14 21:50:07 +01:00
Marek Olšák
5a01361cea vbo: notify a driver that we change buffer offsets, strides, etc. 2011-02-14 21:50:07 +01:00
Vinson Lee
d123959ff7 r300g: Remove redundant initialization.
Remove redundant initialization from commit
3b01b52bd7 noticed by tstellar.
2011-02-14 10:47:58 -08:00
Alex Deucher
9e96ea0652 r600g: add alignment cases for linear aligned
Matches the drm and ddx.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-14 13:07:29 -05:00
José Fonseca
07eb660fc9 draw: Don't define the last two mipmap levels in aa lines.
Some hardware needs to make a seperate copy of all levels to obey
max_lod, so simply do not define the last two levels instead of
clamping.
2011-02-14 10:56:48 +00:00
José Fonseca
9305e93114 svga: Set the appropriate flags when creating sampler/surface views. 2011-02-14 10:53:54 +00:00
Marek Olšák
a0c293ec11 r300g: put indices in CS if there's just a few of them and are in user memory 2011-02-14 11:43:14 +01:00
Marek Olšák
437583ea63 r300g: cleanup the draw functions 2011-02-14 11:43:14 +01:00
Marek Olšák
476cec37d6 r300g: do not create a user buffer struct for misaligned ushort indices fallback 2011-02-14 11:43:14 +01:00
Marek Olšák
d173f1ba8a r300g: fix fallback for misaligned ushort indices with num vertices >= 65535 2011-02-14 11:43:14 +01:00
Marek Olšák
3d5ac32f3b r300g: consolidate emission of common draw regs 2011-02-14 11:43:14 +01:00
Sedat Dilek
0f912534fd docs: Fix typo in GL3.txt 2011-02-14 00:45:44 -08:00
Vinson Lee
3b01b52bd7 r300g: Move declaration before code.
Fixes SCons build.
2011-02-14 00:07:07 -08:00
Marek Olšák
e9d993e9b9 r600g: do not destroy the original index buffer when translating indices
Because we only translate a subrange of the buffer.
2011-02-14 07:45:14 +01:00
Marek Olšák
5a6ba08c21 r300g: emit 3D_LOAD_VBPNTR only when necessary
I thought I couldn't skip emitting this packet in some cases.
Well it looks like I can.
2011-02-14 07:45:14 +01:00
Marek Olšák
004dd01583 r300g: fix reference counting when translating indices 2011-02-14 07:45:14 +01:00
Marek Olšák
9a90eeee67 u_index_modify: map buffers with PIPE_TRANSFER_UNSYNCHRONIZED 2011-02-14 07:45:14 +01:00
Marek Olšák
5197b09bee r300g: remove the relocation after AARESOLVE_PITCH 2011-02-14 07:45:14 +01:00
Dave Airlie
1f5b674168 egl_dri2: add nouveau support.
but really wtf? all these PCI IDs need to be ripped out of here, its totally
unscalable and the drivers already have this info so could export it some better way.

tested by Darxus on #wayland.
2011-02-14 07:54:28 +10:00
Marcin Slusarz
8fe5da89e3 nv50: fix query assertion 2011-02-13 22:05:28 +01:00
Marek Olšák
e6e4860555 r300g: correctly determine if a texture is blittable in texture_get_transfer 2011-02-13 08:49:15 +01:00
Marek Olšák
8ab1fcc66a r300g: fixup the handle_compare function
Accidentally negated in 685c3262b9.
2011-02-13 00:31:04 +01:00
Marek Olšák
1fd6bbc881 r300g: when printing shader linker errors to stderr, report it's not a bug 2011-02-12 23:38:00 +01:00
Marek Olšák
9ad9a6861a r300g: add debug options nozmask and nohiz which disable some hyper-z features 2011-02-12 23:37:14 +01:00
Marek Olšák
685c3262b9 r300g: typecast void* to unsigned correctly 2011-02-12 23:36:48 +01:00
Eric Anholt
04521c158f dri: Remove the old metaops code which has been superceded by ../common/ 2011-02-12 12:26:04 -08:00
Eric Anholt
211725eccd radeon: Remove setup of the old dri/ meta code, which is now unused. 2011-02-12 12:23:43 -08:00
Eric Anholt
47589c17b0 intel: Remove setup of the old dri/ meta code, which is now unused. 2011-02-12 12:23:20 -08:00
Dave Airlie
a6b7393eb8 update GL3.txt for GL_EXT_framebuffer_sRGB status 2011-02-12 18:08:04 +10:00
Tom Stellard
9106b98766 r300/compiler: Don't erase sources when converting RGB->Alpha
https://bugs.freedesktop.org/show_bug.cgi?id=34030

NOTE: This is a candidate for the 7.10 branch.
2011-02-11 19:42:35 -08:00
Christopher James Halse Rogers
d1e28b2267 mesa: Optionally build a dricore support library (v3)
This an adds --enable-shared-dricore option to configure.  When enabled,
DRI modules will link against a shared copy of the common mesa routines
rather than statically linking these.

This saves about 30MB on disc with a full complement of classic DRI
drivers.

v2: Only enable with a gcc-compatible compiler that handles rpath
    Handle DRI_CFLAGS without filter-out magic
    Build shared libraries with the full mklib voodoo
    Fix typos
v3: Resolve conflicts with talloc removal patches

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2011-02-11 18:31:05 -08:00
nobled
b5dc40710d glx: Put null check before use
'dpy' was being checked for null *after* it was already used once.

Also add a null check for psc, and drop gc's redundant initialization.
2011-02-11 18:19:10 -08:00
Marek Olšák
df54b53b7d r300g: improve function radeon_bo_is_referenced_by_cs
This should prevent calling into radeon_get_reloc when there's
only one context.
2011-02-12 03:08:39 +01:00
Marek Olšák
20a78b68a3 u_vbuf_mgr: fix segfault
max_index could have been less than min_index, which later caused integer
underflow followed by a segfault in memcpy.
2011-02-12 03:08:39 +01:00
Ian Romanick
3803295fc2 ir_to_mesa: Don't dereference a NULL pointer during copy propagation
The ACP may already be NULL, so don't try to make it NULL again.

This should fix bugzilla #34119.
2011-02-11 15:44:19 -08:00
Ian Romanick
a0120e6e0f glcpp: regerated files
These should have been committed right after fd1252ab, but they were
missed.  Soon, we'll never have to do this again...
2011-02-11 15:44:19 -08:00
Ian Romanick
afdceede55 glsl: Regenerate files modified by previous commits 2011-02-11 14:12:44 -08:00
Ian Romanick
8842158944 glsl: Finish out the reduce/reduce error fixes
Track variables, functions, and types during parsing.  Use this
information in the lexer to return the currect "type" for identifiers.

Change the handling of structure constructors.  They will now show up
in the AST as constructors (instead of plain function calls).

Fixes piglit tests constructor-18.vert, constructor-19.vert, and
constructor-20.vert.  Also fixes bugzilla #29926.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-11 14:12:43 -08:00
Keith Packard
f4b812e1a6 glsl: Eliminate reduce/reduce conflicts in glsl grammar
This requires lexical disambiguation between variable and type
identifiers (as most C compilers do).

Signed-off-by: Keith Packard <keithp@keithp.com>

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-11 14:12:43 -08:00
Benjamin Franzke
81affb8f4c st/mesa: Fix surfaceless opengl with non-dummy contexts
main/context.c:check_complatible() detecs an incomplete
framebuffer using its pointer, so do not copy it.

This should fix https://bugs.freedesktop.org/show_bug.cgi?id=34042
2011-02-11 16:54:04 -05:00
Brian Paul
6c3a82a1a3 svga: disable a debug_printf() call 2011-02-11 14:07:43 -07:00
Brian Paul
396da5df0e svga: comments and debug code 2011-02-11 14:02:30 -07:00
Brian Paul
f7d84c177f svga: more comments for need_pipeline field 2011-02-11 14:02:30 -07:00
José Fonseca
6826d58bbf scons: Need c99 also when cross compiling. 2011-02-11 20:09:26 +00:00
José Fonseca
982609f4cf scons: builtin_glsl_function on windows needs bundled getopt. 2011-02-11 20:09:26 +00:00
José Fonseca
ae760279f1 scons: Try to support building 64bit binaries on 32bit windows. 2011-02-11 20:09:26 +00:00
José Fonseca
051f8bbfee scons: Fix MSVC 64bit build. 2011-02-11 20:09:26 +00:00