aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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]>
* intel/isl: Add some basic info about RENDER_SURFACE_STATE to isl_deviceJason Ekstrand2016-11-166-62/+69
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/pipeline: Use get_scratch_space/address for compute shadersJason Ekstrand2016-11-161-9/+7
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv: Move INTERFACE_DESCRIPTOR_DATA setup to the pipelineJason Ekstrand2016-11-163-27/+38
| | | | | | | | | | There are a few dynamic bits, namely binding table and sampler addresses, but most of it is static and really belongs in the pipeline. It certainly doesn't belong in flush_compute_descriptor_set. We'll use the same state merging trick we use for gen7 DEPTH_STENCIL. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Roll genX_pipeline_util.h into genX_pipeline.cJason Ekstrand2016-11-163-1296/+1266
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Unify graphics_pipeline_createJason Ekstrand2016-11-165-213/+80
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipline: Re-order state emission and make it consistentJason Ekstrand2016-11-162-8/+5
| | | | | | | | This commit makes both gen7 and gen8 pipeline setup emit state packets in exactly the same order. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Rework the 3DSTATE_VF_TOPOLOGY helperJason Ekstrand2016-11-162-11/+9
| | | | | | | It gets a new name and moved to genX_pipeline_util.h. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Move 3DSTATE_PS_EXTRA setup into a helperJason Ekstrand2016-11-162-27/+33
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Unify 3DSTATE_WM emissionJason Ekstrand2016-11-163-70/+55
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* intel/genxml: Make 3DSTATE_WM more consistent across gensJason Ekstrand2016-11-168-22/+52
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Unify 3DSTATE_PS emissionJason Ekstrand2016-11-163-102/+72
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline/gen7: Properly set 3DSTATE_PS::DualSourceBlendEnableJason Ekstrand2016-11-161-1/+1
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* intel/genxml: Make some 3DSTATE_PS fields more consistentJason Ekstrand2016-11-165-16/+16
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Make emit_3dstate_sbe safe to call without a FSJason Ekstrand2016-11-163-6/+10
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Unify 3DSTATE_GS emissionJason Ekstrand2016-11-163-109/+75
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline/gen8: Set 3DSTATE_GS::InstanceControlJason Ekstrand2016-11-161-0/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* intel/genxml: Make some 3DSTATE_GS fields more consistentJason Ekstrand2016-11-167-14/+14
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Unify 3DSTATE_VS emissionJason Ekstrand2016-11-163-82/+89
| | | | | | | | | With this commit, a few fields are now specified on gen7 which weren't before. However, the values specified are zero which is the default so the final hardware packet remains the same. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline/gen8: Enable VS statisticsJason Ekstrand2016-11-161-1/+1
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Stop claiming to support running without a vertex shaderJason Ekstrand2016-11-162-83/+69
| | | | | | | | | | | | | From the Vulkan spec version 1.0.32 docs for vkCreateGraphicsPipelines: The stage member of one element of pStages must be VK_SHADER_STAGE_VERTEX_BIT Since a vertex shader is always required, this hasn't been used since we deleted meta. Let's get rid of the complexity. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* intel/genxml: Make some VS/GS fields consistent across gensJason Ekstrand2016-11-164-12/+12
| | | | | | | We use the names from gen8+ Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Get rid of the kernel pointer fieldsJason Ekstrand2016-11-167-56/+27
| | | | | | | | | | Now that we have anv_shader_bin, they're completely redundant with other information we have in the pipeline. For vertex shaders, we also go through way too much work to put the offset in one or the other field and then look at which one we put it in later. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* anv/pipeline: Set correct binding table and sampler countsJason Ekstrand2016-11-163-8/+49
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* mesa: if MESA_DEBUG=context, create a debug contextBrian Paul2016-11-164-2/+27
| | | | | | | | | | | | | | | | | | | A number of drivers report useful debug/perf information accessible through GL_ARB_debug_output and with debug contexts (i.e. setting the GLX_CONTEXT_DEBUG_BIT_ARB flag). But few applications actually use the GL_ARB_debug_output extension. This change lets one set the MESA_DEBUG env var to "context" to force-set a debug context and report debug/perf messages to stderr (or whatever file MESA_LOG_FILE is set to). This is a useful debugging tool. The small change in st_api_create_context() is needed so that st_update_debug_callback() gets called to hook up the driver debug callbacks when ST_CONTEXT_FLAG_DEBUG was not set, but MESA_DEBUG=context. v2: use %.*s format string instead of allocating temporary buffer. Reviewed-by: Nicolai Hähnle <[email protected]>
* u_simple_shaders: try to un-break the Windows buildNicolai Hähnle2016-11-161-2/+3
| | | | Acked-by: Edward O'Callaghan <[email protected]>