summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ddebug: handle some cases of non-TGSI shadersNicolai Hähnle2017-07-053-6/+28
| | | | | | | | | | NIR shaders are not captured properly in pipelined mode currently. This would require shader cloning, which requires linking all the Gallium drivers against NIR. We can always do that later. v2: avoid immediate crashes in pipelined mode Reviewed-by: Marek Olšák <[email protected]> (v1)
* glsl_to_nir: zero-initialize var->data.descriptor_setNicolai Hähnle2017-07-051-0/+1
| | | | | | | This is convenient for backends that support both Vulkan and OpenGL while lowering samplers to derefs with nir_lower_samplers_as_deref. Reviewed-by: Timothy Arceri <[email protected]>
* glsl: add glsl_base_type_is_integerNicolai Hähnle2017-07-051-0/+11
| | | | | | We will use this from radeonsi/nir, which we want to keep as pure C code. Reviewed-by: Samuel Pitoiset <[email protected]>
* nir: add NIR_PRINT environment variableNicolai Hähnle2017-07-051-0/+19
| | | | Reviewed-by: Rob Clark <[email protected]>
* glsl/blob: add valgrind checks that written data is definedNicolai Hähnle2017-07-052-0/+13
| | | | | | | | | | | | | Undefined data will eventually trigger a valgrind error while computing its CRC32 while writing it into the disk cache, but at that point, it is basically impossible to track down where the undefined data came from. With this change, finding the origin of undefined data becomes easy. v2: remove duplicate VALGRIND_CFLAGS (Emil) Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl: explicitly zero out padding to gl_shader_variable bitfieldNicolai Hähnle2017-07-051-1/+4
| | | | | | | | | | Otherwise, the padding bits remain undefined, which leads to valgrind errors when storing the gl_shader_variable in the disk cache. v2: use rzalloc instead of an explicit padding member variable Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: simplify add_uniform_to_shader::visit_fieldNicolai Hähnle2017-07-051-6/+5
| | | | | | | Each field gets a distinct name, so we should never hit the case where the name already exists in the parameter list. Reviewed-by: Timothy Arceri <[email protected]>
* glsl: look for multiple variables simultaneously with find_assignment_visitorNicolai Hähnle2017-07-051-41/+81
| | | | | | | | | | | | Save some passes over the IR. v2: redesign to make the users of find_assignments more readable v3: - fix missing ! - add some comments and make the num_found check more explicit (Timothy) Reviewed-by: Ian Romanick <[email protected]> (v1) Reviewed-by: Timothy Arceri <[email protected]>
* gallium/radeon: fix VDPAU breakage, need VRAM with WCMarek Olšák2017-07-051-1/+2
|
* a5xx: enable polygon offset clampsIlia Mirkin2017-07-041-1/+3
| | | | | | | This is already set and emitted by the code. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: implement logicop supportIlia Mirkin2017-07-043-7/+13
| | | | | | | The former 0x60 hardcoded in is equivalent to ROP_COPY with the shift. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: enable polygon mode selectionIlia Mirkin2017-07-044-7/+24
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: disable ARB_depth_clamp for nowIlia Mirkin2017-07-041-1/+3
| | | | | | | | We need to figure out how to implement it properly. Right now it doesn't work at all. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: fix clip_halfz supportIlia Mirkin2017-07-043-4/+7
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: improve 3d texture samplingIlia Mirkin2017-07-041-3/+0
| | | | | | | | | At least the first level works now. Eventually the later levels stop working, there appears to be some alignment issue. But this improves the situation immensely. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: remove one of the MIPFILTER_LINEAR bitsIlia Mirkin2017-07-041-1/+0
| | | | | | | | | It doesn't appear to do what we want. Removing this bit makes lodclamp-between as well as a number of dEQP tests pass, with no visible ill effect. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: enable formats newly added to the headersIlia Mirkin2017-07-041-69/+69
| | | | | | | | | This enables S3TC, BPTC, ETC2, and ASTC texture decoding. Additionally this enables RGB32 texture buffer objects, as well as 11_11_10_FLOAT and 10_10_10_2 vertex formats (and related extensions). Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: include color swap when decoding verticesIlia Mirkin2017-07-041-0/+1
| | | | | | | This fixes support for BGRA vertex formats Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* a5xx: update headersIlia Mirkin2017-07-041-10/+47
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium/radeon: attempt to fix a compiler failure in radeon_winsys.hMarek Olšák2017-07-041-1/+1
| | | | trivial.
* winsys/amdgpu: use 128KB BOs for suballocations of up to 64KB BOsMarek Olšák2017-07-042-3/+5
| | | | | | | | | | This decreases the number of BOs, but might also increase memory usage. It's better for small textures. The gameplay is on the far right: https://people.freedesktop.org/~mareko/suballoc.svg Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: allow suballocating texturesMarek Olšák2017-07-042-1/+15
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: generalize the function for in-place texture reallocationMarek Olšák2017-07-041-21/+43
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add radeon_winsys::buffer_is_suballocatedMarek Olšák2017-07-043-0/+17
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: clean up pb_cache bucket/usage determinationMarek Olšák2017-07-043-32/+30
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: enable suballocations for VRAM with no CPU accessMarek Olšák2017-07-044-4/+21
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: clean up (domain, flags) <-> (slab heap) translationsMarek Olšák2017-07-045-74/+79
| | | | | | This is cleaner, and we are down to 4 slabs. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: remove RADEON_FLAG_CPU_ACCESSMarek Olšák2017-07-045-25/+6
| | | | | | https://lists.freedesktop.org/archives/amd-gfx/2017-June/010591.html Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: disallow exports of sparse and suballocated BOsMarek Olšák2017-07-042-8/+6
| | | | | | I think it's unsafe, because the slabs can reuse exported storage. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: clean up r600_texture_get_handleMarek Olšák2017-07-041-24/+23
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: rename RADEON_FLAG_HANDLE -> RADEON_FLAG_NO_SUBALLOCMarek Olšák2017-07-046-9/+9
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: fix a possible crash for buffer exportsMarek Olšák2017-07-041-9/+15
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: ignore PIPE_BIND_SHARED for buffersMarek Olšák2017-07-041-2/+0
| | | | | | BO exports can't be predicted this way. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add a HUD query for getting an average GFX BO list sizeMarek Olšák2017-07-047-0/+27
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: release EGLImage on EGLImageTarget* errorPhilipp Zabel2017-07-041-0/+1
| | | | | | | | | | | | | The smapi->get_egl_image() call in st_egl_image_get_surface() stores a reference to the EGLImage's texture in stimg.texture. That reference is released via pipe_resource_reference(&stimg.texture, NULL) before stimg goes out of scope at the end of the function, but not in the error path if !is_format_supported(). Fixes: 83e9de25f325 ("st/mesa: EGLImageTarget* error handling") Cc: [email protected] Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* vc4: automake: include vc4_cl_dump.h inJuan A. Suarez Romero2017-07-042-1/+2
| | | | | | | | | Ensure vc4_cl_dump.h and $(BROADCOM_FILES) are distributed in the dist-file. This fixes `make distcheck` Reviewed-by: Emil Velikov <[email protected]>
* st/mesa: fix tessellation shaders with no support for shareable shadersMarek Olšák2017-07-031-2/+2
| | | | | | | | Broken by: b43c887a9bf1e3fb99b0dc22bfea5db81375a06e Reported by Gert Wollny. Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: enable Int64 capability (v2)Dave Airlie2017-07-032-1/+2
| | | | | | | | | I'm not 100% sure this is all wired up but it looks like it is. v2: actually enable extension. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: fix 64-bit shiftsConnor Abbott2017-07-031-3/+12
| | | | | | | | | NIR always makes the shift amount 32 bits, but LLVM asserts if the two sources aren't the same type. Zero-extend the shift amount to make LLVM happy. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: implement 64-bit packing and unpackingConnor Abbott2017-07-032-0/+32
| | | | | | | | | | | | | | | We implement the split opcodes, and tell NIR to lower the original ones. The lowering to LLVM is a little more complicated, but NIR can optimize the split ones a little better, and some NIR lowering passes that we might want to use (particularly for doubles) emit the split ones. This should fix pack/unpackDouble2x32, which seems like a bug since when we enabled the Float64 capability. It will also fix pack/unpackInt2x32 when we enable the Int64 capability. Fixes: 798ae37c ("radv: Enable Float64 support.") Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* spirv: fix OpBitcast when the src and dst bitsize are different (v3)Connor Abbott2017-07-031-1/+66
| | | | | | | | | | | | | | | Before, we were just implementing it with a move, which is incorrect when the source and destination have different bitsizes. To implement it properly, we need to use the 64-bit pack/unpack opcodes. Since glslang uses OpBitcast to implement packInt2x32 and unpackInt2x32, this should fix them on anv (and radv once we enable the int64 capability). v2: make supporting non-32/64 bit easier (Jason) v3: add another assert (Jason) Fixes: b3135c3c ("anv: Advertise shaderInt64 on Broadwell and above") Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* svga: don't call svga_texture_device_format_has_alpha() for PIPE_BUFFERBrian Paul2017-07-032-1/+5
| | | | | | | | | | | svga_texture_device_format_has_alpha() is only intended to work for texture resources, not buffer resources. This fixes a failed assertion in the svga_texture() cast function when running texture buffer tests. Also, add an assertion in svga_texture_device_format_has_alpha() to catch the issue sooner. Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix texture buffer object regressionBrian Paul2017-07-031-9/+11
| | | | | | | | | | | | With change 8aba778fa2cd98a0b5a7429d3c5057778a0c808c we stopped binding sampler objects for texture buffers. That broke our texture sample / sampler view setup code. Now, we loop over the max(num samplers, num sampler views) and handle the sampler and view information separately. For texture buffers, the sampler will be NULL but the sampler view non-null. Reviewed-by: Charmaine Lee <[email protected]>
* svga: move assertion in draw_vgpu10()Brian Paul2017-07-031-1/+1
| | | | | | | The buffer binding flags aren't ensured until after the svga_buffer_handle() call, so move the assertion after it. Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix buffer binding flags initializationBrian Paul2017-07-031-0/+6
| | | | | | | | | | | | | | | | | | | If a buffer is created/initialized with glNamedBufferData we will have no target (GL_ARRAY_BUFFER, GL_UNIFORM_BUFFER, etc) so the svga_buffer::bind_flags will be zero until we try to get the buffer handle. This patch initializes the svga_buffer::bind_flags field when it's zero. This fixes the Piglit arb_uniform_buffer_object-rendering-dsa test. Note that there's still issues in this area that'll have to be addressed in the future. For example, creating a buffer object as GL_UNIFORM_BUFFER and later using it as a vertex buffer will fail. Reviewed-by: Charmaine Lee <[email protected]>
* docs: update bug reporting guidelinesBrian Paul2017-07-031-1/+4
| | | | | Suggest attaching output of glxinfo/wglinfo. Suggest providing an apitrace.
* st/mesa: remove an obsolete commentNicolai Hähnle2017-07-031-1/+0
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove unused parameter/member of add_uniform_to_shaderNicolai Hähnle2017-07-031-6/+3
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* util/disk_cache: fix a commentNicolai Hähnle2017-07-031-1/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* glsl: simplify disable_varying_optimizations_for_ssoNicolai Hähnle2017-07-031-18/+11
| | | | | | | | | We always have stage == first and stage == last when first == last, so drop the special case. Also rephrase the comment to make the logic clearer. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]>