summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* state_tracker: Fix assertion failures in conditional block movs.Eric Anholt2015-01-101-31/+26
| | | | | | | | | | | | | If you had a conditional assignment of an array or struct (say, from the if-lowering pass), we'd try doing swizzle_for_size() on the aggregate type, and it would assertion fail due to vector_elements==0. Instead, extend emit_block_mov() to handle emitting the conditional operations, which also means we'll have appropriate writemasks/swizzles on the CMPs within a struct containing various-sized members. Fixes 20 testcases in es3conform on vc4. Reviewed-by: Jose Fonseca <[email protected]>
* i965: Consider SEL.{GE,L} to be commutative operations.Matt Turner2015-01-082-10/+27
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/cfg: Fix end_ip of last basic block.Matt Turner2015-01-081-1/+1
| | | | | | | start_ip and end_ip are inclusive. Increases instruction counts in 64 shaders in shader-db, likely indicative of them previously being misoptimized.
* mesa: compute row stride outside of loop and fix MSVC compilation errorBrian Paul2015-01-081-2/+4
| | | | | | Can't do void pointer arithmetic with MSVC. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix MSVC compilation errorsBrian Paul2015-01-081-5/+5
| | | | | | Move assertions after declarations and don't use void pointer arithmetic. Reviewed-by: Jose Fonseca <[email protected]>
* main: Checking for cube completeness in TextureSubImage.Laura Ekstrand2015-01-081-13/+35
| | | | | | | | This is part of a potential solution to a spec bug. Cube completeness is a concept from glGenerateMipmap, but it seems reasonable to check for it in TextureSubImage when target=GL_TEXTURE_CUBE_MAP. Reviewed-by: Anuj Phogat <[email protected]>
* main: Checking for cube completeness in GetTextureImage.Laura Ekstrand2015-01-081-12/+35
| | | | | | | | This is part of a potential solution to a spec bug. Cube completeness is a concept from glGenerateMipmap, but it seems reasonable to check for it in GetTextureImage when the target is GL_TEXTURE_CUBE_MAP. Reviewed-by: Anuj Phogat <[email protected]>
* main: Added _mesa_cube_level_complete to check for the completeness of an ↵Laura Ekstrand2015-01-082-9/+18
| | | | | | arbitrary cube map level. Reviewed-by: Chad Versace <[email protected]>
* main: glDeleteTextures now throws GL_INVALID_VALUE if n is negative.Laura Ekstrand2015-01-081-0/+5
| | | | | | This is in conformance with the OpenGL spec. Reviewed-by: Anuj Phogat <[email protected]>
* main: Refactor in teximage.c to handle NULL from _mesa_get_current_tex_object.Laura Ekstrand2015-01-081-0/+22
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glTextureBuffer.Laura Ekstrand2015-01-084-16/+92
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Fix texObj->Immutable flag update in _mesa_texture_image_multisample.Laura Ekstrand2015-01-081-1/+1
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glTextureStorage[23]DMultisample.Laura Ekstrand2015-01-084-28/+137
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glGenerateTextureMipmap.Laura Ekstrand2015-01-084-20/+62
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glCompressedTextureSubImage*D.Laura Ekstrand2015-01-084-52/+256
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glGetCompressedTextureImage.Laura Ekstrand2015-01-084-45/+141
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glGetTextureImage.Laura Ekstrand2015-01-084-66/+249
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Nameless texture creation and deletion. Does not affect normal ↵Laura Ekstrand2015-01-082-0/+69
| | | | | | | | | | | | | | | | | | | | creation and deletion paths. In implementing ARB_DIRECT_STATE_ACCESS functions, it is often necessary to abstract the functionality of a traditional GL API function into a backend that both the traditional and dsa API functions can share. For instance, glTexParameteri and glTextureParameteri both call _mesa_texture_parameteri, which takes a context object and a texture object as arguments. The existance of such backend functions provides the opportunity for driver internals (such as meta) to pass around the actual texture object rather than its ID or target, saving on texture object storage and look-up overhead. This patch provides nameless texture creation and deletion for meta. This will be used in an upcoming refactor of meta. Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for CopyTextureSubImage*D.Laura Ekstrand2015-01-084-48/+183
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Fixed some comments in texparam.cLaura Ekstrand2015-01-081-2/+2
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glGetTextureParameteriv, Iiv, and Iuiv.Laura Ekstrand2015-01-084-34/+141
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glGetTextureParameterfv.Laura Ekstrand2015-01-084-12/+52
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glGetTextureLevelParameteriv, fv.Laura Ekstrand2015-01-084-32/+131
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: legal_get_tex_level_parameter_target now handles GL_TEXTURE_CUBE_MAP.Laura Ekstrand2015-01-081-2/+13
| | | | | | | ARB_DIRECT_STATE_ACCESS functions allow an effective target of GL_TEXTURE_CUBE_MAP. Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glTextureParameteriv, Iiv, Iuiv.Laura Ekstrand2015-01-084-34/+156
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glTextureParameteri.Laura Ekstrand2015-01-082-11/+52
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glTextureParameterfv.Laura Ekstrand2015-01-084-13/+59
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glTextureParameterf.Laura Ekstrand2015-01-084-10/+66
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added get_texobj_by_name in texparam.c.Laura Ekstrand2015-01-081-13/+51
| | | | | | This is a convenience function for *Texture*Parameter functions. Reviewed-by: Anuj Phogat <[email protected]>
* main: set_tex_parameterf now handles errors according to the OpenGL 4.5 ↵Laura Ekstrand2015-01-081-17/+20
| | | | | | | | | | | Specification. Beginning in the OpenGL 4.3 core specification, certain error handling has changed. One example shown here is that INVALID_ENUM is thrown instead of INVALID_OPERATION when a user attempts to set sampler parameters for a multisample target. Reviewed-by: Anuj Phogat <[email protected]>
* main: set_tex_parameteri now handles errors according to the OpenGL 4.5 ↵Laura Ekstrand2015-01-081-28/+42
| | | | | | | | | | | Specification. Beginning in the OpenGL 4.3 core specification, some error handling has changed (see OpenGL 4.5 core spec, 30.10.2014, Section 8.10 Texture Parameters, pages 228-29). As an example, changing sampler states with a multisample target throws INVALID_ENUM rather than INVALID_OPERATION. Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for BindTextureUnit.Laura Ekstrand2015-01-086-5/+155
| | | | | | | | | | | | | | | | | | | The following preparations were made in texstate.c and texstate.h to better facilitate the BindTextureUnit function: Dylan Noblesmith: mesa: add _mesa_get_tex_unit() mesa: factor out _mesa_max_tex_unit() This is about to appear in a lot more places, so reduce boilerplate copy paste. add _mesa_get_tex_unit_err() checking getter function Reduce boilerplate across files. Laura Ekstrand: Made note of why BindTextureUnit should throw GL_INVALID_OPERATION if the unit is out of range. Added assert(unit > 0) to _mesa_get_tex_unit. Reviewed-by: Anuj Phogat <[email protected]>
* main: Corrected comment on _mesa_is_zero_size_texture.Laura Ekstrand2015-01-081-1/+1
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glTextureSubImage*D.Laura Ekstrand2015-01-084-81/+320
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry points for glTextureStorage*D.Laura Ekstrand2015-01-084-51/+213
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Added entry point for glCreateTextures.Laura Ekstrand2015-01-084-26/+98
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Removed trailing whitespaces in texture code.Laura Ekstrand2015-01-082-28/+28
| | | | | | | | main: Removed trailing whitespace in texstate.c. main: Deleted trailing whitespaces in texobj.c. main: Fixed whitespace errors in teximage.h and teximage.c. Reviewed-by: Anuj Phogat <[email protected]>
* main: Renamed _mesa_get_compressed_teximage to _mesa_GetCompressedTexImage_sw.Laura Ekstrand2015-01-084-8/+8
| | | | | | | | This reflects the new naming convention for software fallbacks. To avoid confusion with ARB_DIRECT_STATE_ACCESS backend functions, software fallbacks now have the form _mesa_[Driver function name]_sw. Reviewed-by: Anuj Phogat <[email protected]>
* main: Renamed _mesa_get_teximage to _mesa_GetTexImage_sw.Laura Ekstrand2015-01-084-12/+12
| | | | | | | | This reflects the new naming convention for software fallbacks. To avoid confusion with ARB_DIRECT_STATE_ACCESS backend functions, software fallbacks now have the form _mesa_[Driver function name]_sw. Reviewed-by: Anuj Phogat <[email protected]>
* main: Changed _mesa_alloc_texture_storage to _mesa_AllocTextureStorage_sw.Laura Ekstrand2015-01-084-10/+10
| | | | | | | | | | | | | | In order to implement ARB_DIRECT_STATE_ACCESS, many GL API functions must now rely on a backend that both traditional and DSA functions can use. For instance, _mesa_TexStorage2D and _mesa_TextureStorage2D both call a backend function _mesa_texture_storage that takes a context and a texture object as arguments. The backend is named _mesa_texture_storage so that Meta can call it and avoid looking up the context and the texture object. However, backend names often look very close to the names of software fallbacks (ie. _mesa_alloc_texture_storage). For this reason, software fallbacks have been renamed for clarity to have the form _mesa_[Driver function name]_sw. Reviewed-by: Anuj Phogat <[email protected]>
* main: Moved _mesa_get_current_tex_object from teximage.c to texobj.c.Laura Ekstrand2015-01-084-85/+84
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* main: Moved _mesa_lock_texture and _mesa_unlock_texture to texobj.h from ↵Laura Ekstrand2015-01-085-19/+21
| | | | | | teximage.h. Reviewed-by: Anuj Phogat <[email protected]>
* i965: blit_texture_to_pbo() now accepts TEXTURE_CUBE_MAP.Laura Ekstrand2015-01-081-0/+1
| | | | | | ARB_DIRECT_STATE_ACCESS permits the user to use TEXTURE_CUBE_MAP as a target. Reviewed-by: Anuj Phogat <[email protected]>
* main: Added utility function _mesa_lookup_texture_err().Laura Ekstrand2015-01-082-0/+19
| | | | | | | | | Most ARB_DIRECT_STATE_ACCESS functions take an object's ID and use it to look up the object in its hash table. If the user passes a fake object ID (ie. a non-generated name), the implementation should throw INVALID_OPERATION. This is a convenience function for texture objects. Reviewed-by: Anuj Phogat <[email protected]>
* glapi: Added ARB_direct_state_access.xml file.Laura Ekstrand2015-01-084-1/+18
| | | | | | main: Added ARB_direct_state_access to extensions.c as dummy_false. Reviewed-by: Anuj Phogat <[email protected]>
* st/wgl: Ignore ulVersion in DrvValidateVersion.José Fonseca2015-01-081-2/+10
| | | | | | | | | | | We never used ulVersion for proper version checks. Most 3rd party drivers use version 1, but recently NVIDIA OpenGL driver started using a different version number, so the handy trick of renaming Mesa's ICDs as nvoglv32.dll on Windows machines with NVIDIA hardware for quick testing of Mesa software renderers stopped working. Reviewed-by: Brian Paul <[email protected]>
* mesa: Address `assignment makes integer from pointer without a cast` gcc ↵José Fonseca2015-01-081-2/+2
| | | | | | | warning. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/skl: Always use a header for SIMD4x2 sampler messagesKristian Høgsberg2015-01-085-11/+54
| | | | | | | | | | | | SKL+ overloads the SIMD4x2 SIMD mode to mean either SIMD8D or SIMD4x2 depending on bit 22 in the message header. If the bit is 0 or there is no header we get SIMD8D. We always wand SIMD4x2 in vec4 and for fs pull constants, so use a message header in those cases and set bit 22 there. Based on an initial patch from Ken. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Kristian Høgsberg <[email protected]>
* i965/skl: Report more accurate number of samples for formatKristian Høgsberg2015-01-071-0/+2
| | | | | Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* freedreno/ir3: fix pos_regid > max_regRob Clark2015-01-074-41/+121
| | | | | | | | | | | | | | We can't (or don't know how to) turn this off. But it can end up being stored to a higher reg # than what the shader uses, leading to corruption. Also we currently aren't clever enough to turn off frag_coord/frag_face if the input is dead-code, so just fixup max_reg/max_half_reg. Re-org this a bit so both vp and fp reg footprint fixup are called by a common fxn used also by ir3_cmdline. Also add a few more output lines for ir3_cmdline to make it easier to see what is going on. Signed-off-by: Rob Clark <[email protected]>