Skip to contentSkip to conversation

xf86-video-intel: enable hw-generated binding tables

RFC New Abdiel Janulgue 4 participants 15 messages Apr 22, 2014 – May 2, 2014

lore
Share & tools
lore
#0 lore raw

This patch series enables resource streamer for xf86-video-intel UXA.

Fixes i965 Mesa driver that makes use of resource streamer optimization to survive a full piglit run without bricking the machine. Previously, I get random hungs when doing a full piglit round when enabling RS. After months of head-scratching, I noticed I didn't quite pay attention to this small detail in bspec:

"The binding table generator feature has a simple all or nothing
model. If HW generated binding tables are enabled, the driver must enable the pool and use 3D_HW_BINDING_TABLE_POINTER_* commands."

I realized that our xf86-video-intel driver is piping out 3D commands as well that used the older manual-generated binding table format that caused a conflict when Mesa is using the hw-generated binding table format.

I didn't touch the SNA and video acceleration paths yet. Please let me know if I'm on the right track.

To use the feature, set in xorg.conf:

Option "ResourceStreamer" "true"

 src/intel_options.c         |    1 +
 src/intel_options.h         |    1 +
 src/uxa/i965_3d.c           |    5 ++-
 src/uxa/i965_reg.h          |    8 +++++
 src/uxa/i965_render.c       |   78 +++++++++++++++++++++++++++++++++++--------
 src/uxa/intel.h             |    3 ++
 src/uxa/intel_batchbuffer.c |    7 ++--
 src/uxa/intel_driver.c      |   10 +++++-
 8 files changed, 94 insertions(+), 19 deletions(-)

Abdiel Janulgue (2):

[PATCH 1/2] xf86-video-intel: Add "ResourceStreamer" option [PATCH 2/2] xf86-video-intel: Enable hw-generated binding tables for

#1 lore raw

RFC PATCH 1/2 xf86-video-intel: Add "ResourceStreamer" option

---
 src/intel_options.c    |    1 +
 src/intel_options.h    |    1 +
 src/uxa/intel.h        |    3 +++
 src/uxa/intel_driver.c |   10 +++++++++-
 4 files changed, 14 insertions(+), 1 deletion(-)
src/intel_options.c +1 -0
index 02a4ae1..cc418d1 100644
@@ -35,6 +35,7 @@ const OptionInfoRec intel_options[] = {
 	{OPTION_DEBUG_FLUSH_CACHES, "DebugFlushCaches", OPTV_BOOLEAN, {0}, 0},
 	{OPTION_DEBUG_WAIT, "DebugWait", OPTV_BOOLEAN, {0}, 0},
 	{OPTION_BUFFER_CACHE,	"BufferCache",	OPTV_BOOLEAN,   {0},    1},
+	{OPTION_RESOURCESTREAMER, "ResourceStreamer",	OPTV_BOOLEAN,   {0},    0},
 #endif
 	{-1,			NULL,		OPTV_NONE,	{0},	0}
 };
src/intel_options.h +1 -0
index 77f0c45..4867419 100644
@@ -43,6 +43,7 @@ enum intel_options {
 	OPTION_DEBUG_FLUSH_CACHES,
 	OPTION_DEBUG_WAIT,
 	OPTION_BUFFER_CACHE,
+	OPTION_RESOURCESTREAMER,
 #endif
 	NUM_OPTIONS,
 };
src/uxa/intel.h +3 -0
index 6ac770e..611eeea 100644
@@ -349,6 +349,9 @@ typedef struct intel_screen_private {
 	 */
 	Bool fallback_debug;
 	unsigned debug_flush;
+
+	dri_bo *hw_bt_pool_bo;
+	Bool use_resource_streamer;
 #if HAVE_UDEV
 	struct udev_monitor *uevent_monitor;
 	pointer uevent_handler;
src/uxa/intel_driver.c +9 -1
index 0a4fe2a..5574ffe 100644
@@ -196,6 +196,15 @@ static Bool I830GetEarlyOptions(ScrnInfoPtr scrn)
 	intel->fallback_debug = xf86ReturnOptValBool(intel->Options,
 						     OPTION_FALLBACKDEBUG,
 						     FALSE);
+	intel->use_resource_streamer = xf86ReturnOptValBool(intel->Options,
+						     OPTION_RESOURCESTREAMER,
+						     FALSE);
+	if (intel->use_resource_streamer)
+		xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
+			   "Enabling Resource Streamer\n");
+	else
+		xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
+			   "Disabling Resource Streamer\n");
 
 	intel->debug_flush = 0;
 
