[Beignet] [PATCH 3/5] add third coord in backend

Xing, Homer homer.xing at intel.com
Tue May 7 23:00:17 PDT 2013


> If this is a 2D surface, then we'd better to use another way to identify it rather than allocate a register for the nonexisting coord. It wastes one register and it will generates useless instructions in both Sampler and TypedWrite. Any thoughts?

Hi, did you remember last week, we discussed the problem that TypedWriteInstruction only support two coords, but I want TypedWriteInstruction to express both two-coords case and three-coords case?
Finally we agree we'd better reuse TypedWriteInstruction. 

Let third coords be non-existing in the 2D case, reuses TypedWriteInstruction for both 2D and 3D cases. 
Otherwise I am afraid I have to create TypedWriteInstruction3D for 3D case, and leave TypedWriteInstruction for 2D case.

On the other hand, current solution does not hurt the performance. The wasted register is only in compiling phase, not in Gen7 assembly code.

Considering performance and reusing, I think current solution is good.

Homer


More information about the Beignet mailing list