[Mesa-dev] [PATCH] i965: Make the field computed_depth_mode an enum.
Kenneth Graunke
kenneth at whitecape.org
Thu May 4 01:03:36 UTC 2017
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 <rafael.antognolli at intel.com>
> ---
>
> 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)) {
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170503/d64eceae/attachment-0001.sig>
More information about the mesa-dev
mailing list