@@ -870,7 +879,6 @@ I830ScreenInit(SCREEN_INIT_ARGS_DECL)
 	 * appropriate.
 	 */
 	intel->XvEnabled = TRUE;
-
 #ifdef DRI2
 	if (intel->directRenderingType == DRI_NONE
 	    && I830DRI2ScreenInit(screen))
Signature · 1 line
1.7.9.5
#2 lore raw

RFC PATCH 2/2 xf86-video-intel: Enable hw-generated binding tables for UXA

In reply to Abdiel Janulgue

Code is based on my hw-generated binding table code for Mesa adapted to i965_composite path in UXA.

---
 src/uxa/i965_3d.c           |    5 ++-
 src/uxa/i965_reg.h          |    8 +++++
 src/uxa/i965_render.c       |   78 +++++++++++++++++++++++++++++++++++--------
 src/uxa/intel_batchbuffer.c |    7 ++--
 4 files changed, 80 insertions(+), 18 deletions(-)
src/uxa/i965_3d.c +4 -1
index 757a979..afbb5a7 100644
@@ -406,7 +406,10 @@ gen7_upload_binding_table(intel_screen_private *intel,
 			  uint32_t ps_binding_table_offset)
 {
 	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS | (2 - 2));
-	OUT_BATCH(ps_binding_table_offset);
+	if (intel->use_resource_streamer)
+		OUT_BATCH(ps_binding_table_offset >> 1);
+	else
+		OUT_BATCH(ps_binding_table_offset);
 }
 
 void
src/uxa/i965_reg.h +8 -0
index a934a67..157b212 100644
@@ -296,6 +296,14 @@
 /* DW1 */
 # define GEN7_PUSH_CONSTANT_BUFFER_OFFSET_SHIFT 16
 
+/* GEN7+ resource streamer */
+#define GEN7_3DSTATE_BINDING_TABLE_POOL_ALLOC           BRW_3D(3, 1, 0x19)
+# define BINDING_TABLE_POOL_ENABLE              0x0860
+#define GEN7_3DSTATE_BINDING_TABLE_EDIT_VS              BRW_3D(3, 0, 0x43)
+#define GEN7_3DSTATE_BINDING_TABLE_EDIT_GS              BRW_3D(3, 0, 0x44)
+#define GEN7_3DSTATE_BINDING_TABLE_EDIT_HS              BRW_3D(3, 0, 0x45)
+#define GEN7_3DSTATE_BINDING_TABLE_EDIT_DS              BRW_3D(3, 0, 0x46)
+#define GEN7_3DSTATE_BINDING_TABLE_EDIT_PS              BRW_3D(3, 0, 0x47)
 
 #define PIPELINE_SELECT_3D		0
 #define PIPELINE_SELECT_MEDIA		1
src/uxa/i965_render.c +65 -13

136 lines not on this page · raw message

src/uxa/intel_batchbuffer.c +3 -4
index dedf7f8..347413b 100644
@@ -260,13 +260,12 @@ void intel_batch_submit(ScrnInfoPtr scrn)
 	}
 
 	ret = dri_bo_subdata(intel->batch_bo, 0, intel->batch_used*4, intel->batch_ptr);
