summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* intel: genxml: add RING_BUFFER_CTL registersLionel Landwerlin2017-04-045-0/+272
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: genxml: add FAULT_REG registerLionel Landwerlin2017-04-045-0/+206
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: genxml: add gen7 ERR_INT registerLionel Landwerlin2017-04-042-0/+22
| | | | | | | v2: add register to gen7.5 (Matt) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: genxml: add ACTHD registersLionel Landwerlin2017-04-042-0/+32
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: genxml: add GFX_ARB_ERROR_RPT registerLionel Landwerlin2017-04-045-0/+73
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: genxml: add INSTDONE registersLionel Landwerlin2017-04-045-0/+387
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* android: intel: genxml: fix genX_xml.h generation rulesMauro Rossi2017-04-041-0/+5
| | | | | | | | | | | | | Recent changes in Makefile.sources merged the aubinator files in a unique list of generated files and genxml/genX_xml.h is now needed to avoid the following building error: ninja: error: '.../genxml/genX_xml.h', needed by '.../genxml/genX_xml.h', missing and no known rule to make it build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed Fixes: 0f83c05 "intel: genxml: compress all gen files into one" Acked-by: Lionel Landwerlin <[email protected]>
* intel/vec4: Add some fall through commentsJason Ekstrand2017-04-031-0/+4
| | | | Reviewed-by: Matt Turner <[email protected]>
* anv: Implement VK_KHR_incremental_presentJason Ekstrand2017-04-033-2/+15
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* vulkan/wsi: Plumb present regions through the common codeJason Ekstrand2017-04-031-1/+2
| | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Acked-by: Dave Airlie <[email protected]>
* aubinator/gen_decoder/i965: decode instructions from dword 0Lionel Landwerlin2017-04-033-8/+20
| | | | | | | | | Some packets like 3DSTATE_VF_STATISTICS, 3DSTATE_DRAWING_RECTANGLE, 3DPRIMITIVE, PIPELINE_SELECT, etc... have configurable fields in dword0, we probably want to print those. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: gen_decoder: store pointer to current decoded field in iteratorLionel Landwerlin2017-04-032-25/+26
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: genxml: fix out of tree buildsLionel Landwerlin2017-03-311-2/+2
| | | | | | | | v2: use Emil's recommendation change rule to closer to genxml/genX_bits.h Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv: change BLOCK_POOL_MEMFD_SIZE to 1GBTapani Pälli2017-03-311-2/+2
| | | | | | | | This allows us to run 32bit Vulkan apps on Android, ftruncate call would fail on 2GB (max size being 2GB - 1). Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* android: add libmesa_genxml as dep to libmesa_islTapani Pälli2017-03-311-1/+2
| | | | | | | | | This is to fix following compile error with libmesa_isl: mesa/src/intel/isl/isl.c:28:10: fatal error: 'genxml/genX_bits.h' file not found Fixes: f0eaf38 ("genxml: New generated header genX_bits.h (v6)") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emli Velikov <[email protected]>
* aubinator: enable snb/ilk through --genLionel Landwerlin2017-03-311-0/+2
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* intel: genxml: compress all gen files into oneLionel Landwerlin2017-03-315-62/+58
| | | | | | | | | | | | | Combining all the files into a single string didn't make any difference in the size of the aubinator binary. With this change we now also embed gen4/4.5/5 descriptions, which increases the aubinator size by ~16Kb. v2 (Lionel): rebase makefiles Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* intel: Add INTEL_CFLAGS to aubinator CFLAGS.Kenneth Graunke2017-03-301-1/+2
| | | | It still needs intel_aub.h. Fixes the build.
* intel: automake: move INTEL_CFLAGS as applicableEmil Velikov2017-03-302-1/+1
| | | | | | | | | | Only common/decoder.[ch] requires it [for intel_aub.h]. v2: The code was moved to from intel/tools to intel/common, update accordingly. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: android: remove libdrm_intel requirementEmil Velikov2017-03-303-12/+6
| | | | | | | | The only part which requires libdrm_intel tools/aubinator is not built on Android. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/cmd_buffer: fix host memory leakCraig Stout2017-03-291-1/+9
| | | | | | | | push_constants must be free'd. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100452 Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0 13.0" <[email protected]>
* anv/batch_chain: Handle another OOM in cmd_buffer_execbufJason Ekstrand2017-03-291-2/+4
| | | | | | Found by inspection while rebasing other patches. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: expose BRW_OPCODE_[F32TO16/F16TO32] name on gen8+Alejandro Piñeiro2017-03-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | Technically those hw operations are only available on gen7, as gen8+ support the conversion on the MOV. But, when using the builder to implement nir operations (example: nir_op_fquantize2f16), it is not needed to do the gen check. This check is done later, on the final emission at brw_F32TO16 (brw_eu_emit), choosing between the MOV or the specific operation accordingly. So in the middle, during optimization phases those hw operations can be around for gen8+ too. Without this patch, several (at least 95) vulkan-cts quantize tests crashes when using INTEL_DEBUG=optimizer. For example: dEQP-VK.spirv_assembly.instruction.graphics.opquantize.too_small_vert v2: simplify the code using GEN_GE (Ilia Mirkin) v3: tweak brw_instruction_name instead of changing opcode_descs table, that is used for validation (Matt Turner) Reviewed-by: Matt Turner <[email protected]>
* anv/cmd_buffer: Refactor flush_pipeline_select_*Jason Ekstrand2017-03-281-26/+16
| | | | | | | While having the _3d and _gpgpu versions is nice, there's no reason why we need to have duplicated logic for tracking the current pipeline. Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv: Flush caches prior to PIPELINE_SELECT on all gensJason Ekstrand2017-03-281-2/+1
| | | | | | | | | | | | | | | | The programming note that says we need to do this still exists in the SkyLake PRM and, from looking at the bspec, seems like it may apply to all hardware generations SNB+. Unfortunately, this isn't particularly clear cut since there is also language in the bspec that says you can skip the flushing and stall to get better throughput. Experimentation with the "Car Chase" benchmark in GL seems to indicate that some form of flushing is still needed. This commit makes us do the full set of flushes regardless of hardware generation. We can always reduce the flushing later. Reported-by: Topi Pohjolainen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Cc: "17.0 13.0" <[email protected]>
* anv/cmd_buffer: Fix bad indentationJason Ekstrand2017-03-281-24/+25
| | | | | | | | A bunch of code was indented in such a way that it looked like it went with the if statement above but it definitely didn't. Reviewed-by: Iago Toral Quiroga <[email protected]> Cc: "17.0 13.0" <[email protected]>
* anv/cmd_buffer: Apply flush operations prior to executing secondariesJason Ekstrand2017-03-281-0/+5
| | | | | | | This fixes rendering issues in the Vulkan port of skia on some hardware. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv/blorp: Use anv_get_layerCount everywhereJason Ekstrand2017-03-281-8/+12
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: Make anv_get_layerCount a macroJason Ekstrand2017-03-281-7/+7
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* isl: Drop unused isl_surf_init_info::min_pitchChad Versace2017-03-282-13/+3
| | | | | | Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel: Fix requests for exact surface row pitch (v2)Chad Versace2017-03-283-18/+21
| | | | | | | | | | | | | | All callers of isl_surf_init() that set 'min_row_pitch' wanted to request an *exact* row pitch, as evidenced by nearby asserts, but isl lacked API for doing so. Now that isl has an API for that, update the code to use it. v2: Assert that isl_surf_init() succeeds because the callers assume it. [for jekstrand] Reviewed-by: Nanley Chery <[email protected]> (v1) Reviewed-by: Anuj Phogat <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]> (v2)
* isl: Let isl_surf_init's caller set the exact row pitch (v2)Chad Versace2017-03-282-1/+19
| | | | | | | | | The caller does so by setting the new field isl_surf_init_info::row_pitch. v2: Validate the requested row_pitch. Reviewed-by: Jason Ekstrand <[email protected]> (v2)
* isl: Validate the calculated row pitch (v45)Chad Versace2017-03-281-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | Validate that isl_surf::row_pitch fits in the below bitfields, if applicable based on isl_surf::usage. RENDER_SURFACE_STATE::SurfacePitch RENDER_SURFACE_STATE::AuxiliarySurfacePitch 3DSTATE_DEPTH_BUFFER::SurfacePitch 3DSTATE_HIER_DEPTH_BUFFER::SurfacePitch v2: -Add a Makefile dependency on generated header genX_bits.h. v3: - Test ISL_SURF_USAGE_STORAGE_BIT too. [for jekstrand] - Drop explicity dependency on generated header. [for emil] v4: - Rebase for new gen_bits_header.py script. - Replace gen_10x with gen_device_info*. v5: - Drop FINISHME for validation of GEN9 1D row pitch. [for jekstrand] - Reformat bit tests. [for jekstrand] Reviewed-by: Jason Ekstrand <[email protected]> (v4)
* genxml: New generated header genX_bits.h (v6)Chad Versace2017-03-285-3/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | genX_bits.h contains the sizes of bitfields in genxml instructions, structures, and registers. It also defines some functions to query those sizes. isl_surf_init() will use the new header to validate that requested pitches fit in their destination bitfields. What's currently in genX_bits.h: - Each CONTAINER::Field from gen*.xml that has a bitsize has a macro in genX_bits.h: #define GEN{N}_CONTAINER_Field_bits {bitsize} - For each set of macros whose name, after stripping the GEN prefix, is the same, genX_bits.h contains a query function: static inline uint32_t __attribute__((pure)) CONTAINER_Field_bits(const struct gen_device_info *devinfo); v2 (Chad Versace): - Parse the XML instead of scraping the generated gen*_pack.h headers. v3 (Dylan Baker): - Port to Mako. v4 (Jason Ekstrand): - Make the _bits functions take a gen_device_info. v5 (Chad Versace): - Fix autotools out-of-tree build. - Fix Android build. Tested with git://github.com/android-ia/manifest. - Fix macro names. They were all missing the "_bits" suffix. - Fix macros names more. Remove all double-underscores. - Unindent all generated code. (It was floating in a sea of whitespace). - Reformat header to appear human-written not machine-generated. - Sort gens from high to low. Newest gens should come first because, when we read code, we likely want to read the gen8/9 code and ignore the gen4 code. So put the gen4 code at the bottom. - Replace 'const' attributes with 'pure', because the functions now have a pointer parameter. - Add --cpp-guard flag. Used by Android. - Kill class FieldCollection. After Jason's rewrite, it was just a dict. v6 (Chad Versace): - Replace `key not in d.keys()` with `key not in d`. [for dylan] Co-authored-by: Dylan Baker <[email protected]> Co-authored-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v5) Reviewed-by: Dylan Baker <[email protected]> (v6)
* i965/fs: Don't emit SEL instructions for type-converting MOVs.Matt Turner2017-03-271-0/+2
| | | | | | | | | | SEL can only convert between a few integer types, which we basically never do. Fixes fs/vs-double-uniform-array-direct-indirect-non-uniform-control-flow Cc: [email protected] Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Acked-by: Francisco Jerez <[email protected]>
* anv/blorp: Fix a crash in CmdClearColorImageXu Randy2017-03-271-2/+2
| | | | | | | | | | | | | We should use anv_get_layerCount() to access layerCount of VkImageSub- resourceRange in anv_CmdClearColorImage and anv_CmdClearDepthStencil- Image, which handles the VK_REMAINING_ARRAY_LAYERS (~0) case. Test: Sample multithreadcmdbuf from LunarG can run without crash Signed-off-by: Xu Randy <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: enable sampling from fast-cleared images on SKLSamuel Iglesias Gonsálvez2017-03-271-2/+2
| | | | | | | | A resolve is not needed on Skylake in this case. We were forcing a resolve because we set the input_aux_usage to ISL_AUX_USAGE_NONE. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* genxml: Add 3DSTATE_DEPTH_BUFFER to gen5.xmlChad Versace2017-03-241-0/+56
| | | | | | isl will use this for validating the depth buffer pitch. Reviewed-by: Jason Ekstrand <[email protected]>
* genxml: Whitespace fixesJason Ekstrand2017-03-245-39/+39
| | | | | | | Some field names had extra spaces and some had places where we should have had a space but didn't. Reviewed-by: Chad Versace <[email protected]>
* genxml: Replace "[N]" with "N"Jason Ekstrand2017-03-243-15/+15
| | | | Reviewed-by: Chad Versace <[email protected]>
* genxml/gen6: Remove a couple of bogus valuesJason Ekstrand2017-03-241-6/+2
| | | | Reviewed-by: Chad Versace <[email protected]>
* genxml/gen8: Remove BLACK_LEVEL_CORRECTION_STATEJason Ekstrand2017-03-241-6/+0
| | | | | | | We've never used it, it only exists on gen8, and the name of the struct contains piles of bad characters. Reviewed-by: Chad Versace <[email protected]>
* genxml: Rename two MCS fields to Auxiliary Surface on gen7Jason Ekstrand2017-03-243-8/+7
| | | | | | This makes gen7 more consistent with gen8+ Reviewed-by: Chad Versace <[email protected]>
* genxml: Fix gen_zipped_file.py dependencyChad Versace2017-03-241-1/+1
| | | | | | | The gen*_xml.h files depend on gen_zipped_file.py, not the gen*_pack.h files. Reviewed-by: Emil Velikov <[email protected]>
* genxml: Define GENXML_XML_FILES in Makefile.sourcesChad Versace2017-03-242-8/+11
| | | | | | The future header genX_bits.h will depend on GENXML_XML_FILES. Reviewed-by: Emil Velikov <[email protected]>
* anv: automake: ensure that the destination directory is createdEmil Velikov2017-03-241-0/+1
| | | | | | | | | | | | | Earlier commit unintentionally dropped the mkdir, as it was rebased. Some versions of autotools will not create the output directory for generated sources. Thus the issue went unnoticed by the original author. Cc: Dylan Baker <[email protected]> Cc: Steven Newbury <[email protected]> Reported-by: Steven Newbury <[email protected]> Fixes: Fixes: 1610b3dede1 ("anv: don't pass xmlfile via stdin anv_entrypoints_gen.py") Signed-off-by: Emil Velikov <[email protected]>
* anv/query: handle out of host memory without crashing in compute_query_result()Iago Toral Quiroga2017-03-241-0/+5
| | | | | | | | | | | | We don't need to make the caller (CmdCopyQueryPoolResults) aware of the problem since compute_query_result() only emits state. The caller is also expected to hit OOM in this scenario right after calling this function, but it is already handling it safely. Fixes: dEQP-VK.api.out_of_host_memory.cmd_copy_query_pool_results Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/pipeline: make FragCoord include sample positions when sample shadingIago Toral Quiroga2017-03-243-8/+20
| | | | | | | | | | | | | | | | | | | | | | We need to know if sample shading has been requested during shader compilation since that affects the way fragment coordinates are computed. Notice that the semantics of fragment coordinates only depend on whether sample shading has been requested, not on whether more than one sample will actually be produced (that is, minSampleShading and rasterizationSamples do not affect this behavior). Because this setting affects the code we generate for the shader, we also need to include it in the WM prog key. Notice we don't need to alter the OpenGL code because it doesn't ever use this behavior, so they key's value is always false (the default). Fixes: dEQP-VK.glsl.builtin_var.fragcoord_msaa.* Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_wpos_center: support adding sample position to fragment coordinateIago Toral Quiroga2017-03-241-1/+1
| | | | | | | | | | | | | According to section 14.6 of the Vulkan specification: "When sample shading is enabled, the x and y components of FragCoord reflect the location of the sample corresponding to the shader invocation." So add a boolean parameter to the lowering pass to select this behavior when we need it. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: return VK_ERROR_DEVICE_LOST immeditely when device is known to be lostIago Toral Quiroga2017-03-242-1/+24
| | | | | | | | If we know the device has been lost we should return this error code for any command that can report it before we attempt to do anything with the device. Reviewed-by: Jason Ekstrand <[email protected]>