diff options
author | Chad Versace <[email protected]> | 2017-05-30 15:57:15 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2017-06-22 12:44:28 -0700 |
commit | 4b9cbfa0b0c232d8f51820ad325c10d95f52f58e (patch) | |
tree | de1b28be4d4f667a34ed29c90ca8073860bab69a /src/mesa/drivers/dri/i965/brw_context.h | |
parent | c09b2aefae95db6ebf3f7b10c6d69286eddb2dd4 (diff) |
i965: Move brw_context format arrays to intel_screen
This allows us to query the driver's supported formats in i965's DRI code,
where often there is available a DRIscreen but no GL context.
To reduce diff noise, this patch does not completely remove
brw_context's format arrays. It just redeclares them as pointers which
point to the arrays in intel_screen.
Specifically, move these two arrays from brw_context to intel_screen:
mesa_to_isl_render_format[]
mesa_format_supports_render[]
And add a new array to intel_screen,
mesa_format_supportex_texture[]
which brw_init_surface_formats() copies to ctx->TextureFormatSupported.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 0336914db84..a7d52f4e3e5 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1170,8 +1170,8 @@ struct brw_context const struct brw_tracked_state render_atoms[76]; const struct brw_tracked_state compute_atoms[11]; - enum isl_format mesa_to_isl_render_format[MESA_FORMAT_COUNT]; - bool mesa_format_supports_render[MESA_FORMAT_COUNT]; + const enum isl_format *mesa_to_isl_render_format; + const bool *mesa_format_supports_render; /* PrimitiveRestart */ struct { @@ -1427,6 +1427,7 @@ void brw_upload_image_surfaces(struct brw_context *brw, struct brw_stage_prog_data *prog_data); /* brw_surface_formats.c */ +void intel_screen_init_surface_formats(struct intel_screen *screen); void brw_init_surface_formats(struct brw_context *brw); bool brw_render_target_supported(struct brw_context *brw, struct gl_renderbuffer *rb); |