mesa/src/intel
Juan A. Suarez Romero 1ad26f9417 anv/cmd_buffer: check for NULL framebuffer
This can happen when we record a VkCmdDraw in a secondary buffer that
was created inheriting from the primary buffer, but with the framebuffer
set to NULL in the VkCommandBufferInheritanceInfo.

Vulkan 1.1.81 spec says that "the application must ensure (using scissor
if neccesary) that all rendering is contained in the render area [...]
[which] must be contained within the framebuffer dimesions".

While this should be done by the application, commit 465e5a86 added the
clamp to the framebuffer size, in case of application does not do it.
But this requires to know the framebuffer dimensions.

If we do not have a framebuffer at that moment, the best compromise we
can do is to just apply the scissor as it is, and let the application to
ensure the rendering is contained in the render area.

v2: do not clamp to framebuffer if there isn't a framebuffer

v3 (Jason):
- clamp earlier in the conditional
- clamp to render area if command buffer is primary

v4: clamp also x and y to render area (Jason)

v5: rename used variables (Jason)

Fixes: 465e5a86 ("anv: Clamp scissors to the framebuffer boundary")
CC: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-02-12 19:19:13 +01:00
..
blorp intel/blorp: Add two more filter modes 2019-01-14 10:16:52 -06:00
common intel/batch-decoder: fix a vb end address calculation 2019-01-25 15:12:30 +02:00
compiler intel/compiler: add scale_factors to sampler_prog_key_data 2019-02-12 08:42:25 +02:00
dev intel: Introducing Whiskey Lake platform 2018-10-11 10:02:40 -07:00
genxml genxml: Add SO_PRIM_STORAGE_NEEDED and SO_NUM_PRIMS_WRITTEN 2019-01-22 10:42:57 -06:00
isl isl: assert that Gen8+ don't have bit6_swizzling 2019-02-04 20:44:41 -08:00
tools intel/dump_gpu: Disambiguate between BOs from different GEM handle spaces. 2019-02-11 12:27:22 -08:00
vulkan anv/cmd_buffer: check for NULL framebuffer 2019-02-12 19:19:13 +01:00
Android.blorp.mk intel: android: remove libdrm_intel requirement 2017-03-30 19:07:23 +01:00
Android.common.mk android: link libmesa_intel_common with zlib and expat 2017-08-02 10:30:50 +03:00
Android.compiler.mk android: fix build issues with brw_nir_trig_workarounds.c 2017-10-04 07:39:05 +03:00
Android.dev.mk android: Use local i915_drm.h rather than the system one. 2018-03-23 10:05:02 -07:00
Android.genxml.mk intel/genxml/icl: Generate packing headers 2018-02-15 16:14:55 -08:00
Android.isl.mk intel/isl: move tiled_memcpy static libs from i965 to isl 2019-01-10 08:02:30 +02:00
Android.mk intel: Add missing includes for building on Android 2018-03-06 00:14:22 -08:00
Android.vulkan.mk android: fix build issues with libmesa_anv_gen* libraries 2019-01-25 15:21:06 +02:00
Makefile.am configure: allow building with python3 2018-10-31 19:15:50 +00:00
Makefile.blorp.am blorp: automake: add TODO to the tarball 2017-02-24 17:37:00 +00:00
Makefile.common.am automake: intel: correctly append to the LIBADD variable 2017-11-08 14:23:57 +00:00
Makefile.compiler.am i965/vec4/dce: Don't narrow the write mask if the flags are used 2018-12-17 13:47:06 -08:00
Makefile.dev.am intel: Split gen_device_info out into libintel_dev 2018-03-05 09:47:37 -08:00
Makefile.genxml.am intel: genxml: automake: include gen_bits_header.py in the tarball 2017-04-05 13:16:28 +01:00
Makefile.isl.am intel/isl: move tiled_memcpy static libs from i965 to isl 2019-01-10 08:02:30 +02:00
Makefile.sources intel/isl: move tiled_memcpy static libs from i965 to isl 2019-01-10 08:02:30 +02:00
Makefile.tools.am intel/tools: new i965_disasm tool 2018-08-29 11:19:55 -07:00
Makefile.vulkan.am anv: wire up the state_pool_padding test 2019-02-05 11:39:36 -08:00
meson.build intel: compiler option msse2 and mstackrealign 2018-09-07 13:45:46 +01:00