summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* egl: fix function name in debug stringEric Engestrom2016-11-171-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* nir/spirv: Fix handling of gl_PrimitiveIdJason Ekstrand2016-11-161-2/+6
| | | | | | | | | | Before, we were always treating it as an output which bogus. The only stage in which this it can be an output is the geometry stage. In all other stages, it's an input which, in the back-end, we actually want to be a system value. Cc: "13.0" <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* anv/fence: Handle ANV_FENCE_CREATE_SIGNALED_BITJason Ekstrand2016-11-161-1/+5
| | | | | Cc: "13.0" <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* anv: Handle null in all destructorsJason Ekstrand2016-11-169-1/+65
| | | | | | | | | | This fixes a bunch of new CTS tests which look for exactly this. Even in the cases where we just call vk_free to free a CPU data structure, we still handle NULL explicitly. This way we're less likely to forget to handle NULL later should we actually do something less trivial. Cc: "13.0" <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* util/vk_alloc: Ensure NULL is handled correctly in vk_freeJason Ekstrand2016-11-161-0/+3
| | | | Reviewed-by: Dave Airlie <[email protected]>
* anv/device: Silence a 32-bit warningJason Ekstrand2016-11-161-1/+2
|
* nir: Avoid an extra NIR op in integer divide lowering.Eric Anholt2016-11-161-2/+1
| | | | | | NIR bools are ~0 for true, so ((unsigned)a >> 31) != 0 -> ((int)a >> 31). Reviewed-by: Kenneth Graunke <[email protected]>
* vc4: Try compiling our FSes in multithreaded mode on new kernels.Eric Anholt2016-11-165-2/+20
| | | | | | Multithreaded fragment shaders let us hide texturing latency by a hyperthreading-style switch to another fragment shader. This gets us up to 20% framerate improvements on glmark2 tests.
* vc4: Add support for ETC1 textures if the kernel is new enough.Eric Anholt2016-11-164-5/+18
| | | | | The kernel changes for exposing the param have now been merged, so we can expose it here.
* vc4: Fix simulator mode missing-GETPARAM debug info.Eric Anholt2016-11-161-1/+1
| | | | The value is 0 since we didn't set it, we wanted to see the param.
* vc4: Fix resource leak in register allocation failure path.Mun Gwan-gyeong2016-11-161-0/+2
| | | | | | CID 1394322 Signed-off-by: Mun Gwan-gyeong <[email protected]>
* glsl: stub out _mesa_reference_program() in standalone compilerTimothy Arceri2016-11-172-0/+12
| | | | | The follow patch will call this directly from the linker, the shader cache will also start calling these from the compiler.
* st/mesa/r200/i915/i965: move ARB program fields into a unionTimothy Arceri2016-11-1725-307/+319
| | | | | | | | | | | It's common for games to compile 2000 programs or more so at 32bits x 2000 programs x 22 fields x 2 (at least) stages This should give us something like 352 kilobytes in savings once we add some more glsl only fields. Reviewed-by: Emil Velikov <[email protected]>
* st/mesa: stop initialing Instructions and NumInstructionsTimothy Arceri2016-11-172-6/+0
| | | | | | | Since gl_program is now created with rzalloc() they should already be initialised. Reviewed-by: Emil Velikov <[email protected]>
* mesa: make use of ralloc when creating ARB asm gl_program fieldsTimothy Arceri2016-11-1714-74/+60
| | | | | | | | | | | This will allow us to move the ARB asm fields in gl_program into a union as we will be able call ralloc_free() on the entire struct when destroying the context. In this change we switch over to using ralloc for the Instructions, String and LocalParams fields of gl_program. Reviewed-by: Emil Velikov <[email protected]>
* mesa: remove unused Comment field in prog_instructionTimothy Arceri2016-11-173-38/+12
| | | | Reviewed-by: Emil Velikov <[email protected]>
* i965: get num_abos from shader_info rather than gl_linked_shaderTimothy Arceri2016-11-177-15/+24
| | | | | | This is a step towards freeing gl_linked_shader after linking. Reviewed-by: Emil Velikov <[email protected]>
* mesa/glsl: copy num_abos to gl_programTimothy Arceri2016-11-172-1/+1
| | | | | | | We should be able to free gl_linked_shader after linking in order to do so we need to switch to getting values from gl_program instead. Reviewed-by: Emil Velikov <[email protected]>
* i965: get num_images from shader_info rather than gl_linked_shaderTimothy Arceri2016-11-1714-35/+46
| | | | | | This is a step towards freeing gl_linked_shader after linking. Reviewed-by: Emil Velikov <[email protected]>
* mesa/glsl: copy num_images to gl_programTimothy Arceri2016-11-172-1/+2
| | | | | | | We should be able to free gl_linked_shader after linking in order to do so we need to switch to getting values from gl_program instead. Reviewed-by: Emil Velikov <[email protected]>
* nir: add support for counting AoA uniforms in nir_shader_gather_info()Timothy Arceri2016-11-171-2/+2
| | | | Reviewed-by: Emil Velikov <[email protected]>
* i965: only try print GLSL IR once when using INTEL_DEBUG to dump irTimothy Arceri2016-11-179-37/+21
| | | | | | | | Since we started releasing GLSL IR after linking the only time we can print GLSL IR is during linking. When regenerating variants only NIR will be available. Reviewed-by: Emil Velikov <[email protected]>
* anv/descriptor_set: Put the whole state in the state free listJason Ekstrand2016-11-161-5/+4
| | | | | | We're not really saving much by just putting the offset in there. Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv/descriptor_set: Write the state offset in the surface state free list.Jason Ekstrand2016-11-161-0/+1
| | | | | | | | | | When Kristian reworked descriptor set allocation, somehow he forgot to actually store the offset in the free list. Somehow, this completely missed CTS testing until now... This fixes all 2744 of the new 'dEQP-VK.texture.filtering.* tests in the latest CTS. Cc: "12.0 13.0" <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* compiler: remove now unused copy_shader_info() declarationTimothy Arceri2016-11-171-7/+0
| | | | | | Left over from 4ac66861 Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: include shader_enums.h in shader_info.hTimothy Arceri2016-11-171-0/+2
| | | | | | We make use of some enums here. Reviewed-by: Jason Ekstrand <[email protected]>
* swr: [rasterizer core] fix clear with multiple color attachmentsTim Rowley2016-11-166-52/+40
| | | | | | | | Fixes fbo-mrt-alphatest v2: styling fixes Reviewed-by: Bruce Cherniak <[email protected]>
* Partial revert "i965: "Fix" aux offsets"Ben Widawsky2016-11-161-2/+1
| | | | | | | | | This partially reverts commit 0d241085f723402120b4b47e939fe77020a16d80. HiZ buffer cannot do this properly now, and it's not required, so remove it. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: "Fix" aux offsetsBen Widawsky2016-11-161-2/+3
| | | | | | | | | | | When 1 BO is used for aux data, it needs to point to the correct offset, which will not be the BOs offset but instead an offset from the BOs offset. Since today there are always multiple BOs for aux, this doesn't actually change anything. Cc: Jason Ekstrand <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/blorp: Handle VK_ATTACHMENT_UNUSED in CmdClearAttachmentsJason Ekstrand2016-11-161-0/+8
| | | | | | | | | | | | | | | | | | From the Vulkan 1.0.29 spec for vkCmdClearAttachments: "If the subpass’s depth/stencil attachment is VK_ATTACHMENT_UNUSED, then the clear has no effect." and "If colorAttachment is VK_ATTACHMENT_UNUSED then the clear has no effect." I have no idea why it's spec'd this way; it seems very anti-Vulkan to me, but that's what it says and it's really not much work to support. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* Allocate a null state whenever there is depth/stencilJason Ekstrand2016-11-161-9/+10
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv: Set framebuffer to NULL in secondary command buffersJason Ekstrand2016-11-161-2/+1
| | | | | | | | Nothing that is allowed to be called within a secondary now relies on the framebuffer. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/blorp: Use the new clear_attachments entrypoint for attachment clearsJason Ekstrand2016-11-161-41/+50
| | | | | | | | This allows us to re-use the surface states emitted from the Vulkan driver instead of blorp creating its own. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/blorp: Break the guts of alloc_binding_table into a shared helperJason Ekstrand2016-11-163-16/+33
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv: Bring back anv_cmd_buffer_emit_state_base_addressJason Ekstrand2016-11-162-0/+20
| | | | | | | This reverts most of commit 52904ba85c7e1e3092601e3497bfbc246b00b84a. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add a clear_attachments entrypointJason Ekstrand2016-11-163-2/+173
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add capability to use pre-baked binding tablesJason Ekstrand2016-11-162-20/+27
| | | | | | | | | When a pre-baked binding table is requested, no binding table is created, instead the binding table offset (relative to surface state base address) provided by the user is used verbatim. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add support for vertex shadersJason Ekstrand2016-11-163-6/+82
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Use an actual chunk of vertex buffer for the VUE headerJason Ekstrand2016-11-161-33/+34
| | | | | | | | | | | We're about to start passing other things in as a sort of "VS header" for vertex shaders and we need a place to put them. Since we want the instance id to be one of them, it makes sense to have one vec4 that's either VUE header or VS header. Always uploading some handy zeros makes the code a bit simpler. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* blorp/exec: Use uint32_t for copying varying dataJason Ekstrand2016-11-161-2/+2
| | | | | | | | Some things may not be floats and intel CPUs are known for mangling bits when a float type is used for copying integers. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Handle NIR clear inputs the same way as blit inputsJason Ekstrand2016-11-163-11/+17
| | | | | | | | By using offsetof() we can ensure that adding fiels to wm_inputs is always safe as long as we maintain alignment. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Remove NIR support for uniformsJason Ekstrand2016-11-161-23/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add a shader type to make keys more uniqueJason Ekstrand2016-11-163-7/+18
| | | | | | | | | | Depending on how the driver using blorp implements its shader caching, there is a small chance of shader collisions due to identical keys between blit and clear programs. Adding a small shader type at the top of the key alleviates this problem. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Make the number of samples an explicit parameterJason Ekstrand2016-11-165-9/+19
| | | | | | | | | Previously, we always inferred it from params->dst which meant that references to params->dst were scattered all throughout the state upload code. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/cmd_buffer: Stop relying on the framebuffer for 3DSTATE_SF on gen7Jason Ekstrand2016-11-161-11/+32
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv: Rework the way render target surfaces are allocatedJason Ekstrand2016-11-164-126/+180
| | | | | | | | | | | | | | | This commit moves the allocation and filling out of surface state from CreateImageView time to BeginRenderPass time. Instead of allocating the render target surface state as part of the image view, we allocate it in the command buffer state at the same time that we set up clears. For secondary command buffers, we allocate memory for the surface states in BeginCommandBuffer but don't fill them out; instead, we use our new SOL-based memcpy function to copy the surface states from the primary command buffer. This allows us to handle secondary command buffers without the user specifying the framebuffer ahead-of-time. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/cmd_buffer: Expose add_surface_state_reloc as an inline helperJason Ekstrand2016-11-162-15/+17
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/cmd_buffer: Use the surface state alloc helper in null_surface_stateJason Ekstrand2016-11-161-1/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv: Add a helper for doing buffer copies with nothing but VF and SOL.Jason Ekstrand2016-11-163-0/+239
| | | | | | | | | | | | This method of doing copies has the advantage of touching very little of the GPU state. While it does disable all the shader stages, it doesn't have to blow away binding tables, viewports, scissors, or any other bits of dynamic state other than VBO 32 which is already reserved. All of the state that it does touch is contained within a pipeline anyway so that's the only thing that has to be dirtied. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/genxml: Add SO_WRITE_OFFSET registers for gen7-9Jason Ekstrand2016-11-164-0/+64
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>