[Mesa-dev] [PATCH 04/18] anv: Emit cherryview SF state without including gen9_pack.h
Jason Ekstrand
jason at jlekstrand.net
Tue Nov 29 21:04:47 UTC 2016
On Tue, Nov 29, 2016 at 12:48 PM, Kristian H. Kristensen <
hoegsberg at gmail.com> wrote:
> Cleaner this way and we avoid including gen9_pack.h when we compile with
> gen8_pack.h. We also avoid the if (cherryview) condition for non-gen8
> gens that don't need it.
>
> Signed-off-by: Kristian H. Kristensen <hoegsberg at gmail.com>
> ---
> src/intel/vulkan/gen8_cmd_buffer.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/gen8_cmd_buffer.c
> b/src/intel/vulkan/gen8_cmd_buffer.c
> index 6578c22..20cde9f 100644
> --- a/src/intel/vulkan/gen8_cmd_buffer.c
> +++ b/src/intel/vulkan/gen8_cmd_buffer.c
> @@ -120,7 +120,8 @@ __emit_genx_sf_state(struct anv_cmd_buffer *cmd_buffer)
> cmd_buffer->state.pipeline->gen8.sf);
> }
>
> -#include "genxml/gen9_pack.h"
> +#if GEN_GEN == 9
> +
> static void
>
Doesn't this need to become non-static if it's being called from gen8?
Also, do we need a declaration in that case?
> __emit_gen9_sf_state(struct anv_cmd_buffer *cmd_buffer)
> {
> @@ -144,6 +145,16 @@ __emit_sf_state(struct anv_cmd_buffer *cmd_buffer)
> __emit_genx_sf_state(cmd_buffer);
> }
>
> +#else
> +
> +static void
> +__emit_sf_state(struct anv_cmd_buffer *cmd_buffer)
>
Isn't cherryview gen8? This is what we get on gen8? Did you test this?
> +{
> + __emit_genx_sf_state(cmd_buffer);
> +}
> +
> +#endif
> +
> void
> genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer)
> {
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161129/e3710394/attachment.html>
More information about the mesa-dev
mailing list