summaryrefslogtreecommitdiff
path: root/src/mesa
AgeCommit message (Collapse)Author
2009-09-23st/mesa: trim calculated userbuffer sizeKeith Whitwell
In get_array_bounds we were previously defining a user buffer sized as (nr_vertices * stride). The trouble is that if the vertex data occupies less than stride bytes, the extra tailing (stride - size) bytes may extend outside the memory actually allocated by the app and caused a segfault. To fix this, define a the buffer bounds to be: ptr .. ptr + (nr-1)*stride + element_size
2009-09-22mesa: fix error message textBrian Paul
2009-09-21intel: Mark the FBO as incomplete if there's no intel_renderbuffer for it.Eric Anholt
This happens to rendering with textures with a border, which had resulted in a segfault on dereferencing the irb. (cherry-picked from commit 8bba183b9eeb162661a287bf2e118c6dd419dd24)
2009-09-21swrast: fix cube face selectionBrian Paul
If arx and ary are equal, we still want to choose from one of them, and not arz. This is the same as Michal's softpipe fix.
2009-09-21intel: Fix crash in intel_flush().Michel Dänzer
Since commit 2921a2555d0a76fa649b23c31e3264bbc78b2ff5 ('intel: Deassociated drawables from private context struct in intelUnbindContext'), intel->driDrawable may be NULL in intel_flush().
2009-09-20mesa/st: Initialize format bits of framebuffer renderbuffersNicolai Hähnle
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-16st/mesa: fix some incorrect branching/clean-up code in TexImage functionsBrian Paul
We need to be sure to call the _mesa_unmap_teximage_pbo() function if we called _mesa_validate_pbo_teximage().
2009-09-16st/mesa: fix texture memory allocation bugBrian Paul
The following example caused an incorrect GL_OUT_OF_MEMORY error to be raised in glTexSubImage2D: glTexImage2D(level=0, width=32, height=32, pixels=NULL); glTexImage2D(level=0, width=64, height=64, pixels=NULL); glTexSubImage2D(level=0, pixels!=NULL); The second glTexImage2D() call needs to cause the first image to be deallocated then reallocated at the new size. This was not happening because we were testing for pixels==NULL too early.
2009-09-16intel: Deassociated drawables from private context struct in intelUnbindContextIan Romanick
The generic DRI infrastructure makes sure that __DRIcontextRec::driDrawablePriv and __DRIcontextRec::driReadablePriv are set to NULL after unbinding a context. However, the intel_context structure keeps cached copies of these pointers. If these cached pointers are not NULLed and the drawable is actually destroyed after unbinding the context (typically by way of glXDestroyWindow), freed memory will be dereferenced in intelDestroyContext. This should fix bug #23418.
2009-09-15mesa: compile glUniformMatrix() functions into display listsBrian Paul
I believe this is the last of the shader-related functions that needed display list treatment.
2009-09-15mesa: implement more glUniform display list functionsBrian Paul
2009-09-15mesa: compile glUniform4f() into display listsBrian Paul
Note: there are more glUniform functions to compile...
2009-09-15mesa: compile glUseProgram/glUseProgramObjectARB into display listsBrian Paul
Fixes bug 23746
2009-09-14glsl: added some link debug code (disabled)Brian Paul
2009-09-14glsl: remove extra #version directives from concatenated shader sourcesBrian Paul
When we concatenate shaders to do our form of poor-man linking, if there's multiple #version directives, preprocessing fails. This change disables the extra #version directives by changing the first two chars to //. This should help with some Wine issues such as bug 23946.
2009-09-11mesa: raise GL_INVALID_ENUM not GL_INVALID_VALUE for glTexParamter errorsVinson Lee
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-09-10intel: add B43 chipset supportZhenyu Wang
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Hopefully this will be one of the last cherry-picks. (cherry picked from commit ca246dd186f9590f6d67038832faceb522138c20)
2009-09-08mesa: bump version to 7.5.2Brian Paul
I'm not 100% sure there'll be a 7.5.2 release, but just in case.
2009-09-08i965: fix incorrect test for vertex position attributeBrian Paul
2009-09-04i965: Fix warnings in intel_pixel_read.c.Eric Anholt
(cherry picked from commit c80ce5ac90b1e0ac7a72cd41c314aa2000bfecf5)
2009-09-04intel: Also get the DRI2 front buffer when doing front buffer reading.Eric Anholt
(cherry picked from commit df70d3049a396af3601d2a1747770635a74120bb)
2009-09-04intel: Update Mesa state before span setup in glReadPixels.Eric Anholt
We could have mapped the wrong set of draw buffers. Noticed while looking into a DRI2 glean ReadPixels issue. (cherry picked from commit afc981ee46791838f3cb83e11eb33938aa3efc83)
2009-09-04intel: Move intel_pixel_read.c to shared for use with i965.Eric Anholt
(cherry picked from commit dcfe0d66bfff9a55741aee298b7ffb051a48f0d3)
2009-09-04i965: Add missing state dependency of sf_unit on _NEW_BUFFERS.Eric Anholt
(cherry picked from commit 99174e7630676307f618c252755a20ba61ad9158)
2009-09-04intel: Align cubemap texture height to its padding requirements.Eric Anholt
(cherry picked from commit a70e1315846cd5e8d6f2b622821ff8262fe7179d) (cherry picked from commit 29e51c3872531366570d032147abad50f8a3c1af)
2009-09-04intel: Align untiled region height to 2 according to 965 docs.Eric Anholt
This may or may not be required pre-965, but it doesn't seem unlikely, and I'd rather be safe. (cherry picked from commit b053474378633249be0e9f24010650ffb816229a)
2009-09-04i965: Fix source depth reg setting for FSes reading and writing to depth.Eric Anholt
For some IZ setups, we'd forget to account for the source depth register being present, so we'd both read the wrong reg, and write output depth to the wrong reg. Bug #22603. (cherry picked from commit f44916414ecd2b888c8a680d56b7467ccdff6886)
2009-09-04i965: Respect CondSwizzle in OPCODE_IF.Eric Anholt
Fixes piglit glsl-vs-if-bool and progs/glsl/twoside, and will likely be useful for the looping code. Bug #18992 (cherry picked from commit 78c022acd0b37bf8b32f04313d76255255e769c1) (cherry picked from commit 63d7a2f53fb38e170f4e55f2b599e918edf2c512)
2009-09-04i965: asst clean-ups, etc in brw_vs_emit()Brian Paul
(cherry picked from commit fd7d764514c540987549c3ea88a2d669b0f0ea58)
2009-09-04i965: Emit conditional code updates as required for GLSL VS if statements.Eric Anholt
Previously, we'd be branching based on whatever condition code happened to be laying around. (cherry picked from commit 7007f8b352763af89805f287153cb7972bff0523)
2009-09-04i965: Spell "conditional" correctly.Eric Anholt
2009-09-04i965: Fix RECT shadow sampling by not losing the other texcoords.Eric Anholt
Bug #20821 (cherry picked from commit 191e028de20b2f954621b652aa77b06d0e93652a)
2009-09-04i965: Assert that the offset in the VBO is below the VBO size.Eric Anholt
This avoids sending a bad buffer address to the GPU due to programmer error, and is permitted by the ARB_vbo spec. Note that we still have the opportunity to dereference past the end of the GPU, because we aren't clipping to a correct _MaxElement, but that appears to be harder than it should be. This gets us the 90% solution. Bug #19911. (cherry picked from commit d7430d942f6c7950a92367aeb13b80cf76ccad78)
2009-09-04i965: Even if no VS inputs are set, still load some amount of URB as required.Eric Anholt
See comment on Vertex URB Entry Read Length for VS_STATE. This, combined with the previous three commits, fixes #22945. (cherry picked from commit e340d4f9866db4bae391288e83a630a310b0dd2b)
2009-09-04i965: Make sure the VS URB size is big enough to fit a VF VUE.Eric Anholt
This fix is just from code and docs inspection, but it may fix hangs on some applications. (cherry picked from commit e93848e595176ae0bad3bfe64e0ca63fd089bb72)
2009-09-04i965: Don't emit bad packets when no VBs are referenced.Eric Anholt
It appears that sometimes Mesa (and I suppose a VS could as well) emits a program which references no vertex data, and thus we end up with nr_enabled == 0 even though some VBs are enabled. We'd end up emitting VB/VE packet headers of 0xffffffff in that case, leading to GPU hangs. Bug #22945 (wine with an uncompiled VS) (cherry picked from commit d1fbfd0f962347e4153db3852292d44de5aea863)
2009-09-04i965: Calculate enabled[] and nr_enabled once and re-use the values.Eric Anholt
The code duplication bothered me. (cherry picked from commit 9b9cb30d128fc5f1ba77287696ecd508e640efde)
2009-09-04i965: Set the max index buffer address correctly according to the docs.Eric Anholt
It's the last addressable byte, not the byte after the end of the buffer. (cherry picked from commit b72dea5441e8e9226dabf1826fa3bc129c7bc281)
2009-09-04i965: rename var: s/tmp/vs_inputs/Brian Paul
(cherry picked from commit 840c09fc71542fdfc71edd2a2802925d467567bb)
2009-09-03st/mesa: silence uninitialized var warningsBrian Paul
2009-09-03st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted positionBrian Paul
If the renderbuffer orientation is Y=0=TOP we need to invert the dstY position.
2009-09-02st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardwareKeith Whitwell
State tracker currently backs GL_RGB textures with RGBA almost always. This means we need to maintain A==1 in these textures to give correct GL_RGB sampling results. This change offloads the RGBA->RGB copy to hardware using the new writemask version of u_blit_pixels. More src/dstLogical/dstActual triples could be shifted to hardware by this technique in future patches.
2009-08-31swrast: fix selection/feedback regressionBrian Paul
This fixes a conform selection/feedback regression introduced by commit 8f4d66c5f893b49eb3973aa3b31a856314c045c7
2009-08-31swrast: can't use deferred texture/shading if using KIL instructionBrian Paul
If the fragment program uses KIL, we have to execute it before z/stencil testing. Otherwise, deferred texture/shading lets us skip shading for pixels that fail z/stencil testing.
2009-08-31mesa: added const qualifiers, move local varBrian Paul
2009-08-31mesa: fix saturation logic in emit_texenv()Brian Paul
We need to clamp/saturate after each texenv stage, not just the last one. Fixes glean texEnv failure for softpipe (and probably other fragment program- based drivers).
2009-08-31mesa: fix 32bit cross compilation on a 64bit machineMarc Dietrich
When cross compiling on a 64bit machine, gen_matypes.c is build for the host machine (64bit) but must generates code for the target machine (32bit). This causes wrong offsets all over the place and crashes googleearth on my machine. Solution is to add -m32 when cross compiling. Attached patch is compatible with linux-x86-32 and autoconf based builds.
2009-08-27swrast: fix incorrect tri culling in selection/feedback mode.Brian Paul
See bug 16866.
2009-08-27mesa: direct program debug output to stderr instead of stdoutmarvin24
2009-08-26glsl: signal that the program needs to be re-translated when samplers changeBrian Paul