Re: [Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-03 Thread Kenneth Graunke
On Wednesday, May 3, 2017 7:19:24 PM PDT Matt Turner wrote:
> On Wed, May 3, 2017 at 6:03 PM, Kenneth Graunke  wrote:
> > On Tuesday, May 2, 2017 11:02:58 AM PDT Rafael Antognolli wrote:
> >> Since the enum is in the same header now, we can use it as the type of
> >> the field.
> >>
> >> Signed-off-by: Rafael Antognolli 
> >> ---
> >>
> >> PS: We can merge this with the previous patch too if that's better.
> >>
> >>  src/intel/compiler/brw_compiler.h | 2 +-
> >>  src/intel/compiler/brw_fs.cpp | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/src/intel/compiler/brw_compiler.h 
> >> b/src/intel/compiler/brw_compiler.h
> >> index b5b1ee9..92fd4a2 100644
> >> --- a/src/intel/compiler/brw_compiler.h
> >> +++ b/src/intel/compiler/brw_compiler.h
> >> @@ -504,7 +504,7 @@ struct brw_wm_prog_data {
> >>/** @} */
> >> } binding_table;
> >>
> >> -   uint8_t computed_depth_mode;
> >> +   enum brw_pixel_shader_computed_depth_mode computed_depth_mode;
> >> bool computed_stencil;
> >
> > I think this may expand it from an 8-bit value to a 32-bit value.
> > It might have been anyway.  Does the size of the struct stay the same?
> 
> If it's marked as "PACKED" it should stay the same size.
> 

It isn't.  I'd be fine with adding PACKED.

--Ken


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


Re: [Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-03 Thread Matt Turner
On Wed, May 3, 2017 at 6:03 PM, Kenneth Graunke  wrote:
> On Tuesday, May 2, 2017 11:02:58 AM PDT Rafael Antognolli wrote:
>> Since the enum is in the same header now, we can use it as the type of
>> the field.
>>
>> Signed-off-by: Rafael Antognolli 
>> ---
>>
>> PS: We can merge this with the previous patch too if that's better.
>>
>>  src/intel/compiler/brw_compiler.h | 2 +-
>>  src/intel/compiler/brw_fs.cpp | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/intel/compiler/brw_compiler.h 
>> b/src/intel/compiler/brw_compiler.h
>> index b5b1ee9..92fd4a2 100644
>> --- a/src/intel/compiler/brw_compiler.h
>> +++ b/src/intel/compiler/brw_compiler.h
>> @@ -504,7 +504,7 @@ struct brw_wm_prog_data {
>>/** @} */
>> } binding_table;
>>
>> -   uint8_t computed_depth_mode;
>> +   enum brw_pixel_shader_computed_depth_mode computed_depth_mode;
>> bool computed_stencil;
>
> I think this may expand it from an 8-bit value to a 32-bit value.
> It might have been anyway.  Does the size of the struct stay the same?

If it's marked as "PACKED" it should stay the same size.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.

2017-05-03 Thread Kenneth Graunke
On Tuesday, May 2, 2017 11:02:58 AM PDT Rafael Antognolli wrote:
> Since the enum is in the same header now, we can use it as the type of
> the field.
> 
> Signed-off-by: Rafael Antognolli 
> ---
> 
> PS: We can merge this with the previous patch too if that's better.
> 
>  src/intel/compiler/brw_compiler.h | 2 +-
>  src/intel/compiler/brw_fs.cpp | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/intel/compiler/brw_compiler.h 
> b/src/intel/compiler/brw_compiler.h
> index b5b1ee9..92fd4a2 100644
> --- a/src/intel/compiler/brw_compiler.h
> +++ b/src/intel/compiler/brw_compiler.h
> @@ -504,7 +504,7 @@ struct brw_wm_prog_data {
>/** @} */
> } binding_table;
>  
> -   uint8_t computed_depth_mode;
> +   enum brw_pixel_shader_computed_depth_mode computed_depth_mode;
> bool computed_stencil;

I think this may expand it from an 8-bit value to a 32-bit value.
It might have been anyway.  Does the size of the struct stay the same?

> bool early_fragment_tests;
> diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
> index 4dcdc1b..a0c62a2 100644
> --- a/src/intel/compiler/brw_fs.cpp
> +++ b/src/intel/compiler/brw_fs.cpp
> @@ -6281,7 +6281,7 @@ brw_compute_flat_inputs(struct brw_wm_prog_data 
> *prog_data,
> }
>  }
>  
> -static uint8_t
> +static enum brw_pixel_shader_computed_depth_mode
>  computed_depth_mode(const nir_shader *shader)
>  {
> if (shader->info->outputs_written & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
> 



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