| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were misinterpretting GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS previously.
It's the number of texture units for which we need to keep state; not
just the total number of texture units addressable by the vertex shader
plus fragment shader.
Since sw Mesa independently supports 16 texture units in vertex shaders
and 16 texture units in fragment shaders, the max combined units is 32.
Note that the docs for glActiveTexture() indicate the max legal unit is
MAX(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_COORDS) - 1.
A new piglit test (texunits.c) tests the various texture unit limits.
I'm pretty sure I've got this all right now, but additional reviews
are welcome...
|
| |
|
| |
|
| |
|
|
|
|
| |
Plus add code for verbose/debugging.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile
configs/default
docs/relnotes.html
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/mesa/main/version.h
|
| |
| |
| |
| | |
See bug 24217.
|
|/
|
|
|
| |
As shown in mfeatures.h, this allows users of colortab.h to work
without knowing if the feature is available.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current texture for any particular texture unit is given an additional
reference in update_texture_state(); but if the context is closed before
that texture can be released (which is quite frequent in normal use, unless
a program unbinds and deletes the texture and renders without it to force
a call to update_texture_state(), the memory is lost.
This affects general Mesa; but the i965 is particularly affected because
it allocates a considerable amount of additional memory for each allocated
texture.
|
|
|
|
|
|
|
|
|
|
|
| |
two)
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders. For fixed function, the texture
unit is truly disabled/ignored.
Fixes glean fbo test regression.
|
|
|
|
|
|
| |
This reverts commit a0edbfb28fb2e670c657d52190a7e8b1ccf4f46e.
This patch didn't completely fix the problem. The next patch will.
|
|
|
|
|
|
|
|
| |
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders.
Fixes glean fbo test regression.
|
|
|
|
|
|
|
|
| |
The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture. The fallback texture returning
(0,0,0,1) should only be used with shaders.
Fixes glean fbo test regression.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1). Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.
Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces. If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).
Todo: create a fallback texture for each type of texture target?
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
add new entrypoints, new texture format, etc
translate in texenvprogram.c for drivers using the mesa-generated tex env
fragment program
also handled in swrast, but not tested (cannot work due to negative texel
results not handled correctly)
|
|
|
|
| |
It was only used in one place in swrast.
|
|
|
|
| |
Another conditional can be avoided.
|
|
|
|
|
|
|
| |
Need to clear the _ReallyEnabled field before possibly continuing the loop.
Also, set _Current pointer to NULL if the unit is no longer enabled.
Fixes piglit lodbias regression
|
|
|
|
| |
Fixes piglit copytexsubimage regression.
|
|
|
|
|
| |
This field should not include vertex textures. It indicates the coord
inputs for fragment / fixed-function processing.
|
|
|
|
| |
We can avoid a few iterations this way.
|
| |
|
| |
|
|
|
|
| |
This trims down and cleans up imports.h and glheader.h quite a bit.
|
| |
|
|
|
|
| |
Just copy the whole struct.
|
| |
|
|
|
|
|
| |
Plus, put them in the order of highest to lowest priority to simplify
the texture_override() loop.
|
|
|
|
| |
Use loops to consolidate lots of texture object code.
|
|
|
|
|
| |
Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX].
The same should be done with the Current1D/2D/3D/etc pointers...
|
|
|
|
| |
New gl_texgen struct allows quite a bit of code reduction.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
If we had a vertex shader but no fragment shader (i.e. fixed function) we
didn't get the right enabled texture targets.
Fixes blank/white texture problem.
|
|
|
|
| |
Everyone should be using the newer/better ARB versions of these extensions.
|
| |
|
|
|
|
| |
See bug #17895. These assertions could be removed when this is resolved.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The max texture coord units is still 8. All the fixed-function paths are
still limited to 8 too. But GLSL shaders can use more samplers now.
Note that some texcoord-related data structures are declared to be 16
elements in size rather than 8. This just simplifies the code in a few
places; the extra elements aren't accessible to the user.
These changes haven't been extensively tested yet, but sanity checking has
been done.
It should be possible to increase the max image units/samplers to 32 without
doing anything special. Beyond that we'll need longer bitfields in a few
places.
|
| |
|
| |
|
|
|
|
| |
(cherry picked from commit 7ecac78ab53016ae3db3dd601b187cb050037463)
|
|
|
|
| |
(cherry picked from commit 27049189d6221fefe43eb55846efaa51742dcdf4)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, check the FEATURE flags in many places.
(cherry picked from commit 40d1a40f294f1ed2dacfad6f5498322fc08cc2d1)
Conflicts:
src/mesa/main/config.h
src/mesa/main/context.c
src/mesa/main/texobj.c
src/mesa/main/texstate.c
src/mesa/main/texstore.c
|