[Mesa-dev] [PATCH v2 10/11] i965/fs: Stomp the texture return type to UINT32

2015-11-13 Thread Jason Ekstrand
Cc: Kenneth Graunke 


---
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 4877504..61c63d4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -690,6 +690,17 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg 
dst, struct brw_reg src
   break;
}
 
+   /* Stomp the resinfo output type to UINT32.  On gens 4-5, the output type
+* is set as part of the message descriptor.  On gen4, the PRM seems to
+* allow UINT32 and FLOAT32 (i965 PRM, Vol. 4 Section 4.8.1.1), but on
+* later gens UINT32 is required.  Once you hit Sandy Bridge, the bit is
+* gone from the message descriptor entirely and you just get UINT32 all
+* the time regasrdless.  Since we can really only do non-UINT32 on gen4,
+* just stomp it to UINT32 all the time.
+*/
+   if (inst->opcode == SHADER_OPCODE_TXS)
+  return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;
+
switch (inst->exec_size) {
case 8:
   simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD8;
-- 
2.5.0.400.gff86faf

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 10/11] i965/fs: Stomp the texture return type to UINT32

2015-11-13 Thread Kenneth Graunke
On Friday, November 13, 2015 10:14:56 AM Jason Ekstrand wrote:
> Cc: Kenneth Graunke 
> 
> 
> ---
>  src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 11 +++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp 
> b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index 4877504..61c63d4 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -690,6 +690,17 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg 
> dst, struct brw_reg src
>break;
> }
>  
> +   /* Stomp the resinfo output type to UINT32.  On gens 4-5, the output type
> +* is set as part of the message descriptor.  On gen4, the PRM seems to
> +* allow UINT32 and FLOAT32 (i965 PRM, Vol. 4 Section 4.8.1.1), but on
> +* later gens UINT32 is required.  Once you hit Sandy Bridge, the bit is
> +* gone from the message descriptor entirely and you just get UINT32 all
> +* the time regasrdless.  Since we can really only do non-UINT32 on gen4,
> +* just stomp it to UINT32 all the time.
> +*/
> +   if (inst->opcode == SHADER_OPCODE_TXS)
> +  return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;
> +
> switch (inst->exec_size) {
> case 8:
>simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD8;
> 

I like this one better.

Reviewed-by: Kenneth Graunke 


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev