summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa/swrast: fix GL_TEXTURE_2D_ARRAY texture fetches for dxt formatsBrian Paul2012-08-244-72/+76
| | | | | | | As with the previous commit. This fixes the last crash in the piglit copyteximage test but there's still some failures.
* mesa/swrast: fix GL_TEXTURE_2D_ARRAY texture fetches for latc/rgtc formatsBrian Paul2012-08-244-88/+108
| | | | | | | Fix-up the texel fetch functions so that they handle 3D coords (as used for array textures) and remove the "f_2d" part from their names. Helps fix swrast crashes in piglit's copyteximage test. More to come.
* mesa: code movement in teximage.cBrian Paul2012-08-241-204/+198
| | | | To get rid of a forward declaration.
* mesa: consolidate glTexImage and glCompressedTexImage codeBrian Paul2012-08-241-203/+138
| | | | | | There was a lot of similar or duplicated code before. To minimize this patch's size, use a forward declaration for compressed_texture_error_check(). Move the function in the next patch.
* mesa: make glTexImage, glCompressedTexImage proxy code more alikeBrian Paul2012-08-241-35/+42
| | | | Next up, we can combine the teximage() and compressed_teximage() functions.
* mesa: rename texpal.[ch] to texcompress_cpal.[ch]Brian Paul2012-08-245-11/+26
| | | | To be consistent with other files related to texture compression.
* mesa: s/GLuint/gl_format/ in _mesa_compressed_format_to_glenum()Brian Paul2012-08-242-2/+2
| | | | No real change here, just use the right type.
* mesa: new _mesa_num_tex_faces() helperBrian Paul2012-08-2410-16/+31
| | | | | Not a real big help now, but will be useful for the GL_ARB_texture_cube_map_array extension in the future.
* mesa: make _mesa_get_proxy_tex_image() staticBrian Paul2012-08-242-9/+8
| | | | It's not used by any other file.
* mesa: don't clear proxy image fields when regular GL error is generatedBrian Paul2012-08-241-11/+33
| | | | | | | | If a proxy texture call generates a regular GL error, we should not clear the proxy image's width/height/depth/format fields. Use a new PROXY_ERROR token to distinguish proxy errors from regular GL errors. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: fix glTexImage proxy texture error generationBrian Paul2012-08-241-52/+43
| | | | | | | | | | | | When calling glTexImage() with a proxy target most error conditions should generate a GL error. We were erroneously doing the proxy-error behaviour (where we zeroed-out the image's width/height/depth/format fields) in too many places. There's another issue with proxy textures, but that'll be fixed in the next patch. Reviewed-by: Anuj Phogat <[email protected]>
* build: don't leave git_sha1.h.tmp after build/installVadim Girlin2012-08-241-0/+2
| | | | | | | | Fixes "`main/git_sha1.h.tmp': Permission denied" build error. See https://bugs.freedesktop.org/show_bug.cgi?id=52064 Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/msaa: Add sample-alpha-to-coverage support for multiple render targetsAnuj Phogat2012-08-234-2/+43
| | | | | | | | | | | | | | | | | | | | | | Render Target Write message should include source zero alpha value when sample-alpha-to-coverage is enabled for an FBO with multiple render targets. Source zero alpha value is used as fragment coverage for all the render targets. This patch makes piglit tests draw-buffers-alpha-to-coverage and alpha-to-coverage-no-draw-buffer-zero to pass on Sandybridge. No regressions are observed with piglit all.tests. V2: Revert all the changes made in emit_color_write() function to include src0 alpha for targets > 0. Now handling this case in a if block. V3: Correctly calculate the instruction length for buffer zero. Properly handle the case of dual_src_blend when alpha-to-coverage is enabled. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa/es: Validate glCompressedTexSubImage internalFormat in Mesa code rather ↵Ian Romanick2012-08-232-5/+10
| | | | | | | | than the ES wrapper Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glCompressedTexImage internalFormat in Mesa code rather ↵Ian Romanick2012-08-232-26/+16
| | | | | | | | | | than the ES wrapper v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glCopyTexImage internalFormat in Mesa code rather than the ↵Ian Romanick2012-08-232-8/+18
| | | | | | | | | | ES wrapper v2: Add GLES3 filtering. I'm not 100% sure this is correct. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glTexSubImage format and type in Mesa code rather than the ↵Ian Romanick2012-08-232-133/+17
| | | | | | | | | | ES wrapper v2: Add proper GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glTexImage format, type, and internalFormat in Mesa code ↵Ian Romanick2012-08-233-203/+98
| | | | | | | | | | | | | rather than the ES wrapper v2: Add proper GLES3 filtering. v3: Collapse ALPHA, LUMINANCE, and LUMINANCE_ALPHA cases per review comment from Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glTexImage border in Mesa code rather than the ES wrapperIan Romanick2012-08-232-10/+4
| | | | | | | | | | | Also validate glCopyTexImage border. This fixes a bug in the APIspec. Previously glTexImage3DOES could be passed a non-zero border without error. NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Generate an error when glCopyTexImage border is invalidIan Romanick2012-08-231-0/+2
| | | | | | | | NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Add support for GL_APPLE_texture_max_levelIan Romanick2012-08-231-0/+1
| | | | | | | | This is desktop OpenGL functionality that has always existed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glGetTexParameter pnames in Mesa code rather than the ES ↵Ian Romanick2012-08-232-29/+84
| | | | | | | | | | | | | | | wrapper This also adds a missing extension (and API) check around GL_TEXTURE_CROP_RECT_OES. v2: Add proper core-profile and GLES3 filtering. GL_TEXTURE_MAX_LEVEL is (incorrectly) accepted in ES contexts. A future patch will add GL_APPLE_texture_max_level, and meta really needs this. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glTexParameter pnames in Mesa code rather than the ES wrapperIan Romanick2012-08-233-75/+54
| | | | | | | | | | | | | This also adds a missing extension (and API) check around GL_TEXTURE_CROP_RECT_OES. v2: Add proper core-profile, GLES1, and GLES3 filtering. GL_TEXTURE_MAX_LEVEL is (incorrectly) accepted in ES contexts. A future patch will add GL_APPLE_texture_max_level, and meta really needs this. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Remove redundant glBindTexture target validationIan Romanick2012-08-231-8/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Filter glBindTexture targets based on supported features.Ian Romanick2012-08-231-9/+21
| | | | | | | | | | | | Fixed the piglit test arb_texture_buffer_object-negative-unsupported. NOTE: This is a candidate for stable release branches. v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate tex image targets in Mesa code rather than the ES wrapperIan Romanick2012-08-232-130/+29
| | | | | | | | | | | | | | This should take care of all the TexImage, TexSubImage, CopyTexImage, CompressedTexImage3DOES, and CopyTexSubImage type paths. v2: Add proper core-profile and GLES3 filtering. v3: Squash the CompressedTexImage3DOES patch per review comment from Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate EGLImageTargetTexture2DOES target in Mesa code rather than ↵Ian Romanick2012-08-232-10/+15
| | | | | | | | the ES wrapper Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate glTexParameter targets in Mesa code rather than the ES wrapperIan Romanick2012-08-233-34/+15
| | | | | | | | | | Ditto for glGetTexParameter targets. v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa/es: Validate GL_TEXTURE_WRAP param in Mesa code rather than the ES wrapperIan Romanick2012-08-233-26/+12
| | | | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Refactor validate_texture_wrap_mode to use a switch-statementIan Romanick2012-08-231-35/+42
| | | | | | | | This makes the next couple changes a little easier. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* meta: Don't modify GL_GENERATE_MIPMAP state when it doesn't existIan Romanick2012-08-231-2/+6
| | | | | | | | | | | | | | | | | | This is a bit of a hack. _mesa_meta_GenerateMipmap shouldn't even be used in contexts where GL_GENERATE_MIPMAP doesn't exist (i.e., core profile and ES2) because it uses fixed-function, and fixed-function doesn't exist there either! A GLSL-based _mesa_meta_GenerateMipmap should be available soon. When that is available, this patch will be irrelevant and should be reverted. v2: Change (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) to (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) based on review comment from Brian Paul. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: accept and handle configuration options from st/driVadim Girlin2012-08-234-5/+14
| | | | | | Currently there is a single option - force_glsl_extensions_warn. Signed-off-by: Vadim Girlin <[email protected]>
* build: Only build libmesagallium.la if building GalliumMatt Turner2012-08-221-2/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* build/x11: Force usage of C++ linkerMatt Turner2012-08-221-0/+3
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* build/x11: Don't link against shared-glapiMatt Turner2012-08-221-4/+0
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix generic compressed texture formats' handling in ↵Anuj Phogat2012-08-211-30/+2
| | | | | | | | | | | | | | | | | | | | glTexImage/glCopyTexImage The generic texture formats should be accepted by the <internalformat> parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D functions. When the application specifies a generic format, the driver is free to pick an uncompressed format. This patch reverts the changes due to following commit: commit a36581ccc06693231011c3fe136207e73191b1ce mesa: do more teximage error checking for generic compressed formats This patch fixes compressed texture format failures in intel oglconform pxconv-gettex test case: https://bugs.freedesktop.org/show_bug.cgi?id=47220 Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* APIspec: Remove cruft about AMD_compressed_???_textureIan Romanick2012-08-201-15/+0
| | | | | | | | | Mesa doesn't support these extensions, and it seems unlikely that it ever will Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glFramebufferTexture3D textarget validationIan Romanick2012-08-201-4/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glGetShaderiv pname validationIan Romanick2012-08-201-8/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glCompressedTexImage border validationIan Romanick2012-08-201-4/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glPointSizePointer type validationIan Romanick2012-08-201-5/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glGetBufferPointer pname validationIan Romanick2012-08-201-4/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glGetVertexAttribPointer pname validationIan Romanick2012-08-201-4/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant element type validationIan Romanick2012-08-201-12/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant glGetShaderPrecisionFormat shader type validationIan Romanick2012-08-201-14/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant depth func validationIan Romanick2012-08-201-11/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant stencil op fail/zfail/zpass validationIan Romanick2012-08-201-72/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant shade model mode validationIan Romanick2012-08-201-5/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant light pname and light validationIan Romanick2012-08-202-108/+2
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant hint mode validationIan Romanick2012-08-201-6/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>