+	uint32_t flags = HAS_BLT(intel) ? intel->current_batch: I915_EXEC_DEFAULT;
+	flags |= intel->use_resource_streamer ? I915_EXEC_RESOURCE_STREAMER : 0;
 	if (ret == 0) {
 		ret = drm_intel_bo_mrb_exec(intel->batch_bo,
 				intel->batch_used*4,
-				NULL, 0, 0xffffffff,
-				(HAS_BLT(intel) ?
-				 intel->current_batch:
-				 I915_EXEC_DEFAULT));
+				NULL, 0, 0xffffffff, flags);
 	}
 
 	if (ret != 0) {
Signature · 1 line
1.7.9.5
#3 lore raw
In reply to Abdiel Janulgue
Quoted 8 lines · Abdiel Janulgue

This patch series enables resource streamer for xf86-video-intel UXA.

Fixes i965 Mesa driver that makes use of resource streamer optimization to survive a full piglit run without bricking the machine. Previously, I get random hungs when doing a full piglit round when enabling RS. After months of head-scratching, I noticed I didn't quite pay attention to this small detail in bspec:

Quoted 8 lines

"The binding table generator feature has a simple all or nothing
model. If HW generated binding tables are enabled, the driver must enable the pool and use 3D_HW_BINDING_TABLE_POINTER_* commands."

I realized that our xf86-video-intel driver is piping out 3D commands as well that used the older manual-generated binding table format that caused a conflict when Mesa is using the hw-generated binding table format.

This has to be per-context right? Otherwise how do you intend to coordinate multiple clients submitting to the kernel using incompatible command sets? Even in the restricted X/DRI sense, how do you intend to negotiate which to use?
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#4 lore raw
Quoted 18 lines · Chris Wilson
Quoted 8 lines · Abdiel Janulgue

This patch series enables resource streamer for xf86-video-intel UXA.

Fixes i965 Mesa driver that makes use of resource streamer optimization to survive a full piglit run without bricking the machine. Previously, I get random hungs when doing a full piglit round when enabling RS. After months of head-scratching, I noticed I didn't quite pay attention to this small detail in bspec:

Quoted 8 lines

"The binding table generator feature has a simple all or nothing
model. If HW generated binding tables are enabled, the driver must enable the pool and use 3D_HW_BINDING_TABLE_POINTER_* commands."

I realized that our xf86-video-intel driver is piping out 3D commands as well that used the older manual-generated binding table format that caused a conflict when Mesa is using the hw-generated binding table format.

Quoted 4 lines

This has to be per-context right? Otherwise how do you intend to coordinate multiple clients submitting to the kernel using incompatible command sets? Even in the restricted X/DRI sense, how do you intend to negotiate which to use?

Hm, I've thought that the MI_BB_START should synchronize with the asynchronous RS parsing/processing? Is there no way to disable RS again for the next batch in a different context?

If there's no way to solve this with contexts or some manual reset trick using LRIs then we're pretty decently screwed up. Worst case we need to stop the gpu and reset it to keep backwards compat :( -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#5 lore raw
Quoted 21 lines · Daniel Vetter
Quoted 20 lines · Chris Wilson
Quoted 18 lines · Abdiel Janulgue

This patch series enables resource streamer for xf86-video-intel UXA.

Fixes i965 Mesa driver that makes use of resource streamer optimization to survive a full piglit run without bricking the machine. Previously, I get random hungs when doing a full piglit round when enabling RS. After months of head-scratching, I noticed I didn't quite pay attention

to this small detail in bspec:
"The binding table generator feature has a simple all or nothing

model. If HW generated binding tables are enabled, the driver must enable
the pool and use 3D_HW_BINDING_TABLE_POINTER_* commands."

I realized that our xf86-video-intel driver is piping out 3D commands as well that used the older manual-generated binding table format that caused a conflict when Mesa is using the hw-generated binding table format.

Quoted 8 lines
Quoted 4 lines

This has to be per-context right? Otherwise how do you intend to coordinate multiple clients submitting to the kernel using incompatible command sets? Even in the restricted X/DRI sense, how do you intend to negotiate which to use?

Hm, I've thought that the MI_BB_START should synchronize with the asynchronous RS parsing/processing? Is there no way to disable RS again for the next batch in a different context?

I've already tried disabling RS at the end of every batch so that next batch in different context can continue to use older non-RS format. That does not work either and still causes hangs.

What I've seen so far, it seems GPU does not like switching the format of commands from RS-format to non-RS format. It's either one way or the other. If switched on, it affects subsequent contexes henceforth expecting RS-format commands until the GPU gets reset. That's probably the note in bspec:
"the binding table generator feature has a simple all or nothing model".

Quoted 4 lines

If there's no way to solve this with contexts or some manual reset trick using LRIs then we're pretty decently screwed up. Worst case we need to stop the gpu and reset it to keep backwards compat :(

#6 lore raw
Quoted 10 lines · Abdiel Janulgue

I've already tried disabling RS at the end of every batch so that next batch in different context can continue to use older non-RS format. That does not work either and still causes hangs.

What I've seen so far, it seems GPU does not like switching the format of commands from RS-format to non-RS format. It's either one way or the other. If switched on, it affects subsequent contexes henceforth expecting RS-format commands until the GPU gets reset. That's probably the note in bspec:

"the binding table generator feature has a simple all or nothing model".

Oh hooray, that's just awesome :( So we indeed need to stop the gpu and reset it if there's a non-RS render batch after any RS render batch.

Which also means that we need to enable this for _all_ userspace to avoid completely disastrous performance. So uxa, sna, libva, maybe opencl ...

I guess before we engage in this endeavor we need to track this down with the hardware people.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#7 lore raw
Quoted 11 lines · Daniel Vetter
Quoted 9 lines · Abdiel Janulgue

I've already tried disabling RS at the end of every batch so that next batch in different context can continue to use older non-RS format. That does not work either and still causes hangs.

What I've seen so far, it seems GPU does not like switching the format of commands from RS-format to non-RS format. It's either one way or the other. If switched on, it affects subsequent contexes henceforth expecting RS-format commands until the GPU gets reset. That's probably the note in bspec:

Quoted 5 lines
Quoted 1 line

"the binding table generator feature has a simple all or nothing model".

Oh hooray, that's just awesome :( So we indeed need to stop the gpu and reset it if there's a non-RS render batch after any RS render batch.

I'm not sure I buy it. There's an example in the spec showing how to disable the RS around eg. GPGPU workloads and re-enable it for 3D workloads even within one batch. I guess it's possible that the GPGPU pipeline mode is somehow special here, but since the RS state is supposed to be saved to the context I'm thinking you should be able to disable it whenever you want.

What's really confusing with that example is the fact that it first re-enables the binding tables and then the RS, but then there's a note after that saying you have to those steps in the opposite order.

Anyhoo, I'm wondering if the problems are simply due to disabling RS but leaving the binding tables enabled?

So one idea might be that when we switch from executing an RS batch to a non-RS batch, we should disable the RS and binding tables manually. We would then have to demand that any user batch which needs the binding tables enabled must enable them, even if if we just executed a batch that already used the binding tables. And when we need to disable the RS and binding tables we could either have the kernel do that autmagically when it notices a RS->non-RS transition, or we could also demand that all user batches must disable the binding tables at the end. But maybe demanding that from every batch would incur some extra overhead? In any case it should be fairly easy to try that and see if it cures the hangs. Or are you already doing things that way?

Signature · 2 lines
Ville Syrjälä
Intel OTC
#8 lore raw
Quoted 28 lines · Ville Syrjälä
Quoted 14 lines · Daniel Vetter

On Wed, Apr 23, 2014 at 1:21 PM, Abdiel Janulgue

Quoted 11 lines · <[email protected]> wrote:

I've already tried disabling RS at the end of every batch so that next batch in different context can continue to use older non-RS format. That does not work either and still causes hangs.

What I've seen so far, it seems GPU does not like switching the format of
commands from RS-format to non-RS format. It's either one way or the other. If switched on, it affects subsequent contexes henceforth expecting RS-format commands until the GPU gets reset. That's probably the note in bspec:

Quoted 5 lines
Quoted 1 line

"the binding table generator feature has a simple all or nothing model".

Oh hooray, that's just awesome :( So we indeed need to stop the gpu and reset it if there's a non-RS render batch after any RS render batch.

I'm not sure I buy it. There's an example in the spec showing how to disable the RS around eg. GPGPU workloads and re-enable it for 3D workloads even within one batch. I guess it's possible that the GPGPU pipeline mode is somehow special here, but since the RS state is supposed to be saved to the context I'm thinking you should be able to disable it whenever you want.

Quoted 6 lines

What's really confusing with that example is the fact that it first re-enables the binding tables and then the RS, but then there's a note after that saying you have to those steps in the opposite order.

Anyhoo, I'm wondering if the problems are simply due to disabling RS but leaving the binding tables enabled?

Yes, the work-around I tried previously is that at the end of each batch both hw-binding tables and RS are disabled in that particular order.

Quoted 12 lines

So one idea might be that when we switch from executing an RS batch to a non-RS batch, we should disable the RS and binding tables manually. We would then have to demand that any user batch which needs the binding tables enabled must enable them, even if if we just executed a batch that already used the binding tables. And when we need to disable the RS and binding tables we could either have the kernel do that autmagically when it notices a RS->non-RS transition, or we could also demand that all user batches must disable the binding tables at the end. But maybe demanding that from every batch would incur some extra overhead? In any case it should be fairly easy to try that and see if it cures the hangs. Or are you already doing things that way?

This is actually what current RS implementation in Mesa does. It explicitly enables RS then hw-binding tables for each batch start and then the tear-down work-around at the batch end I mentioned above; which didn't help at all.

Anyway I haven't tried the work-around where we explictly only disable the BT and RS on the other user-space clients (xorg driver in this case) when Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works. If it does, it might be more efficient to do that in the kernel?

--Abdiel

#9 lore raw
Quoted 5 lines · Abdiel Janulgue

Anyway I haven't tried the work-around where we explictly only disable the BT and RS on the other user-space clients (xorg driver in this case) when Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works. If it does, it might be more efficient to do that in the kernel?

It has to be done in the kernel in order for interoperability with third party clients.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#10 lore raw
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Abdiel Janulgue

Anyway I haven't tried the work-around where we explictly only disable the BT and RS on the other user-space clients (xorg driver in this case) when Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works.

I hate to break the bad news. Tried this just now - still get hangs :(

So I guess, all userspace clients* does need to use RS-format if we use this feature. GPGPU workloads seems to be special use-case where the RS hwbinding table format can be disabled. Otherwise, I guess we are stuck with this inflexibility.

[1]
On the other hand, it doesn't seem all that bad though. The RS hw-binding table format are only needed for clients that submit vertex and pixel shader commands. I've identified currently just UXA and SNA that seem to use this besides Mesa. OpenCL is not affected.

Quoted 6 lines
Quoted 2 lines

If it does, it
might be more efficient to do that in the kernel?

It has to be done in the kernel in order for interoperability with third party clients.
-Chris

#11 lore raw
Quoted 14 lines · Abdiel Janulgue
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Abdiel Janulgue

Anyway I haven't tried the work-around where we explictly only disable the BT and RS on the other user-space clients (xorg driver in this case) when Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works.

I hate to break the bad news. Tried this just now - still get hangs :(

So I guess, all userspace clients* does need to use RS-format if we use this feature. GPGPU workloads seems to be special use-case where the RS hwbinding table format can be disabled. Otherwise, I guess we are stuck with this inflexibility.

Quoted 5 lines

[1]
On the other hand, it doesn't seem all that bad though. The RS hw-binding table format are only needed for clients that submit vertex and pixel shader commands. I've identified currently just UXA and SNA that seem to use this besides Mesa. OpenCL is not affected.

libva? rendercopy in igt? This kind of abi break is really ugly :( -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#12 lore raw
In reply to Abdiel Janulgue
Quoted 7 lines · Abdiel Janulgue
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Abdiel Janulgue

Anyway I haven't tried the work-around where we explictly only disable the BT and RS on the other user-space clients (xorg driver in this case) when Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works.

Quoted 6 lines

I hate to break the bad news. Tried this just now - still get hangs :(

So I guess, all userspace clients* does need to use RS-format if we use this feature. GPGPU workloads seems to be special use-case where the RS hwbinding table format can be disabled. Otherwise, I guess we are stuck with this inflexibility.

The spec also says this:
"When switching between HW and SW binding table generation, SW must issue a state cache invalidate."

So it does look like they were expecting people to switch between the two modes.

Do you have any igt test for RS? Maybe add an option into rendercopy to make use of RS? Then we could write some tests that try to hit this problem w/o requiring Mesa.

Quoted 14 lines

[1]
On the other hand, it doesn't seem all that bad though. The RS hw-binding table format are only needed for clients that submit vertex and pixel shader commands. I've identified currently just UXA and SNA that seem to use this besides Mesa. OpenCL is not affected.

Quoted 6 lines
Quoted 2 lines

If it does, it
might be more efficient to do that in the kernel?

It has to be done in the kernel in order for interoperability with third party clients.
-Chris

Signature · 2 lines
Ville Syrjälä
Intel OTC
#13 lore raw
Quoted 17 lines · Ville Syrjälä
Quoted 9 lines · Abdiel Janulgue
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Abdiel Janulgue

Anyway I haven't tried the work-around where we explictly only disable the
BT and RS on the other user-space clients (xorg driver in this case) when
Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works.

Quoted 6 lines

I hate to break the bad news. Tried this just now - still get hangs :(

So I guess, all userspace clients* does need to use RS-format if we use this feature. GPGPU workloads seems to be special use-case where the RS hwbinding table format can be disabled. Otherwise, I guess we are stuck with this inflexibility.

Quoted 6 lines

The spec also says this:
"When switching between HW and SW binding table generation, SW must issue a state cache invalidate."

So it does look like they were expecting people to switch between the two modes.

Yep, the previous work-around did include a state cache invalidate.

Quoted 4 lines

Do you have any igt test for RS? Maybe add an option into rendercopy to make use of RS? Then we could write some tests that try to hit this problem w/o requiring Mesa.

Seems to be a good idea. I'll try to reproduce the problem with igt

Quoted 13 lines
Quoted 13 lines

[1]
On the other hand, it doesn't seem all that bad though. The RS hw-binding table format are only needed for clients that submit vertex and pixel shader commands. I've identified currently just UXA and SNA that seem to use this besides Mesa. OpenCL is not affected.

Quoted 6 lines
Quoted 2 lines

If it does, it
might be more efficient to do that in the kernel?

It has to be done in the kernel in order for interoperability with third party clients.
-Chris

#14 lore raw
In reply to Ville Syrjälä

Hi all!

Quoted 21 lines · Ville Syrjälä
Quoted 9 lines · Abdiel Janulgue
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Abdiel Janulgue

Anyway I haven't tried the work-around where we explictly only disable the
BT and RS on the other user-space clients (xorg driver in this case) when
Mesa is using RS instead of forcing the reset of the clients to use RS format. I'll try that first and let you know if it works.

Quoted 6 lines

I hate to break the bad news. Tried this just now - still get hangs :(

So I guess, all userspace clients* does need to use RS-format if we use this feature. GPGPU workloads seems to be special use-case where the RS hwbinding table format can be disabled. Otherwise, I guess we are stuck with this inflexibility.

The spec also says this:
"When switching between HW and SW binding table generation, SW must issue a state cache invalidate."

Quoted 6 lines

So it does look like they were expecting people to switch between the two modes.

Do you have any igt test for RS? Maybe add an option into rendercopy to make use of RS? Then we could write some tests that try to hit this problem w/o requiring Mesa.

I've modified igt rendercopy to test switching RS format on and off.

Good news and bad news!

Good news is that switching between RS binding tables and SW format works seamlessly in BDW! Bad news for HSW because the problems I describe above only happens on that chip.

This is a HW issue then.

=Abdiel

Quoted 13 lines
Quoted 13 lines

[1]
On the other hand, it doesn't seem all that bad though. The RS hw-binding table format are only needed for clients that submit vertex and pixel shader commands. I've identified currently just UXA and SNA that seem to use this besides Mesa. OpenCL is not affected.

Quoted 6 lines
Quoted 2 lines

If it does, it
might be more efficient to do that in the kernel?

It has to be done in the kernel in order for interoperability with third party clients.
-Chris