summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* glformats: add _mesa_es3_error_check_format_and_typeMatt Turner2013-01-142-0/+444
| | | | | | | | | This function checks for ES3 compatible format/type/internalFormat/dimension combinations. [[email protected]: additional tweaks for gles3-gtf] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* fbobject: don't allow LUMINANCE/INTENSITY/ALPHA fbo on ES/CoreJordan Justen2013-01-141-1/+2
| | | | | | | | | v2: * Only allow on GL Legacy contexts Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* fbobject: add VERBOSE=api message for renderbuffer storageJordan Justen2013-01-141-1/+16
| | | | | | | | | | Add API debug trace message for: * glRenderbufferStorage * glRenderbufferStorageMultisample Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* fbobject: add VERBOSE=api message for check framebuffer statusJordan Justen2013-01-141-0/+4
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: add some simple buffer/draw debug codeBrian Paul2013-01-144-0/+18
| | | | Reviewed-by: José Fonseca <[email protected]>
* i965: Avoid blending with destination alpha when RB format has no alpha bitsCarl Worth2013-01-143-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | The hardware does not support a render target without an alpha channel. So when the user creates a render buffer with no alpha channel, there actually is storage available for alpha internally. It requires special care to avoid these unwanted alpha bits from causing any problems. Specifically, when blending, and when the blend factors would read the destination alpha values, this commit coerces the blend factors to instead be either 0 or 1 as appropriate. A similar fix was made for pre-gen6 hardware in commit eadd9b8e and this commit shares the fixup function written by Ian then. This commit the following es3conform test: rgb8_rgba8_rgb As well as the following piglit (sub) tests: EXT_framebuffer_object/fbo-blending-formats/3 EXT_framebuffer_object/fbo-blending-formats/GL_RGB EXT_framebuffer_object/fbo-blending-formats/GL_RGB8 Reviewed-by: Ian Romanick <[email protected]>
* xmlpool: Fix out-of-tree builds.Johannes Obermayr2013-01-135-1/+5
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).Johannes Obermayr2013-01-131-1/+1
| | | | Reviewed-by: Andreas Boll <[email protected]>
* r200: Fix probable thinko in r200EmitArraysAdam Jackson2013-01-131-1/+2
| | | | | | | | | | Effectively this path would always assert. Move the break statement to the (probable) intended place. Note: This is a candidate for the stable branches. Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* Remove hacks for static MakefilesMatt Turner2013-01-138-31/+1
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build
* i965: Move program_id to intel_screen instead of brw_context.Kenneth Graunke2013-01-124-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to bug #54524, I regressed oglconform's multicontext test when I reenabled the fragment shader precompile. However, these test cases only passed by miraculous coincedence. We assign each fragment program a unique ID (brw_fragment_program::id which becomes brw_wm_prog_key::program_string_id) which we obtain by storing a per-context counter. The test case uses GLX context sharing to access the same fragment program from two different contexts. This means that we share a program cache. Before the precompile, if both contexts happened to use the same shaders in the same order, we'd obtain the same program_string_ids (by virtue of doing the same computation twice). However, the more likely scenario is that they completely disagree on program_string_id. This meant that we'd have two completely different fragment shaders in the cache with the same ID, tricking us to think they were the same (aside from NOS), so we'd render using the wrong program. This patch implements a simple fix suggested by Eric: it moves the global counter out of brw_context and into intel_screen, which is shared across all contexts. A mutex protects it from concurrent access. This is also the first direct usage of pthreads in the i965 driver. Fixes 10 subcases of oglconform's multicontext test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54524 Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix build error with clang.Kenneth Graunke2013-01-121-3/+7
| | | | | | | | | | | | | | | Technically, variable sized arrays are a required feature of C99, redacted to be optional in C11, and not actually part of C++ whatsoever. Gcc allows using them in C++ unless you specify -pedantic, and Clang appears to allow them for simple/POD types. exec_list is arguably POD, since it doesn't have virtual methods, but I can see why Clang would be like "meh, it's a C++ struct, say no", seeing as it's meant to support C99. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58970 Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Don't mix integer/float immediates in i2b handling.Kenneth Graunke2013-01-121-1/+3
| | | | | | | | | | | | | | | The simulator gets very angry about our i2b code: cmp.ne(16) g3<1>D g2<0,1,0>D 0F We can't mix integer DWord and float types. The only reason to use 0F here was to share code with f2b. Split it and use 0D instead. While we don't believe anything bad will actually happen because of this, it's nice to fix the warnings and easy enough to do. Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add an INTEL_DEBUG=no16 option.Kenneth Graunke2013-01-123-1/+4
| | | | | | | | | | | Often when debugging, I don't want to see SIMD16 shaders. It makes INTEL_DEBUG=vs/fs output much easier to read, especially when a program dumps many shaders. Plus, I also want to verify that SIMD8 works before even considering SIMD16. v2: Fix the likeliness check (caught by Chris and Eric). Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: set ctx->Const.UniformBufferOffsetAlignmentFredrik Höglund2013-01-121-1/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* scons: Update for xmlpool/options.h generation.José Fonseca2013-01-122-0/+17
|
* texformat: use MESA_FORMAT_ARGB2101010 with GL_UNSIGNED_INT_2_10_10_10_REVJordan Justen2013-01-121-1/+7
| | | | | | | | | Choose MESA_FORMAT_ARGB2101010 when storing GL_RGBA + GL_UNSIGNED_INT_2_10_10_10_REV or GL_RGB + GL_UNSIGNED_INT_2_10_10_10_REV. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* texstore argb2101010: merge GL_RGBA and GL_RGB casesJordan Justen2013-01-121-15/+3
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glformats: support _mesa_bytes_per_pixel for 2101010+GL_RGBJordan Justen2013-01-121-1/+2
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glformats: add _mesa_base_format_component_countJordan Justen2013-01-122-0/+29
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glformats: add functions to detect signed/unsigned integer typesJordan Justen2013-01-122-14/+46
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* unpack: support unpacking MESA_FORMAT_ARGB2101010Jordan Justen2013-01-121-0/+18
| | | | | | | Note: This is a candidate for the stable branches. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add extension tracking for {ARB,OES}_get_program_binaryIan Romanick2013-01-111-0/+2
| | | | | | | | | | | The ARB_get_program_binary spec says "OpenGL 3.0 is required." The nearly identical OES_get_program_binary extension is available for OpenGL ES 2.0, so I don't see how / why OpenGL 3.0 is a requirement for the ARB version. Let's just enable whenever GL_ARB_shader_objects is available. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add GetProgramiv support for GL_PROGRAM_BINARY_LENGTHIan Romanick2013-01-111-0/+3
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add Get support for PROGRAM_BINARY_FORMATS and NUM_PROGRAM_BINARY_FORMATSIan Romanick2013-01-111-0/+4
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add tracking for GL_PROGRAM_BINARY_RETRIEVABLE_HINT stateIan Romanick2013-01-112-0/+62
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Emit errors for geometry shader enums when ARB_gs4 is not supportedIan Romanick2013-01-111-5/+15
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: Emit dispatch for {ARB,OES}_get_program_binaryIan Romanick2013-01-111-6/+13
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add stub implementations of glGetProgramBinary and glProgramBinaryIan Romanick2013-01-112-0/+63
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix the naming of _mesa_ProgramParameteriARBIan Romanick2013-01-112-4/+4
| | | | | | | | After recent changes in the XML, the dispatch generators will expect this function to be named _mesa_ProgramParameteri. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix GL_SHADER_BINARY_FORMATS queryIan Romanick2013-01-111-8/+2
| | | | | | | | | | | | | | | There were two bugs here. First, this and several other queries were not available in a desktop GL context with GL_ARB_ES2_compatibility. Second, GL_NUM_SHADER_BINARY_FORMATS returns zero, but GL_SHADER_BINARY_FORMATS writes one element of data to the buffer. If NUM is zero, no data should be written. Fixes piglit test 'arb_get_program_binary-overrun shader'. NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp: Accept pointer to GL context rather than just the API versionCarl Worth2013-01-111-1/+1
| | | | | | | | | As the preprocessor becomes more sophisticated and gains more optional behavior, it's easiest to just pass the GL context pointer to it so that it can examine any fields there that it needs to (such as API version, or the state of any driconf options, etc.). Reviewed-by: Kenneth Graunke <[email protected]>
* drirc: Add quirk to disable GLSL line continuations for Savage2Carl Worth2013-01-111-0/+3
| | | | | | | | | | | | | | | | | | This application is known to contain shaders that: 1. Have a stray backslash as the last line of comment lines 2. Have a declaration immediately following that line Hence, interpreting that backslash as a line continuation causes the declaration to be hidden and the shader fails to compile. Fortunately, the shaders also: 3. Do not have any other intentional line-continuation characters So disabling line continuations entirely for the application fixes this problem without causing any other breakage. Reviewed-by: Kenneth Graunke <[email protected]>
* driconf: Add a new option: disable_glsl_line_continuationsCarl Worth2013-01-114-1/+15
| | | | | | | | | This is to enable a quirk for Savage2 which includes a shader with a stray '\' at the end of a comment line. Interpreting that backslash as a line continuation will break the compilation of the shader, so we need a way to disable this. Reviewed-by: Kenneth Graunke <[email protected]>
* driconf: Add proper dependency for compiling .mo files from .po files.Carl Worth2013-01-112-21/+20
| | | | | | | | | | | Previously this was happening unconditionally, leading to some excessive rebuilding/relinking during builds. Note that the .po files are not automatically updated due to changes to the t_options.h file. Instead, translators should continue to use "make po" manually. This is because after new strings are merged into the existing .po file, manual work is still required by translators to ensure that the translations are correct.
* driconf: Add translation-generation to build system, don't track generated filesCarl Worth2013-01-118-643/+64
| | | | | | | | | | | | | | | | | | | | Previously, the xmlpool directory had a lone Makefile to assist poeple in manually invoking a deep make in order to update the translations in options.h. We can observe that this wasn't happening in fact, (new translations had been added to de.po without being generated into options.h, and new options had been manually added directly to options.h rather than to t_options.h). Prevent both of these problems from occurring in the future by automatically generating options.h as part of the standard build of mesa. For this, the generated options.h is now removed from version control, (along with Makefile in favor of Makefile.am). [chadv: Port the Autotools changes to Android.] Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* driconf: Fix German translations by removing a couple of bogus backslashesCarl Worth2013-01-111-2/+2
| | | | | | | | | As can be seen, many other translation strings already include a single apostrophe just fine without any escaping. This strangely-escaped apostrophe was causing a build failure ("invalid escape sequence") resulting in no "de" translations in the final options.h file. Reviewed-by: Kenneth Graunke <[email protected]>
* driconf: Fix gen_xmlpool.py script to allow running from any directoryChad Versace2013-01-112-4/+18
| | | | | | | | | | | | | | The gen_xmlpool.py script would work correctly only when executed from the directory that contained the script. This shortcoming was due to some hard-coded paths in the script. In order to easily invoke the script from the Android build system, we must be able to execute the script from an arbitrary directory. To enable that, this patch replaces the two hard-coded paths with new command line arguments. Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Carl Worth <[email protected]>
* driconf: Add some translations which have been available, but were not compiledCarl Worth2013-01-111-8/+8
| | | | | | | These translations have existed in the de.po file, but were not in the generated options.h file. This was fixed by simply running "make options.h". Reviewed-by: Kenneth Graunke <[email protected]>
* driconf: Add option definitions to source file, not generated targetCarl Worth2013-01-111-0/+10
| | | | | | | | | | | | | | For the last two most-recently-added driconf options, their definition was manually added to options.h, a file which is intended to be automatically generated, (as part of support for translated driconf option descriptions). This means that these options would be eliminated if the generation step were performed again. Fix this by correctly adding the definitions of these options to t_options.h, (the file used as input to the generator), and not the options.h file, which is generated. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use _mesa_lookup_enum_by_nr in tex*_error_checkMatt Turner2013-01-111-6/+9
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/es3: Add support for GL_PRIMITIVE_RESTART_FIXED_INDEXIan Romanick2013-01-119-19/+67
| | | | | | | | | | | | | This requires some derived state. The cut vertex used is either the value specified by glPrimitiveRestartIndex or it's hard-coded to ~0. The derived state gl_array_attrib::_RestartIndex captures this value. In addition, the derived state gl_array_attrib::_PrimitiveRestart is set whenever either gl_array_attrib::PrimitiveRestart or gl_array_attrib::PrimitiveRestartFixedIndex is set. v2: Use _mesa_is_gles3. Signed-off-by: Ian Romanick <[email protected]>
* i965: Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVEIan Romanick2013-01-111-0/+3
| | | | | | | | We just treat this as an alias for GL_ANY_SAMPLES_PASSED. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es3: Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVE query targetIan Romanick2013-01-112-2/+11
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es3: Allow transpose matrix uniforms in GLES3Ian Romanick2013-01-111-1/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* Clean up .gitignore filesMatt Turner2013-01-1017-19/+0
|
* Remove state_tracker/MakefileMatt Turner2013-01-101-2/+0
| | | | Unneeded and unnecessary.
* mesa: Rename and wire-up GetInteger64i_vMatt Turner2013-01-103-5/+4
| | | | | | | | | | | | The function was named badly and wasn't in the dispatch table, making it hard to find. Fixes transform_feedback2_states and gets a few other transform feedback tests closer to working in es3conform. Reviewed-by Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Correct glGet{Boolean,Integer}i_v namesMatt Turner2013-01-101-2/+2
| | | | | | Reviewed-by Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow GL_DEPTH_STENCIL_ATTACHMENT in ES 3Matt Turner2013-01-101-1/+1
| | | | | | | Fixes framebuffer_srgb_default_encoding_fbo and 5 packed_depth_stencil tests from es3conform. Reviewed-by: Kenneth Graunke <[email protected]>