summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vk: Use consistent names for anv_cmd_state dirty bitsChad Versace2015-10-206-62/+63
| | | | | | | | | | | | Prefix all anv_cmd_state dirty bit tokens with ANV_CMD_DIRTY. For example: old -> new ANV_DYNAMIC_VIEWPORT_DIRTY -> ANV_CMD_DIRTY_DYNAMIC_VIEWPORT ANV_CMD_BUFFER_PIPELINE_DIRTY -> ANV_CMD_DIRTY_PIPELINE Change type of anv_cmd_state::dirty and ::compute_dirty from uint32_t to the self-documenting type anv_cmd_dirty_mask_t.
* anv/pipeline: Fix requirement for depthstencil stateChad Versace2015-10-201-27/+44
| | | | | | | | | | | | | | | The Vulkan spec allows VkGraphicsPipelineCreateInfo::pDepthStencilState to be NULL when the pipeline's subpass contains no depthstencil attachment (see spec quote below). anv_pipeline_init_dynamic_state() required it unconditionally. This path fixes anv_pipeline_init_dynamic_state() to access pDepthStencilState only when there is a depthstencil attachment. From the Vulkan spec (20 Oct 2015, git-aa308cb) pDepthStencilState [...] may only be NULL if renderPass and subpass specify a subpass that has no depth/stencil attachment.
* anv/pipeline: Validate VkGraphicsPipelineCreateInfoChad Versace2015-10-201-0/+49
| | | | | | | | | The Vulkan spec (20 Oct 2015, git-aa308cb) states that some fields of VkGraphicsPipelineCreateInfo are required under certain conditions. Add a new function, anv_pipeline_validate_create_info() that asserts the requirements hold. The assertions helped me discover bugs in Crucible and anv_meta.c.
* anv: Define anv_validate macroChad Versace2015-10-201-0/+10
| | | | | If a block of code is annotated with anv_validate, then the block runs only in debug builds.
* vk/meta: Add required renderpass to pipelineChad Versace2015-10-202-0/+8
| | | | | | The Vulkan spec (20 Oct 2015, git-aa308cb) requires that VkGraphicsPipelineCreateInfo::renderPass be a valid handle. To satisfy that, define a static dummy render pass used for all meta operations.
* vk/meta: Add required multisample state to pipelineChad Versace2015-10-201-0/+12
| | | | | The Vulkan spec (20 Oct 2015, git-aa308cb) requires that VkGraphicsPipelineCreateInfo::pMultisampleState not be NULL.
* anv/compiler: Remove irrelevant wm key setupJason Ekstrand2015-10-191-64/+0
| | | | | Most of this applies to Iron Lake and prior only. While we're at it, we get rid of the legacy GL shading model code.
* anv/compiler: Get rid of legacy shader key setupJason Ekstrand2015-10-191-27/+2
| | | | | | Most of the shader key setup we did was for pre-Sandybridge and the stuff for SNB+ wasn't in the key setup. That stuff still isn't there but at least we've left ourselves notes for now.
* anv/compiler: Delete legacy clipping codeJason Ekstrand2015-10-191-35/+2
| | | | | This is a Vulkan driver. We don't need legacy clipping stuff and, even if we did, we don't plan on supporting pre-Sandybridge anyway.
* anv/compiler: Remove unneeded wm prog data setupJason Ekstrand2015-10-191-97/+0
| | | | | As of upstream mesa changes, brw_compile_fs does this for us so there's no need to have the code in the Vulkan driver anymore.
* nir/spirv: Use the new nir_variable helpersJason Ekstrand2015-10-191-39/+11
|
* nir/spirv: Handle builtins in OpAccessChainJason Ekstrand2015-10-191-49/+12
| | | | | | | | | | | | | Previously, we were trying to handle them later when loading. However, at that point, you've already lost information and it's harder to handle certain corner-cases. In particular, if you have a shader that does gl_PerVertex.gl_Position.x = foo we have trouble because we see the .x and we don't know that we're in gl_Position. If we, instead, handle it in OpAccessChain, we have all the information we need and we can silently re-direct it to the appropreate variable. This also lets us delete some code which is a nice side-effect.
* Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-10-19324-6881/+10216
|\
| * i965/fs: Localize variables' scopes.Matt Turner2015-10-191-8/+5
| |
| * i965/fs: Consider type mismatches in saturate propagation.Matt Turner2015-10-191-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NIR considers bcsel to produce and consume unsigned types, leading to SEL instructions operating on unsigned types when the data is really floating-point. Previous to this patch, saturate propagation would happily transform (+f0) sel g20:UD, g30:UD, g40:UD mov.sat g50:F, g20:F into (+f0) sel.sat g20:UD, g30:UD, g40:UD mov g50:F, g20:F But since the meaning of .sat is dependent on the type of the destination register, this is not valid. Instead, allow saturate propagation to change the types of dest/source on instructions that are simply copying data in order to propagate the saturate modifier. Fixes bad code gen in 158 programs. Reviewed-by: Jason Ekstrand <[email protected]>
| * i965: Extract can_change_source_types() functions.Matt Turner2015-10-196-27/+30
| | | | | | | | | | | | | | | | | | Make them members of fs_inst/vec4_instruction for use elsewhere. Also fix the fs version to check that dst.type == src[1].type and for !saturate. Reviewed-by: Jason Ekstrand <[email protected]>
| * i965/vs: Move URB entry_size and read_length calculations to compile_vsJason Ekstrand2015-10-192-34/+34
| | | | | | | | Reviewed-By: Eduardo Lima Mitev <[email protected]>
| * i965: Move the entire compiler API into a single fileJason Ekstrand2015-10-1910-619/+665
| | | | | | | | | | | | | | | | | | | | | | At this point, the compiler API has been substantially simplified. In the spirit of Kristian's making a compiler library, this commit makes a single header file that contains, more-or-less, the entire compiler API. There's still a bit of cleanup to do particularly in the area of geometry shaders. However, this gets us much closer to having a separate compiler. Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965: Rename brw_foo_emit to brw_compile_fooJason Ekstrand2015-10-1911-66/+67
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/fs: Move some of the prog_data setup into brw_wm_emitJason Ekstrand2015-10-192-98/+100
| | | | | | | | | | | | | | | | This commit moves the common/modern stuff. Some legacy stuff such as setting use_alt_mode was left because it needs to know whether or not we're an ARB program. Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/cs: Rework cs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-29/+42
| | | | | | | | | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/gs: Rework gs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-40/+29
| | | | | | | | | | | | | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. Unfortunately, we still have to pass in the gl_shader_program for gen6 because it's needed for transform feedback. Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/vs: Rework vs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-49/+49
| | | | | | | | | | | | | | | | | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. v2 (Jason Ekstrand): - Patch use_legacy_snorm_formula through as a function argument rather than trying to go through the shader key. Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/fs: Rework wm_fs_emit to take a nir_shader and a brw_compilerJason Ekstrand2015-10-193-39/+47
| | | | | | | | | | | | | | This commit removes all dependence on GL state by getting rid of the brw_context parameter and the GL data structures. Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965: Use a const nir_shader in backend_shaderJason Ekstrand2015-10-1911-12/+12
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/vec4: Remove gl_program and gl_shader_program from the generatorJason Ekstrand2015-10-194-29/+20
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/fs: Remove the gl_program from the generatorJason Ekstrand2015-10-195-9/+5
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * nir/info: Add a few bits of info for fragment shadersJason Ekstrand2015-10-193-0/+29
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * nir/info: Add compute shader local size to nir_shader_infoJason Ekstrand2015-10-192-0/+12
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * nir/info: Move the GS info into a stage-specific info unionJason Ekstrand2015-10-192-8/+18
| | | | | | | | | | | | | | | | This way we can have other stage-specific info without consuming too much extra space. While we're at it, we make sure that the geometry info is only set if we're actually a goemetry shader. Reviewed-by: Topi Pohjolainen <[email protected]>
| * mesa: Move gl_frag_depth_layout from mtypes.h to shader_enums.hJason Ekstrand2015-10-192-18/+17
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * nir: Add a label to nir_shader_infoJason Ekstrand2015-10-193-0/+7
| | | | | | | | Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/asm: Explicitly use a nir_instr for IR annotationsJason Ekstrand2015-10-194-19/+5
| | | | | | | | | | | | | | Now that everything goes through NIR, we don't need this to be a void pointer anymore. Reviewed-by: Topi Pohjolainen <[email protected]>
| * scons: Build nir/glsl_types.cpp once.Jose Fonseca2015-10-198-29/+8
| | | | | | | | | | | | | | | | | | | | | | | | Undoes early hacks, and ensures nir/glsl_types.cpp is built once, and only once. The root problem is that SCons doesn't know about NIR nor any source file in the NIR_FILES source list. Tested with libgl-gdi and libgl-xlib scons targets. Reviewed-by: Brian Paul <[email protected]>
| * svga: fix incorrect round-down arithmeticBrian Paul2015-10-191-1/+1
| | | | | | | | | | | | | | | | | | Spotted by Roland. Luckily, this code should never really be hit since the const buffer size and offset should already be multiples of 16. I could probably add more assertions to that effect, but let's just fix the arithmetic for now. Reviewed-by: Roland Scheidegger <[email protected]>
| * glsl: fix segfault when indirect indexing a buffer variable which is an arraySamuel Iglesias Gonsalvez2015-10-191-1/+2
| | | | | | | | | | | | | | Fixes a regression added by bb5aeb854915ba67abc56257f830d002c956439e. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
| * st/va: Added support for NV12 to IYUV conversion in vlVaGetImageIndrajit Das2015-10-191-3/+5
| | | | | | | | Reviewed-by: Christian König <[email protected]>
| * st/va: Used correct parameter to derive the value of the "h" variable in ↵Indrajit Das2015-10-191-1/+1
| | | | | | | | | | | | | | | | vlVaCreateImage Cc: "11.0" <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
| * glsl_to_tgsi: Use {Num}UniformBlocks instead of {Num}BufferInterfaceBlocksIago Toral Quiroga2015-10-191-2/+2
| | | | | | | | | | | | | | The latter holds both UBOs and SSBOs, but here we only want UBOs. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
| * st/mesa: Use {Num}UniformBlocks instead of {Num}BufferInterfaceBlocksIago Toral Quiroga2015-10-191-2/+2
| | | | | | | | | | | | | | The latter holds both UBOs and SSBOs, but here we only want UBOs. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
| * i965: Do not use NumBufferInterfaceBlocksIago Toral Quiroga2015-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | This is the only place in the driver where we use this. Since we now work with separate index spaces, always use NumUniformBlocks and NumShaderStorageBlocks instead of NumBufferInterfaceBlocks to be more consistent with the rest of the code. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
| * main: GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH is about UBOS, not SSBOsIago Toral Quiroga2015-10-191-2/+2
| | | | | | | | | | Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
| * main: Use NumUniformBlocks to count UBOsIago Toral Quiroga2015-10-191-5/+1
| | | | | | | | | | | | | | | | | | Now that we have separate index spaces for UBOs and SSBOs we do not need to iterate through BufferInterfaceBlocks any more, we can just take the UBO count directly from NumUniformBlocks. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
| * ilo: set VME for 3DSTATE_PSChia-I Wu2015-10-181-1/+6
| | | | | | | | | | When the bit is not set, we can see sampling artifacts on triangle edges when the mip filter is not GEN6_MIPFILTER_NONE.
| * ilo: ignore prefer_linear_threshold when zeroChia-I Wu2015-10-182-3/+3
| | | | | | | | This was the intended behavior but it did not work as intended until now.
| * ilo: remove some unused kernel paramsChia-I Wu2015-10-182-22/+0
| |
| * ilo: remove unused ilo_shader_get_type()Chia-I Wu2015-10-182-12/+0
| |
| * ilo: remove u_debug.h inclusion from ilo_core.hChia-I Wu2015-10-182-1/+2
| | | | | | | | Move it to ilo_debug.h.
| * ilo: remove u_memory.h inclusion from ilo_core.hChia-I Wu2015-10-183-1/+3
| | | | | | | | We do not make allocations generally in the core.
| * nvc0: do not bind input params at compute state init on FermiSamuel Pitoiset2015-10-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like binding a constant buffer on compute overwrites the 3D state. To avoid that, we already re-bind all the 3D constant buffers after launching a compute grid but this is not enough. Binding the constant buffer of input parameters for the compute state at initialization corrupts the 3D constant buffers, and it's just useless to bind it because this is not needed until we really launch a grid. This fixes some piglit regressions related to interpolation tests introduced in "nvc0: enable compute support by default on Fermi". Fixes: 00d6186 (nvc0: enable compute support by default on Fermi) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>