summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* anv: Support new local ID generation & cross-thread constantsJordan Justen2016-06-014-48/+42
| | | | | | | | | | | | | | | | | The cross thread constant support appears on Haswell. It allows us to upload a set of uniform data for all threads without duplicating it per thread. We also support per-thread data which allows us to store a per-thread ID in one of the uniforms that can be used to calculate the gl_LocalInvocationIndex and gl_LocalInvocationID variables. v4: * Support the old local ID push constant layout as well (Jason) Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Store number of threads in brw_cs_prog_dataJordan Justen2016-06-016-12/+8
| | | | | | Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add uniform for a CS thread local base IDJordan Justen2016-06-011-0/+4
| | | | | | | | | | | | v4: * Force thread_local_id_index to -1 for now, and have fs_visitor::setup_cs_payload look at thread_local_id_index. This enables us to more easily cut over from the old local ID layout to the new layout, as suggested by Jason. Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Don't use python 3Dylan Baker2016-05-311-2/+2
| | | | | | | | | | | Now there are not files that require python 3, so for now just remove the python 3 dependency and use python 2. I think the right plan is to just get all of the python ready for python 3, and then use whatever python is available. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* genxml: change chbang to python 2Dylan Baker2016-05-311-1/+1
| | | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* genxml: use the isalpha method rather than str.isalpha.Dylan Baker2016-05-311-1/+1
| | | | | | | | | This fixes gen_pack_header to work on python 2, where name[0] is unicode not str. Signed-off-by: Dylan Bake <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* genxml: require future imports for python2 compatibility.Dylan Baker2016-05-311-0/+3
| | | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* genxml: mark re strings as rawDylan Baker2016-05-311-2/+2
| | | | | | | | This is a correctness issue. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* genxml: Make classes descendants of objectDylan Baker2016-05-311-4/+4
| | | | | | | | | This is the default in python3, but in python2 you get old style classes. No one likes old-style classes. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* genxml: mark gen_pack_header.py as encoded in utf-8Dylan Baker2016-05-311-0/+1
| | | | | | | | | There is unicode in this file, and I'm actually surprised that the python interpreter hasn't gotten grumpy. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> cc: 12.0 <[email protected]>
* anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guardsEmil Velikov2016-05-311-0/+28
| | | | | | | | | | | | | | The generated sources should follow the example set by the vulkan headers and our non-generated code. Namely: the code for all supported platforms should be available, each one guarded by its respective VK_USE_PLATFORM_*_KHR macro. v2: Reword commit message. Cc: Mark Janes <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96285 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v1 over IRC)
* automake: move the git_sha1.h rule a level upEmil Velikov2016-05-301-1/+1
| | | | | | | | | | | | | | | This way we can reuse the header from other places like - src/intel/vulkan and src/gallium. Only the former is hooked up atm. Make sure .gitignore is updated, as well as all the users (the mesa code does not need any changes). Also ensure that the file is always created by adding it to the BUILT_SOURCES target. Cc: Jason Ekstrand <[email protected]> Cc: Kristian Høgsberg Kristensen <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* anv: automake: don't forget to cleanup dev_icd.jsonEmil Velikov2016-05-301-1/+1
| | | | | | | | | | Otherwise `make distcheck' will barf at us as the file is dangling. Ideally this should be part of the clean-local hook, although we include install-lib-links.mk which already has one. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: automake: bring back VULKAN_ENTRYPOINT_CPPFLAGSEmil Velikov2016-05-301-2/+6
| | | | | | | | | | | | | We should not have removed them in the first place. There's a subtle difference between generating the complete sources and using them which was not obvious as we nuked them. Without this, the release tarball ends up without various hunks of the generated sources, thus things fail at a later stage as we attempt to build them. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: automake: ship the json files in the release tarballEmil Velikov2016-05-301-1/+3
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: add isl_priv.h to the sources listEmil Velikov2016-05-301-0/+1
| | | | | | | | Otherwise it will be missing from the release tarball. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: move the sources lists to Makefile.sourcesMauro Rossi2016-05-302-32/+39
| | | | | | | [Emil Velikov: use the file in the autoconf build] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: automake: list builddir before srcdir in the includes listEmil Velikov2016-05-301-4/+3
| | | | | | | | | As seen elsewhere - we want to include the freshly built sources as opposed the the (likely) stale ones in the srcdir. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: automake: flatten the tests rulesEmil Velikov2016-05-301-9/+4
| | | | | | | | | | | Fold the unneeded extra variable tests_ldadd, the explicit sources section (single file with the default extension) and flip the check_PROGRAMS <> TESTS order (TESTS includes scripts, while check_PROGRAMS is binaries only). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: automake: remove unneeded install-lib-links.mk includeEmil Velikov2016-05-301-2/+0
| | | | | | | | | | One uses the makefile to create compatibility symlinks (to $top_builddir/libs) for shared libraries/modules. As we don't create any here, there's no need to include the file. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: automake: remove unneeded SUBDIRSEmil Velikov2016-05-301-3/+0
| | | | | | | | | As we do not include any other subdirs but self, we don't need to set it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* genxml: move the sources (headers) list to Makefile.sourcesMauro Rossi2016-05-302-6/+9
| | | | | | [Emil Velikov: use the file in the autoconf build] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* anv: bail out if anv_wsi_init() failsEmil Velikov2016-05-301-1/+3
| | | | | | | | | | | | | | Otherwise we'll end up setting up a device with no winsys integration. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> --- Hard-coding the rendernode name in anv_physical_device_init() is a bad idea really. We could/should be using drmGetDevices() to get info on all the devices (master/render/etc. node names, pci location etc.) and apply our heuristics on top of that. That can come up as a follow up change.
* anv: resolve wayland-only buildEmil Velikov2016-05-301-0/+2
| | | | | | | | | | | Ensure that the final X11/XCB hunk is guarded by the correct macro. Otherwise we'll require the symbol even when building without said platform. Cc: Cedric Sodhi <[email protected]> Reported-by: Cedric Sodhi <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Fix use of uninitialized variable.Robert Foss2016-05-301-2/+6
| | | | | | | | | | | | | The return variable was not set for failure paths. It has now been changed to VK_ERROR_INITIALIZATION_FAILED for failure paths. Coverity: 1358944 Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov: rebase against master, s/vulkan/anv/] Signed-off-by: Emil Velikov <[email protected]>
* anv/cmd_buffer: Don't delete command buffers in ResetCommandPool()Ronie Salgado2016-05-271-19/+18
| | | | | | | v2 (Jason Ekstrand): Destroy command buffers in DestroyCommandPool(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95034 Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Try the first 8 render nodes instead of just renderD128Jason Ekstrand2016-05-271-4/+10
| | | | | | | | This way, if you have other cards installed, the Vulkan driver will still work. No guarantees about WSI working correctly but offscreen should at least work. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95537
* anv: strdup the device path into the physical deviceJason Ekstrand2016-05-272-2/+4
| | | | | This way we don't have to assume that the string coming in is a piece of constant data that exists forever.
* anv/formats: Exit early for unsupported formatsJason Ekstrand2016-05-271-2/+3
|
* anv/formats: Map VK_FORMAT_UNDEFINED to ISL_FORMAT_UNSUPPORTEDJason Ekstrand2016-05-271-1/+1
| | | | | | At one point in time, we may have used the mapping to ISL_FORMAT_RAW for certain buffer surfaces but that time has long since passed. This fixes a bug where doing format queries on VK_FORMAT_UNDEFINED would assert-fail.
* anv/clear: Remove an unused variableJason Ekstrand2016-05-271-1/+0
|
* anv: Emit DRAWING_RECTANGLE once at driver initializationJason Ekstrand2016-05-272-13/+9
| | | | | | | | | | Also, we don't actually need it for clipping because meta always colors inside the lines and, for all other operations, the user is required to set a scissor. Since DRAWING_RECTANGLE stalls the GPU, we want to emit it as little as possible. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv/cmd_buffer: Only emit PIPE_CONTROL on-demandJason Ekstrand2016-05-276-70/+140
| | | | | | | | | | | This is in contrast to emitting it directly in vkCmdPipelineBarrier. This has a couple of advantages. First, it means that no matter how many vkCmdPipelineBarrier calls the application strings together it gets one or two PIPE_CONTROLs. Second, it allow us to better track when we need to do stalls because we can flag when a flush has happened and we need a stall. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* genxml: Make PIPE_CONTROL::CommandStreamerStallEnable a booleanJason Ekstrand2016-05-275-5/+5
| | | | | | | This has been declared as a uint since SNB but it's only one bit. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv/clear: Only clear the render area when doing subpass clearsJason Ekstrand2016-05-273-4/+3
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv: Move push constant allocation to the command bufferJason Ekstrand2016-05-275-44/+71
| | | | | | | | | | Instead of blasting it out as part of the pipeline, we put it in the command buffer and only blast it out when it's really needed. Since the PUSH_CONSTANT_ALLOC commands aren't pipelined, they immediately cause a stall which we would like to avoid. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* isl: Fix some tautological-compare warningsBen Widawsky2016-05-262-2/+10
| | | | | | | | | | | | Fixes: isl.c:62:22: warning: self-comparison always evaluates to true [-Wtautological-compare] assert(ISL_DEV_GEN(dev) == dev->info->gen); ^~ isl.c:63:33: warning: self-comparison always evaluates to true [-Wtautological-compare] assert(ISL_DEV_USE_SEPARATE_STENCIL(dev) == dev->use_separate_stencil); Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* anv: Stop linking against libmesa.la and libdri_test_stubs.laJason Ekstrand2016-05-262-4/+3
| | | | | | | | This brings the final size of an optimized non-debug build of the Vulkan driver down to 2.9 MB as opposed to 8.7 MB for the dri driver. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* isl: Mark default cases unreachable.Matt Turner2016-05-251-2/+2
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* isl: Remove useless qualifier from return type.Matt Turner2016-05-251-1/+1
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* anv/formats: Use isl_format_supports* for format introspectionJason Ekstrand2016-05-231-22/+19
|
* isl: Add per-gen format introspectionJason Ekstrand2016-05-232-0/+399
| | | | | | This is just a copy-and-paste from brw_surface_formats.c. For the supports_vertex_fetch function, we do a bit more work so that it properly handles Bay Trail.
* isl: Add the ISL_FORMAT_R32G32_FLOAT_LD formatJason Ekstrand2016-05-232-0/+2
|
* isl: Add support for quering the string name of a formatJason Ekstrand2016-05-232-1/+9
|
* anv/formats: Make alpha blending a property of render targetsNanley Chery2016-05-231-4/+2
| | | | | | | | In agreement with the SNB PRM, alpha blending is a property that render targets may or may not support. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: remove define _DEFAULT_SOURCEEmil Velikov2016-05-233-6/+0
| | | | | | | The build systems already add this as applicable. There's no need to have this in the source file. Signed-off-by: Emil Velikov <[email protected]>
* vk/intel: use negative VK_NO_PROTOTYPES schemeEric Engestrom2016-05-231-1/+0
| | | | | | | | | | 3d0fac7aca237bbe8ed8e2a362d3b42d0ef8c46c changed all VK_PROTOTYPES to VK_NO_PROTOTYPES This brings the Intel header in line with the rest of the Vulkan code. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/nir_apply_pipeline_layout: Pass the nir_src from the nir_tex_srcEduardo Lima Mitev2016-05-211-1/+1
| | | | | | | nir_instr_rewrite_src() expects a nir_src and it is currently being fed a nir_tex_src. This will crash something. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Delete brw_wm_prog_key::render_to_fbo and drawable_height.Kenneth Graunke2016-05-201-4/+0
| | | | | | | | | | | | Now that we handle flipping and other gl_FragCoord transformations via a uniform, these key fields have no users. This patch actually eliminates the associated recompiles. The Tomb Raider benchmark's minimum FPS increases from ~1 FPS to a reasonable number. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965, anv: Use NIR FragCoord re-center and y-transform passes.Kenneth Graunke2016-05-201-0/+5
| | | | | | | | | | | | | | This handles gl_FragCoord transformations and other window system vs. user FBO coordinate system flipping by multiplying/adding uniform values, rather than recompiles. This is much better because we have no decent way to guess whether the application is going to use a shader with the window system FBO or a user FBO, much less the drawable height. This led to a lot of recompiles in many applications. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>