summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.Kenneth Graunke2012-08-172-1/+130
| | | | | | | | | | | | | | | | | | | | | The OpenGL 3.1 specification explicitly allows this. Oddly, the ARB_texture_buffer_object spec's issues section claims this isn't allowed, but proceeds to explain that the extension simply doesn't edit the underlying spec to allow it, and thus it didn't appear in the list of legal texture targets. Thus, this patch legalizes it only in 3.1+ contexts, but still returns INVALID_ENUM in earlier contexts that expose ARB_texture_buffer_object. Unfortunately, the behavior of the call is horrendously undefined. Fixes oglconform's tbo/negative.textureParams test. v2: Require desktop OpenGL. Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
* mesa: Split out part of glGetTexLevelParameter into a helper function.Kenneth Graunke2012-08-171-42/+52
| | | | | | | | | | Move the _mesa_GetTexLevelParameter[iv] functions below the helper function so the prototype is available. This will be useful in the next commit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2]Kenneth Graunke2012-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For cube maps, _mesa_generate_mipmap() calls this with GL_TEXTURE_CUBE_MAP (the gl_texture_object's Target) rather than one of the faces. This caused _mesa_max_texture_levels() to return 0, which resulted in maxLevels == -1 and the next line's assertion to fail. This function is called from seven places: - fbobject.c: framebuffer_texture() - mipmap.c: _mesa_generate_mipmap() - texgetimage.c: - getteximage_error_check() - getcompressedteximage_error_check() - texparam.c: _mesa_GetTexLevelParameteriv() - texstorage.c: tex_storage_error_check() All of these (or their callers) now explicitly check for invalid targets already, so this shouldn't cause invalid targets to slip through. (Technically _mesa_generate_mipmap() doesn't check for invalid targets, but the API-facing _mesa_GenerateMipmapEXT() function does.) +2 oglconforms (float-texture/mipmap.automatic and mipmap.manual) In addition to fixing the mipmap bug, it should also cause glTexStorage to accept GL_TEXTURE_CUBE_MAP, which is explicitly allowed by the spec. v2: Drop alterations to callers; this is now in a patch series that adds explicit checking to API functions. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add explicit target checking to GetTexLevelParameter[if]v().Kenneth Graunke2012-08-171-3/+38
| | | | | | | | | | | | | | Previously, it relied on _mesa_max_texture_levels() for texture target error checking. This was somewhat dodgy, as _mesa_max_texture_levels() is called in seven diferent places, not all of which necessarily accept the same list of targets. I copied the list of legal targets from _mesa_max_texture_levels(), so this patch should not introduce any change in behavior. Future patches will cause the two to diverge. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add explicit target checking to Get[Compressed]TexImage().Kenneth Graunke2012-08-171-10/+35
| | | | | | | | | | | | | | | | Previously, they relied on _mesa_max_texture_levels() for texture target error checking. This was somewhat dodgy, as _mesa_max_texture_levels() is called in seven diferent places, not all of which necessarily accept the same list of targets. I copied the list of legal targets from _mesa_max_texture_levels() but removed the proxy targets, as both functions explicitly rejected those targets. This changes the order in which we check errors, which could change whether we return INVALID_VALUE or INVALID_ENUM. However, it shouldn't change the list of accepted targets. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* llvmpipe: remove polygon stipple assertionBrian Paul2012-08-171-2/+0
| | | | | | | It's possible for us to have an unused sampler bound when the fragment shader itself doesn't use any samplers. So the assertion isn't valid. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53616
* svga: minor code reformattingBrian Paul2012-08-161-2/+3
| | | | To be consistent with other functions.
* build: Remove -shared from OSMesa's LDFLAGSMatt Turner2012-08-161-1/+1
| | | | Would break the static build.
* build: Remove EXTRA_LIB_PATHMatt Turner2012-08-163-3/+3
| | | | You can add extra library paths to LDFLAGS directly.
* r600g: disable tiling for 422 formats againMarek Olšák2012-08-161-0/+4
|
* r600g: fix blits of subsampled formatsMarek Olšák2012-08-161-20/+63
|
* r600g: fix copying between NPOT mipmapped compressed texturesMarek Olšák2012-08-161-2/+3
| | | | | | | | | We aligned the dimensions to the blocksize, then divided by it (in r600_blit.c), then minified, which was wrong. The minification must be done first, not last. This fixes piglit/fbo-generatemipmap-formats with S3TC and maybe a bunch of other tests too. Tested on RV730.
* r600g: make F2U trans-only on r600-r700Marek Olšák2012-08-161-1/+1
| | | | This fixes a failing assertion in r600_asm.c.
* r600g: set CB_COLOR_INFO to INVALID for disabled colorbuffers on r600-r700Marek Olšák2012-08-161-0/+3
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: rename r600_resource_texture to r600_textureMarek Olšák2012-08-169-48/+48
|
* r600g: always put tiled textures in VRAMMarek Olšák2012-08-161-1/+2
|
* r600g: cleanup r600_resource_texture in favor of radeon_surfaceMarek Olšák2012-08-165-29/+20
|
* r600g: remove unused parameter in r600_texture_create_objectMarek Olšák2012-08-161-3/+2
|
* r600g: fixup the usage flag for the flushed depth textureMarek Olšák2012-08-161-1/+1
|
* wayland-drm: close fd after the display is uninitializedPhilipp Brüschweiler2012-08-161-2/+3
| | | | | | | This fixes a "kernel rejected pushbuf: Bad file descriptor" error on wl_drm display destruction. Reviewed-by: Kristian Høgsberg <[email protected]>
* radeon/llvm: Lower implicit parameters before ISelTom Stellard2012-08-163-69/+42
|
* gallium/draw: move misplaced braceBrian Paul2012-08-161-1/+1
|
* mesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base imageBrian Paul2012-08-161-0/+2
| | | | | | | | | | | | This seems to be expected by the WebGL texture-mips test. The error makes sense, but I haven't found (yet) any OpenGL documentation specifying this error condition. See http://bugs.freedesktop.org/show_bug.cgi?id=44912 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* r600: update sampler, sampler_view code for the futureBrian Paul2012-08-164-19/+50
| | | | | | | For when we have pipe->set_sampler_states(pipe, shader, start, num, samplers), etc. Reviewed-by: Marek Olšák <[email protected]>
* rbug: update data structures, functions for future changesBrian Paul2012-08-163-76/+71
| | | | | To support geom/compute/etc shaders, samplers, sampler views, etc. To support pipe->bind_sampler_states() w/ start_slot.
* gallium/trace: add 'start' parameter to bind_sampler_states/views()Brian Paul2012-08-161-4/+14
|
* gallium/identity: add 'start' parameter to bind_sampler_states/views()Brian Paul2012-08-161-4/+12
|
* galahad: add 'start' parameter to bind_sampler_states/views()Brian Paul2012-08-161-41/+57
|
* svga: add 'start' parameter to bind_sampler_states/views()Brian Paul2012-08-161-24/+65
|
* llvmpipe: add 'start' parameter to bind_sampler_states/views()Brian Paul2012-08-161-22/+45
|
* softpipe: add 'start' parameter to bind_sampler_states/views()Brian Paul2012-08-161-25/+49
| | | | | To support updating a sub-range of sampler states/views in the future. Note that we always pass start=0 at this time.
* gallium/trace: consolidate sampler, sampler_view codeBrian Paul2012-08-161-50/+82
|
* gallium/identity: consolidate sampler, sampler_view codeBrian Paul2012-08-161-32/+54
| | | | This will simplify things when the pipe_context functions are consolidated.
* st/mesa: add support for GS textures and samplersBrian Paul2012-08-164-11/+39
|
* st/mesa: combine vertex/fragment sampler state in arraysBrian Paul2012-08-165-33/+26
| | | | | | As with other recent changes, put the vertex and fragment sampler state into arrays indexed by the shader type. This will let us easily add support for other types of shaders in the future.
* gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #defineBrian Paul2012-08-1621-49/+41
| | | | | | | | | | | | PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
* draw: index samplers and sampler_view state by shader typeBrian Paul2012-08-163-29/+34
| | | | So that we can handle GS state and other types of shaders in the future.
* draw: move tgsi-related state into a tgsi sub-structBrian Paul2012-08-165-30/+35
| | | | To better organize things a bit.
* gallium: add a shader stage/type param to some draw functionsBrian Paul2012-08-165-37/+51
| | | | | To prepare for geometry shader texture support in the draw module. Note: we still only handle the vertex shader case.
* st/mesa: silence signed/unsigned comparison warningBrian Paul2012-08-161-2/+2
|
* svga: move result->key expression after result != NULL checkBrian Paul2012-08-161-1/+3
|
* svga: fix result==NULL logic in emit_fs_consts()Brian Paul2012-08-161-23/+25
| | | | | | | | The previous test for result != NULL was kind of bogus since we dereferenced the pointer earlier in the code. Now, check for result != NULL first, then get the result->key info. Also, remove the useless "offset +=" code at the end.
* svga: update comment (s/SVGA_NEW_VS_RESULT/SVGA_NEW_VS_PRESCALE/)Brian Paul2012-08-161-1/+1
|
* svga: rename svga_hw_vs_parameters -> svga_hw_vs_constantsBrian Paul2012-08-163-6/+6
| | | | and similarly for svga_hw_fs_parameters
* st/mesa: index can be negative in the PROGRAM_CONSTANT caseNiels Ole Salscheider2012-08-161-1/+1
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]>
* mesa: add cast to silence warning in _mesa_pack_rgba_span_from_ints()Brian Paul2012-08-161-1/+1
|
* meta: remove unused variableBrian Paul2012-08-161-1/+1
|
* radeonsi: Fix symbol conflicts with r600g.Michel Dänzer2012-08-1610-268/+254
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50389 Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Fix memory leaks if returning early from some state functions.Michel Dänzer2012-08-162-12/+14
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Fix LLVM context leak.Michel Dänzer2012-08-161-0/+1
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>