summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* glcpp: Refresh autogenerated lexer and parser files.Ian Romanick2011-01-101-184/+181
| | | | For the previous commit.
* glcpp: Generate an error for division by zeroIan Romanick2011-01-101-1/+6
| | | | | | | | | | | | | | | | | | | | When GCC encounters a division by zero in a preprocessor directive, it generates an error. Since the GLSL spec says that the GLSL preprocessor behaves like the C preprocessor, we should generate that same error. It's worth noting that I cannot find any text in the C99 spec that says this should be an error. The only text that I can find is line 5 on page 82 (section 6.5.5 Multiplicative Opertors), which says, "The result of the / operator is the quotient from the division of the first operand by the second; the result of the % operator is the remainder. In both operations, if the value of the second operand is zero, the behavior is undefined." Fixes 093-divide-by-zero.c test and bugzilla #32831. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* glcpp: Regenerate glcpp-parse.cChad Versace2011-01-101-0/+21
|
* glcpp: Fix segfault when validating macro redefinitionsChad Versace2011-01-101-0/+21
| | | | | | | | In _token_list_equal_ignoring_space(token_list_t*, token_list_t*), add a guard that prevents dereferncing a null token list. This fixes test src/glsl/glcpp/tests/092-redefine-macro-error-2.c and Bugzilla #32695.
* i965: Use a new miptree to avoid software fallbacks due to drawing offset.Eric Anholt2011-01-102-40/+67
| | | | | | | | | When attaching a small mipmap level to an FBO, the original gen4 didn't have the bits to support rendering to it. Instead of falling back, just blit it to a new little miptree just for it, and let it get revalidated into the stack later just like any other new teximage. Bug #30365.
* intel: Drop the speculatively-use-firstImage-mt in validation.Eric Anholt2011-01-101-17/+0
| | | | | It's been replaced by just setting texObj->mt to image->mt at TexImage time.
* intel: Don't relayout the texture on maxlevel change.Eric Anholt2011-01-101-7/+6
| | | | | | | This avoids relayouts in the common case of glGenerateMipmap() or people doing similar things. Bug #30366.
* intel: When making a new teximage miptree, make a full one.Eric Anholt2011-01-101-79/+68
| | | | | | | | If we hit this path, we're level 1+ and the base level got allocated as a single level instead of a full tree (so we don't match intelObj->mt). This tries to recover from that so that we end up with 2 allocations and 1 validation blit (old -> new) instead of allocations equal to number of levels and levels - 1 blits.
* meta: Don't tweak BaseLevel when doing glGenerateMipmap().Eric Anholt2011-01-101-4/+1
| | | | | | | We don't need to worry about levels other than MaxLevel because we're minifying -- the lower levels (higher detail) won't contribute to the result. By changing BaseLevel, we forced hardware that doesn't support BaseLevel != 0 to relayout the texture object.
* Revert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."Eric Anholt2011-01-1010-82/+152
| | | | | | | | | | | This reverts commit 7ce6517f3ac41bf770ab39aba4509d4f535ef663. This reverts commit d60145d06d999c5c76000499e6fa9351e11d17fa. I was wrong about which generations supported baselevel adjustment -- it's just gen4, nothing earlier. This meant that i915 would have never used the mag filter when baselevel != 0. Not a severe bug, but not an intentional regression. I think we can fix the performance issue another way.
* i965: Add #defines for HiZ and separate stencil buffer commands.Kenneth Graunke2011-01-101-0/+3
|
* i965: Add new HiZ related bits to WM_STATE.Kenneth Graunke2011-01-101-1/+8
|
* i965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D.Kenneth Graunke2011-01-103-22/+22
| | | | Again, this makes it match the documentation.
* i965: Remove unused #defines which only contain the sub-opcode.Kenneth Graunke2011-01-101-22/+0
| | | | | | | | | Most _3DSTATE defines contain the command type, sub-type, opcode, and sub-opcode (i.e. 0x7905). These, however, contain only the sub-opcode (i.e. 0x05). Since they are inconsistent with the rest of the code and nothing uses them, simply delete them. The _3DOP and _3DCONTROL defines seemed similar, and were also unused.
* glsl: At link-time, check that globals have matching centroid qualifiersChad Versace2011-01-101-0/+6
| | | | Fixes bug 31923: http://bugs.freedesktop.org/show_bug.cgi?id=31923
* mesa/swrast: handle sRGB FBOs correctly (v2)Dave Airlie2011-01-115-16/+33
| | | | | | | | | | | | | | | | From reading EXT_texture_sRGB and EXT_framebuffer_sRGB and interactions with FBO I've found that swrast is converting the sRGB values to linear for blending when an sRGB texture is bound as an FBO. According to the spec and further explained in the framebuffer_sRGB spec this behaviour is not required unless the GL_FRAMEBUFFER_SRGB is enabled and the Visual/config exposes GL_FRAMEBUFFER_SRGB_CAPABLE_EXT. This patch fixes swrast to use a separate Fetch call for FBOs bound to SRGB and avoid the conversions. v2: export _mesa_get_texture_dimensions as per Brian's comments. Signed-off-by: Dave Airlie <[email protected]>
* Export TLS support in gl.pc.Tom Fogal2011-01-102-0/+2
|
* r300g: add debug option for buffer upload loggingMarek Olšák2011-01-103-0/+9
|
* st/egl: Fix a void pointer arithmetic warning.Chia-I Wu2011-01-101-1/+1
|
* mesa: Remove GLES overlay.Chia-I Wu2011-01-105-127/+4
| | | | | | | With core mesa doing runtime API checks, GLES overlay is no longer needed. Make --enable-gles-overlay equivalent to --enable-gles[12]. There may still be places where compile-time checks are done. They could be fixed case by case.
* egl: Make egl_dri2 and egl_glx built-in drivers.Chia-I Wu2011-01-109-99/+106
| | | | | These two drivers are small in size. Making them built-in should simplify packaging.
* egl_glx: Load libGL dynamically.Chia-I Wu2011-01-102-107/+238
| | | | | | This is a step forward for compatibility with really old GLX. But the real reason for making this change now is so that we can make egl_glx a built-in driver without having to link to libGL.
* egl_dri2: Look up _glapi_get_proc_address dynamically.Chia-I Wu2011-01-102-16/+46
| | | | | | | | | In preparation for making egl_dri2 built-in. It also handles symbol lookup error: /usr/local/lib/egl/egl_dri2.so: undefined symbol: _glapi_get_proc_address more gracefully.
* r600: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-092-0/+2
|
* r300: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-092-0/+2
|
* r200: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-092-0/+2
|
* noop: make noop useable like trace or rbugJerome Glisse2011-01-095-50/+90
| | | | | | | | If you want to enable noop set GALLIUM_NOOP=1 as an env variable. You need first to enable noop wrapping for your driver see change to src/gallium/targets/dri-r600/ in this commit as an example. Signed-off-by: Jerome Glisse <[email protected]>
* r300g: do not upload the same user buffer several timesMarek Olšák2011-01-091-1/+3
| | | | Performance++.
* nvc0: implement queriesChristoph Bumiller2011-01-0910-23/+432
|
* dri2: release texture image.Juan Zhao2011-01-092-4/+46
| | | | | | Add release function for texture_from_pixmap extension. Some platform need to release texture image for texture_from_pixmap extension, add this interface for those platforms.
* radeon: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-095-0/+5
|
* dri/nouveau: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-092-0/+3
|
* intel: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-096-0/+7
|
* vbo: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-099-0/+9
|
* st/mesa: Include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-0926-0/+26
|
* mesa: Include mfeatures.h in program.c.Vinson Lee2011-01-091-0/+1
| | | | Include mfeatures.h for feature tests.
* i965g: fix warningsDave Airlie2011-01-092-2/+1
|
* i965g: update intel_decode from upstream.Dave Airlie2011-01-094-137/+432
|
* i965g: update disassembler code from classic.Dave Airlie2011-01-099-36/+97
| | | | still a bit of work to do, the winsys gen setting is a bit of a hack.
* i965g: update brw_defines.h from classic driverDave Airlie2011-01-093-37/+397
|
* i965g: update brw_structs.h from classic driver.Dave Airlie2011-01-093-88/+288
|
* i965g: update to similiar gen stuff as i965Dave Airlie2011-01-0933-151/+173
|
* r300g: fix crash when flushing ZMASKMarek Olšák2011-01-095-92/+81
| | | | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=32912 The fix is to call update_derived_state before user buffer uploads. I've also moved some code around. Unfortunately, there are still some ZMASK-related bugs which cause misrendering, i.e. flushing doesn't always work and glean/fbo fails.
* targets/egl: add libnvc0.a to nouveau libsMarcin Slusarz2011-01-091-0/+1
|
* nvfx,nv50: pipe_reference the constant buffersChristoph Bumiller2011-01-082-6/+5
|
* nvc0: fix primitive restart in immediate modeChristoph Bumiller2011-01-082-9/+18
|
* mesa: Clean up header file inclusion in cpuinfo.c.Vinson Lee2011-01-081-1/+1
|
* r300g: fix a surface leak when flushing ZMASKMarek Olšák2011-01-081-0/+1
|
* r300g: rework command submission and resource space checkingMarek Olšák2011-01-0813-260/+505
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation behind this rework is to get some speed by reducing CPU overhead. The performance increase depends on many factors, but it's measurable (I think it's about 10% increase in Torcs). This commit replaces libdrm's radeon_cs_gem with our own implemention. It's optimized specifically for r300g, but r600g could use it as well. Reloc writes and space checking are faster and simpler than their counterparts in libdrm (the time complexity of all the functions is O(1) in nearly all scenarios, thanks to hashing). (libdrm's radeon_bo_gem is still being used in the driver.) It works like this: cs_add_reloc(cs, buf, read_domain, write_domain) adds a new relocation and also adds the size of 'buf' to the used_gart and used_vram winsys variables based on the domains, which are simply or'd for the accounting purposes. The adding is skipped if the reloc is already present in the list, but it accounts any newly-referenced domains. cs_validate is then called, which just checks: used_vram/gart < vram/gart_size * 0.8 The 0.8 number allows for some memory fragmentation. If the validation fails, the pipe driver flushes CS and tries do the validation again, i.e. it validates only that one operation. If it fails again, it drops the operation on the floor and prints some nasty message to stderr. cs_write_reloc(cs, buf) just writes a reloc that has been added using cs_add_reloc. The read_domain and write_domain parameters have been removed, because we already specify them in cs_add_reloc. The space checking has been tested by putting small values in vram/gart_size variables.
* intel: Make renderbuffer tiling choice match texture tiling choice.Eric Anholt2011-01-071-4/+9
| | | | | | There really shouldn't be any difference between the two for us. Fixes a bug where Z16 renderbuffers would be untiled on gen6, likely leading to hangs.