summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* xlib: remove unused Fake_glXGetAGPOffsetMESA() functionBrian Paul2018-08-081-10/+0
| | | | | | To silence compiler warning. Reviewed-by: Emil Velikov <[email protected]>
* autotools: use correct gl.pc LIBS when using glvndEmil Velikov2018-08-081-1/+1
| | | | | | | | | This is more of a hack, since glvnd itself should be providing the file. Until that happens, ensure the libs is correctly set to -lGL CC: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* glsl_to_tgsi: plumb image writable through to driverErik Faye-Lund2018-08-082-5/+15
| | | | | | | | | | | The virgl driver cares about the writable-flag on image definitions, because it re-emits GLSL from the TGSI. However, so far it was hardcoded to true in glsl_to_tgsi, which cause problems when virglrenderer is running on top of GLES 3.1, where not all formats are supported for writable images. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* python: Use explicit integer divisionsMathieu Bridon2018-08-073-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 2, divisions of integers return an integer: >>> 32 / 4 8 In Python 3 though, they return floats: >>> 32 / 4 8.0 However, Python 3 has an explicit integer division operator: >>> 32 // 4 8 That operator exists on Python >= 2.2, so let's use it everywhere to make the scripts compatible with both Python 2 and 3. In addition, using __future__.division tells Python 2 to behave the same way as Python 3, which helps ensure the scripts produce the same output in both versions of Python. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v2) Reviewed-by: Dylan Baker <[email protected]>
* dri: Add param driCreateConfigs(mutable_render_buffer)Chad Versace2018-08-077-11/+17
| | | | | | | | | If set, then the config will have __DRI_ATTRIB_MUTABLE_RENDER_BUFFER, which translates to EGL_MUTABLE_RENDER_BUFFER_BIT_KHR. Not used yet. Reviewed-by: Tapani Pälli <[email protected]>
* dri: Define DRI_MutableRenderBuffer extensionsChad Versace2018-08-074-0/+10
| | | | | | | | | | | | Define extensions DRI_MutableRenderBufferDriver and DRI_MutableRenderBufferLoader. These are the two halves for EGL_KHR_mutable_render_buffer. Outside the DRI code there is one additional change. Add gl_config::mutableRenderBuffer to match __DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet. Reviewed-by: Tapani Pälli <[email protected]>
* i965: gen_shader_sha1() doesn't use the brw_contextEric Engestrom2018-08-071-4/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: fix make check for AMD_framebuffer_multisample_advancedIan Romanick2018-08-061-0/+8
| | | | | | | | Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107483 Fixes: 3d6900d76ef ("glapi: define AMD_framebuffer_multisample_advanced and add its functions") Reviewed-by: Marek Olšák <[email protected]> Cc: Vinson Lee <[email protected]>
* st/mesa: expose & set limits for AMD_framebuffer_multisample_advancedMarek Olšák2018-08-041-0/+89
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add renderbuffer support for AMD_framebuffer_multisample_advancedMarek Olšák2018-08-041-8/+53
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: pass storage_sample_count parameter into st_choose_formatMarek Olšák2018-08-046-22/+30
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: add functional FBO changes for AMD_framebuffer_multisample_advancedMarek Olšák2018-08-042-17/+131
| | | | | | | - relax FBO completeness rules - validate sample counts Reviewed-by: Brian Paul <[email protected]>
* mesa: add gl_renderbuffer::NumStorageSamplesMarek Olšák2018-08-044-9/+23
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: implement glGet for AMD_framebuffer_multisample_advancedMarek Olšák2018-08-044-0/+32
| | | | Reviewed-by: Brian Paul <[email protected]>
* glapi: define AMD_framebuffer_multisample_advanced and add its functionsMarek Olšák2018-08-042-0/+32
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: add storageSamples parameter to renderbuffer functionsMarek Olšák2018-08-046-21/+33
| | | | | | | It's just passed to other functions but otherwise unused. It will be used in following commits. Reviewed-by: Brian Paul <[email protected]>
* mesa: add switch case for GL 2.0 in _mesa_compute_version()Brian Paul2018-08-021-0/+2
| | | | | | | | | | Previously, I added a switch case for GL 2.1 (ed7a0770b881791dd697f3). I don't know of any driver which only supports GL 2.0, but adding this switch case avoids a failure if the app queries GL_SHADING_LANGUAGE_VERSION. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: replace binary constants with hexadecimal constants18.2-branchpointAndres Gomez2018-08-021-58/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary constant notation "0b" is a GCC extension. Instead, we use hexadecimal notation to fix the MSVC 2013 build: Compiling src\mesa\main\texcompress_astc.cpp ... texcompress_astc.cpp src\mesa\main\texcompress_astc.cpp(111) : error C2059: syntax error : 'bad suffix on number' ... src\mesa\main\texcompress_astc.cpp(1007) : fatal error C1003: error count exceeds 100; stopping compilation scons: *** [build\windows-x86-debug\mesa\main\texcompress_astc.obj] Error 2 scons: building terminated because of errors. v2: Fix wrong conversion (Ilia). Fixes: 38ab39f6501 ("mesa: add ASTC 2D LDR decoder") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Mike Lothian <[email protected]> Cc: Gert Wollny <[email protected]> Cc: Dieter Nützel <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* intel/compiler: Add brw_get_compiler_config_value for disk cacheJordan Justen2018-08-011-1/+2
| | | | | | | | | | | | | | | | | | | During code review, Jason pointed out that: 2b3064c0731 "i965, anv: Use INTEL_DEBUG for disk_cache driver flags" Didn't account for INTEL_SCALER_* environment variables. To fix this, let the compiler return the disk_cache driver flags. Another possible fix would be to pull the INTEL_SCALER_* into INTEL_DEBUG bits, but as we are currently using 41 of 64 bits, I didn't think it was a good use of 4 more of these bits. (5 since INTEL_PRECISE_TRIG needs to be accounted for as well.) Cc: Jason Ekstrand <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Disable shader cache with INTEL_DEBUG=shader_timeJordan Justen2018-08-011-0/+3
| | | | | | | | | | | | | | | | | | | Shader time hard codes an index of the shader time buffer within the gen program. In order to support shader time in the disk shader cache, we'd need to add the shader time index into the program key. This should work, but probably is not worth it for this particular debug feature. Therefore, let's just disable the disk shader cache if the shader time debug feature is used. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106382 Fixes: 96fe36f7acc "i965: Enable disk shader cache by default" Cc: Eero Tamminen <[email protected]> Cc: Kenneth Graunke <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl, glsl_to_tgsi: fix sampler/image constantsRhys Perry2018-08-011-3/+11
| | | | | Signed-off-by: Rhys Perry <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* glsl_to_tgsi: allow bound samplers and images to be used as l-valuesRhys Perry2018-08-012-1/+55
| | | | | Signed-off-by: Rhys Perry <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák2018-07-3112-48/+59
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium: add pipe_resource::nr_storage_samples, and set it same as nr_samplesMarek Olšák2018-07-314-3/+9
| | | | Tested-by: Dieter Nützel <[email protected]>
* st/mesa: implement ASTC 2D LDR fallback for all driversMarek Olšák2018-07-315-2/+80
| | | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: add ETC2 & ASTC fast path for GetTex(Sub)ImageMarek Olšák2018-07-311-0/+41
| | | | | | | | | Not sure if GL/GLES can hit this path, but it's just decompression. Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: generalize fallback_copy_image for compressed texturesMarek Olšák2018-07-311-6/+11
| | | | | | | | | in order to support ASTC Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: generalize code for the compressed texture map/unmap fallbackMarek Olšák2018-07-312-23/+31
| | | | | | | | | in order to support ASTC Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: use st_compressed_format_fallback moreMarek Olšák2018-07-311-12/+4
| | | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: generalize st_etc_fallback -> st_compressed_format_fallbackMarek Olšák2018-07-313-13/+17
| | | | | | | | | for ASTC support later Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* mesa: add ASTC 2D LDR decoderMarek Olšák2018-07-316-0/+1967
| | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* i965: enable XFB and GeometryStreams for gen7+Alejandro Piñeiro2018-07-311-0/+2
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* i965: Link XFB varyings for SPIR-V shadersNeil Roberts2018-07-311-0/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* arb_gl_spirv: add calls to several nir loweringsAlejandro Piñeiro2018-07-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | For now we are just adding nir lowerings that are needed/mandatory to get things working. After everything is settled, we would start to add good-to-have lowerings. This patch adds the following calls: * nir_split_var_copits and nir_split_per_member_structs: as vulkan drivers are doing now. See commit b0c643d8f579a3e1e45a08f6d9de099f2c45898b ("spirv: Use NIR per-member splitting") for more info. Without this commit, piglit tests like this crashes: spec/arb_gl_spirv/execution/varying/block And in general most of the shaders that includes any kind of struct. * nir_copy_prop: after nir_deref_instr introduction, function calls need this. See commit "nir,spirv: Rework function calls" (c11833ab24dcba26de1b0a5805e35a5d6761514e) for more info. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glspirv: Set last_vert_progNeil Roberts2018-07-311-0/+7
| | | | | | v2: simplify last_vert check (Timothy) Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix a typo (trivial)Tapani Pälli2018-07-311-1/+1
| | | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add glRenderbufferStorage support for EXT_texture_norm16 formatsTapani Pälli2018-07-311-3/+7
| | | | | | | | | These bits were missing, found when extending the Piglit test. Fixes: 7f467d4f73 "mesa: GL_EXT_texture_norm16 extension plumbing" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* xlib: fix build break from _swrast_map_soft_renderbuffer() callBrian Paul2018-07-271-1/+1
| | | | | | We need to pass the new flip_y argument. Reviewed-by: Clayton Craft <[email protected]>
* swrast: fix crash in AA line code when there's no textureBrian Paul2018-07-271-4/+6
| | | | | | | Fixes a crash running the Piglit polygon-mode-facing test (and probably others). Reviewed-by: Neha Bhende <[email protected]>
* mesa: add switch case for GL 2.1 in _mesa_compute_version()Brian Paul2018-07-271-0/+3
| | | | | | | The xlib/swrast driver only supports GL 2.1. This patch fixes a crash if the app calls glGetString(GL_SHADING_LANGUAGE_VERSION). Reviewed-by: Neha Bhende <[email protected]>
* mesa: replace tabs with spaces in mipmap.cBrian Paul2018-07-271-28/+28
| | | | Trivial.
* mesa: whitespace clean-up in texstore.cBrian Paul2018-07-271-45/+50
| | | | Trivial.
* mesa: move var decls in texstore_rgba()Brian Paul2018-07-271-6/+8
| | | | | | Move them closer to where they're first used. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: remove unneeded free() call in texstore_rgba()Brian Paul2018-07-271-1/+0
| | | | | | The pointer will always be NULL since that's what we just tested for. Reviewed-by: Charmaine Lee <[email protected]>
* i965: implement GL_MESA_framebuffer_flip_y [v3]Fritz Koenig2018-07-279-45/+43
| | | | | | | | | | | | | | Instead of using _mesa_is_winsys_fbo or _mesa_is_user_fbo to infer if an fbo is flipped use the FlipY flag. v2: * additional window-system framebuffer checks [for jason] v3: * s/inverted_y/flip_y/g [for chadv] * s/InvertedY/FlipY/g [for chadv] Reviewed-by: Chad Versace <[email protected]>
* mesa: GL_MESA_framebuffer_flip_y extension [v4]Fritz Koenig2018-07-2726-56/+140
| | | | | | | | | | | | | | | | | | | | | | | | | Adds an extension to glFramebufferParameteri that will specify if the framebuffer is vertically flipped. Historically system framebuffers are vertically flipped and user framebuffers are not. Checking to see the state was done by looking at the name field. This adds an explicit field. v2: * updated spec language [for chadv] * correctly specifying ES 3.1 [for chadv] * refactor access to rb->Name [for jason] * handle GetFramebufferParameteriv [for chadv] v3: * correct _mesa_GetMultisamplefv [for kusmabite] v4: * update spec language [for chadv] * s/GLboolean/bool/g [for chadv] * s/InvertedY/FlipY/g [for chadv] * s/inverted_y/flip_y/g [for chadv] * assert changes [for chadv] Reviewed-by: Chad Versace <[email protected]>
* i965/icl: Disable binding table prefetchingTopi Pohjolainen2018-07-271-1/+13
| | | | | | | | | | | | | Gen 11 workarounds table #2056 WABTPPrefetchDisable suggests to disable prefetching of binding tables for ICLLP A0 and B0 steppings. It fixes multiple gpu hangs in ext_framebuffer_multisample* tests on ICLLP B0 h/w. Anuj: Add comments and commit message. Add gen 11 checks in the code. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Disable guardband clipping on SandyBridge for odd dimensionsvadym.shovkoplias2018-07-271-0/+11
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104388 Signed-off-by: Andriy Khulap <[email protected]> Acked-by: Rafael Antognolli <[email protected]>
* i965: Combine both gl_PatchVerticesIn lowering passes.Kenneth Graunke2018-07-262-51/+18
| | | | | | | | | | | | | | | | | | Until now, we had separate passes for lowering gl_PatchVerticesIn to a statically known constant (for TES inputs when linked against a TCS), and a uniform in the other cases. Annoyingly, one had to be run before nir_lower_system_values, and the other afterward. This simplified the passes, but made life painful for the callers. This patch combines both into a single pass. If you give it a non-zero static count, it uses that. If you give it Mesa state slots, it turns it back into a built-in uniform. Otherwise, it does nothing. This also moves the i965 uniform lowering out to shared code. v2: Make token arrays const. Reviewed-by: Eric Anholt <[email protected]>
* i965: Expose EXT_base_instance extension in OpenGLES 3.0Sagar Ghuge2018-07-261-1/+1
| | | | | | | | | | | | | | The extension requires at least OpenGL 3.0 and OpenGL ES 3.0. Fixes two ext_base_instance tests: arb_base_instance-baseinstance-doesnt-affect-gl-instance-id_gles3 arb_base_instance-drawarrays_gles3 Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>