summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* anv: Add proper support for depth clampingJason Ekstrand2016-06-208-10/+22
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/cmd_buffer: Split emit_viewport in twoJason Ekstrand2016-06-203-13/+30
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/cmd_buffer: Set depth/stencil extent based on the imageJason Ekstrand2016-06-201-5/+5
| | | | | | | | It used to be based on the framebuffer which isn't quite right. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/cmd_buffer: Don't crash if push constants are provided for missing stagesJason Ekstrand2016-06-201-1/+1
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Do invariance propagation on SPIR-V shadersJason Ekstrand2016-06-201-0/+3
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv: Fix a harmless overflow warningChad Versace2016-06-151-1/+1
| | | | | | | | anv_pipeline_binding::index is a uint8_t, but some code assigned to it UINT16_MAX. Reviewed-by: Anuj Phogat <[email protected]> Reviewd-by: Jason Ekstrand <[email protected]>
* isl: Replace bash generator with python generatorDylan Baker2016-06-134-137/+217
| | | | | | | | | | | | | | This replaces the current bash generator with a python based generator using mako. It's quite fast and works with both python 2.7 and python 3.5, and should work with 3.3+ and maybe even 3.2. It produces an almost identical file except for a minor layout changes, and the addition of a "generated file, do not edit" warning. Cc: "12.0" <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv/pipeline: Don't dereference NULL dynamic state pointersNanley Chery2016-06-131-22/+48
| | | | | | | | | | | | | | | | Add guards to prevent dereferencing NULL dynamic pipeline state. Asserts of pCreateInfo members are moved to the earliest points at which they should not be NULL. This fixes a segfault seen in the McNopper demo, VKTS_Example09. v3 (Jason Ekstrand): - Fix disabled rasterization check - Revert opaque detection of color attachment usage Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv: Document and rename anv_pipeline_init_dynamic_state()Nanley Chery2016-06-131-3/+16
| | | | | | | | | | | | To reduce confusion, clarify that the state being copied is not dynamic. This agrees with the Vulkan spec's usage of the term. Various sections specify that the various pipeline state which have VkDynamicState enums (e.g. viewport, scissor, etc.) may or may not be dynamic. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* i965: Fix shared local memory size for Gen9+.Kenneth Graunke2016-06-122-18/+2
| | | | | | | | | | | | | | | | | | | | | Skylake changes the representation of shared local memory size: Size | 0 kB | 1 kB | 2 kB | 4 kB | 8 kB | 16 kB | 32 kB | 64 kB | ------------------------------------------------------------------- Gen7-8 | 0 | none | none | 1 | 2 | 4 | 8 | 16 | ------------------------------------------------------------------- Gen9+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | The old formula would substantially underallocate the amount of space. This fixes GPU hangs on Skylake when running with full thread counts. v2: Fix the Vulkan driver too, use a helper function, and fix the table in the comments and commit message. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* anv/entrypoints: Rework #if guardsJason Ekstrand2016-06-101-7/+9
| | | | | | | | | | | | | | | This reworks the #if guards a bit. When Emil originally wrote them, he just guarded everything. However, part of what anv_entrypoints_gen.py generates is a hash table for looking up entrypoints based on their name. This table *cannot* get out of sync between C and python regardless of preprocessor flags. In order to prevent this, this commit makes us use void pointers in the dispatch table for those entrypoints which aren't available. This means that the dispatch table size and entry order is constant and it should never get out-of-sync with the python. Signed-off-by: Jason Ekstrand <[email protected]> Acked-by: Emil Velikov <[email protected]> Cc: "12.0" <[email protected]>
* anv/entrypoints: Use the function pointer types provided by vulkan.hJason Ekstrand2016-06-101-1/+1
| | | | | | | | | This is a bit cleaner than generating the types ourselves when making the table. Signed-off-by: Jason Ekstrand <[email protected]> Acked-by: Emil Velikov <[email protected]> Cc: "12.0" <[email protected]>
* anv: Remove the PhysicalDeviceLimits FINISHMEJason Ekstrand2016-06-101-2/+0
| | | | | | | | At this point, the limits are probably more-or-less correct. If there is an invalid limit, that's a bug not a FINSHME. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline_cache: Allow for an zero-sized cacheJason Ekstrand2016-06-101-1/+4
| | | | | | | This gets ANV_ENABLE_PIPELINE_CACHE=false working again. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Store the (set, binding, index) tripple in the bind mapJason Ekstrand2016-06-105-15/+25
| | | | | | | | | | | This way the the bind map (which we're caching) is mostly independent of the pipeline layout. The only coupling remaining is that we pull the array size of a binding out of the layout. However, that size is also specified in the shader and should always match so it's not really coupled. This rendering issues in Dota 2. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/descriptor_set: Ensure that bindings are always in increasing orderJason Ekstrand2016-06-101-0/+13
| | | | | | | | | | | Since applications are allowed to specify some set of bindings which need not be dense they also need not be in order. For most things, this doesn't matter, but it could result getting the wrong dynamic offsets. This adds a quick-and-dirty sort to ensure that everything is always in increasing order of binding index. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/descriptor_set: Add a type field in debug buildsJason Ekstrand2016-06-102-0/+10
| | | | | | | | This allows for some extra validation and makes it easier to see what's going on when poking around in gdb. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/descriptor_set: Set array_size to zero for non-existant descriptorsJason Ekstrand2016-06-101-0/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/entrypoints: Stop using the C preprocessorJason Ekstrand2016-06-071-12/+2
| | | | | | | | Now that we emit guards for everything, we can just generate the files and trust build flags to keep us safe. This should also fix the tarball problems. Reviewed-by: Emil Velikov <[email protected]>
* anv/entrypoints: Emit #if guards for all platformsJason Ekstrand2016-06-071-10/+22
| | | | Reviewed-by: Emil Velikov <[email protected]>
* anv/pipeline: Add support for caching the push constant mapJason Ekstrand2016-06-061-4/+29
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* anv/entrypoints: don't go using wayland/xcb unless they are configuredDave Airlie2016-06-051-6/+9
| | | | | | | | | | | | | | The fix in: anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guards breaks things if wayland headers aren't installed. Separate things out properly to avoid that problem. [airlied: fixed up to put in pre-existing sections]. Reported-by: Arjan van de Ven Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* anv/blit: Use CLAMP_TO_EDGE for scaled blitsJason Ekstrand2016-06-031-0/+3
| | | | | | | | | | | When upscaling you can end up interpolating between the edge pixel and one past the edge. Using CLAMP_TO_EDGE seems like the most reasonable thing to do in this case. This fixes two of the new Vulkan CTS tests in dEQP-VK.api.copy_and_blit.blit_image.* Jason Ekstrand <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: "12.0" <[email protected]>
* anv/copy: Account for the anv_surface.offset when creating a blit2d_surfJason Ekstrand2016-06-031-17/+17
| | | | | | | | | This was causing problems if the user tried to copy to/from the stencil portion of a combined depth/stencil image. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Add support for early depth stencilJason Ekstrand2016-06-032-2/+17
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Silently pass tests if depth or stencil is missingJason Ekstrand2016-06-033-3/+35
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Unify gen7/8 emit_ds_stateJason Ekstrand2016-06-033-85/+60
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* genxml/gen6,7,75: s/BackFace/BackfaceJason Ekstrand2016-06-035-8/+8
| | | | | | | | This is more consistent with gen8+ Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/pipeline: Refactor specialization constant handling a bitJason Ekstrand2016-06-031-5/+4
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv/clear: Handle ClearImage on 3-D imagesJason Ekstrand2016-06-031-2/+4
| | | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
* anv: add the X related and Wayland CFLAGS to VULKAN_ENTRYPOINT_CPPFLAGSEmil Velikov2016-06-041-0/+2
| | | | | | | | | | Otherwise we will fail to find the headers in some scenarios. Cc: <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reported-by: Tobias Klausmann <[email protected]> Tested-by: Tobias Klausmann <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]>
* isl: add support for Android libmesa_isl static libraryMauro Rossi2016-06-022-0/+237
| | | | | | | | | | | | | | | | isl library is needed to build i965, libmesa_isl static library is added to fix related Android building errors. Any attempt to build libmesa_genxml as phony package module failed to deliver gen{7,75,8,9}_pack.h generated headers, needed for libmesa_isl_gen{7,75,8,9} Due to constraints in Android Build System, libmesa_genxml is built as static, at least one source is needed, so dummy.c is autogenerated for this scope, libmesa_genxml dependency is declared using LOCAL_WHOLE_STATIC_LIBRARIES, to avoid building errors due to missing genxml/gen{7,75,8,9}_pack.h headers. Cc: <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* isl: automake: don't include isl_format_layout.c in two lists.Emil Velikov2016-06-022-2/+1
| | | | | | | | | | Including the file in both ISL_FILES and ISL_GENERATED_FILES makes the actual dependency list less obvious. v2: Drop unrelated vulkan hunk (Jason). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Remove old CS local ID handlingJordan Justen2016-06-011-4/+1
| | | | | | | | | | | | | The old method pushed data for each channels uvec3 data of gl_LocalInvocationID. The new method pushes 1 dword of data that is a 'thread local ID' value. Based on that value, we can generate gl_LocalInvocationIndex and gl_LocalInvocationID with some calculations. Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* 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]>