gallium: whitespace fixes in p_context.h, p_screen.h

Use consistent whitespace near parens.  Replace tabs w/ spaces, etc.

Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
This commit is contained in:
Brian Paul 2022-08-25 19:30:30 -06:00 committed by Marge Bot
parent 2e55ee8c08
commit bc2068ac49
2 changed files with 154 additions and 151 deletions

View file

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2007 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
#ifndef PIPE_CONTEXT_H
@ -112,7 +112,7 @@ struct pipe_context {
*/
struct util_debug_callback debug;
void (*destroy)( struct pipe_context * );
void (*destroy)(struct pipe_context *);
/**
* VBO drawing
@ -200,10 +200,10 @@ struct pipe_context {
* \param condition whether to skip on FALSE or TRUE query results
* \param mode one of PIPE_RENDER_COND_x
*/
void (*render_condition)( struct pipe_context *pipe,
struct pipe_query *query,
bool condition,
enum pipe_render_cond_flag mode );
void (*render_condition)(struct pipe_context *pipe,
struct pipe_query *query,
bool condition,
enum pipe_render_cond_flag mode);
/**
* Predicate subsequent rendering on a value in a buffer
@ -211,17 +211,17 @@ struct pipe_context {
* \param offset Offset in the buffer to query 32-bit
* \param condition whether to skip on FALSE or TRUE query results
*/
void (*render_condition_mem)( struct pipe_context *pipe,
struct pipe_resource *buffer,
uint32_t offset,
bool condition );
void (*render_condition_mem)(struct pipe_context *pipe,
struct pipe_resource *buffer,
uint32_t offset,
bool condition);
/**
* Query objects
*/
/*@{*/
struct pipe_query *(*create_query)( struct pipe_context *pipe,
unsigned query_type,
unsigned index );
struct pipe_query *(*create_query)(struct pipe_context *pipe,
unsigned query_type,
unsigned index);
/**
* Create a query object that queries all given query types simultaneously.
@ -238,9 +238,9 @@ struct pipe_context {
* \param query_types array of \p num_queries query types
* \return a query object, or NULL on error.
*/
struct pipe_query *(*create_batch_query)( struct pipe_context *pipe,
unsigned num_queries,
unsigned *query_types );
struct pipe_query *(*create_batch_query)(struct pipe_context *pipe,
unsigned num_queries,
unsigned *query_types);
void (*destroy_query)(struct pipe_context *pipe,
struct pipe_query *q);
@ -411,20 +411,20 @@ struct pipe_context {
* Parameter-like state (or properties)
*/
/*@{*/
void (*set_blend_color)( struct pipe_context *,
const struct pipe_blend_color * );
void (*set_blend_color)(struct pipe_context *,
const struct pipe_blend_color *);
void (*set_stencil_ref)( struct pipe_context *,
const struct pipe_stencil_ref ref);
void (*set_stencil_ref)(struct pipe_context *,
const struct pipe_stencil_ref ref);
void (*set_sample_mask)( struct pipe_context *,
unsigned sample_mask );
void (*set_sample_mask)(struct pipe_context *,
unsigned sample_mask);
void (*set_min_samples)( struct pipe_context *,
unsigned min_samples );
void (*set_min_samples)(struct pipe_context *,
unsigned min_samples);
void (*set_clip_state)( struct pipe_context *,
const struct pipe_clip_state * );
void (*set_clip_state)(struct pipe_context *,
const struct pipe_clip_state *);
/**
* Set constant buffer
@ -435,10 +435,10 @@ struct pipe_context {
* (the callee shouldn't increment the ref count)
* \param buf Constant buffer parameters
*/
void (*set_constant_buffer)( struct pipe_context *,
enum pipe_shader_type shader, uint index,
bool take_ownership,
const struct pipe_constant_buffer *buf );
void (*set_constant_buffer)(struct pipe_context *,
enum pipe_shader_type shader, uint index,
bool take_ownership,
const struct pipe_constant_buffer *buf);
/**
* Set inlinable constants for constant buffer 0.
@ -456,12 +456,12 @@ struct pipe_context {
* There is no PIPE_CAP for this. Drivers shouldn't set the shader_info
* fields if they don't want this or if they don't implement this.
*/
void (*set_inlinable_constants)( struct pipe_context *,
enum pipe_shader_type shader,
uint num_values, uint32_t *values );
void (*set_inlinable_constants)(struct pipe_context *,
enum pipe_shader_type shader,
uint num_values, uint32_t *values);
void (*set_framebuffer_state)( struct pipe_context *,
const struct pipe_framebuffer_state * );
void (*set_framebuffer_state)(struct pipe_context *,
const struct pipe_framebuffer_state *);
/**
* Set the sample locations used during rasterization. When NULL or sized
@ -487,26 +487,26 @@ struct pipe_context {
* The pixel grid is used to vary sample locations across pixels and its
* size can be queried with get_sample_pixel_grid().
*/
void (*set_sample_locations)( struct pipe_context *,
size_t size, const uint8_t *locations );
void (*set_sample_locations)(struct pipe_context *,
size_t size, const uint8_t *locations);
void (*set_polygon_stipple)( struct pipe_context *,
const struct pipe_poly_stipple * );
void (*set_polygon_stipple)(struct pipe_context *,
const struct pipe_poly_stipple *);
void (*set_scissor_states)( struct pipe_context *,
void (*set_scissor_states)(struct pipe_context *,
unsigned start_slot,
unsigned num_scissors,
const struct pipe_scissor_state *);
void (*set_window_rectangles)(struct pipe_context *,
bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *);
void (*set_viewport_states)(struct pipe_context *,
unsigned start_slot,
unsigned num_scissors,
const struct pipe_scissor_state * );
void (*set_window_rectangles)( struct pipe_context *,
bool include,
unsigned num_rectangles,
const struct pipe_scissor_state * );
void (*set_viewport_states)( struct pipe_context *,
unsigned start_slot,
unsigned num_viewports,
const struct pipe_viewport_state *);
unsigned num_viewports,
const struct pipe_viewport_state *);
void (*set_sampler_views)(struct pipe_context *,
enum pipe_shader_type shader,
@ -600,12 +600,12 @@ struct pipe_context {
* that drivers shouldn't increment reference counts.
* \param buffers array of the buffers to bind
*/
void (*set_vertex_buffers)( struct pipe_context *,
unsigned start_slot,
unsigned num_buffers,
unsigned unbind_num_trailing_slots,
bool take_ownership,
const struct pipe_vertex_buffer * );
void (*set_vertex_buffers)(struct pipe_context *,
unsigned start_slot,
unsigned num_buffers,
unsigned unbind_num_trailing_slots,
bool take_ownership,
const struct pipe_vertex_buffer *);
/*@}*/
@ -837,32 +837,32 @@ struct pipe_context {
* information (like texture strides for texture_map).
*/
void *(*buffer_map)(struct pipe_context *,
struct pipe_resource *resource,
unsigned level,
unsigned usage, /* a combination of PIPE_MAP_x */
const struct pipe_box *,
struct pipe_transfer **out_transfer);
struct pipe_resource *resource,
unsigned level,
unsigned usage, /* a combination of PIPE_MAP_x */
const struct pipe_box *,
struct pipe_transfer **out_transfer);
/* If transfer was created with WRITE|FLUSH_EXPLICIT, only the
* regions specified with this call are guaranteed to be written to
* the resource.
*/
void (*transfer_flush_region)( struct pipe_context *,
struct pipe_transfer *transfer,
const struct pipe_box *);
void (*transfer_flush_region)(struct pipe_context *,
struct pipe_transfer *transfer,
const struct pipe_box *);
void (*buffer_unmap)(struct pipe_context *,
struct pipe_transfer *transfer);
struct pipe_transfer *transfer);
void *(*texture_map)(struct pipe_context *,
struct pipe_resource *resource,
unsigned level,
unsigned usage, /* a combination of PIPE_MAP_x */
const struct pipe_box *,
struct pipe_transfer **out_transfer);
struct pipe_resource *resource,
unsigned level,
unsigned usage, /* a combination of PIPE_MAP_x */
const struct pipe_box *,
struct pipe_transfer **out_transfer);
void (*texture_unmap)(struct pipe_context *,
struct pipe_transfer *transfer);
struct pipe_transfer *transfer);
/* One-shot transfer operation with data supplied in a user
* pointer.
@ -909,14 +909,14 @@ struct pipe_context {
/**
* Creates a video codec for a specific video format/profile
*/
struct pipe_video_codec *(*create_video_codec)( struct pipe_context *context,
const struct pipe_video_codec *templat );
struct pipe_video_codec *(*create_video_codec)(struct pipe_context *context,
const struct pipe_video_codec *templat);
/**
* Creates a video buffer as decoding target
*/
struct pipe_video_buffer *(*create_video_buffer)( struct pipe_context *context,
const struct pipe_video_buffer *templat );
struct pipe_video_buffer *(*create_video_buffer)(struct pipe_context *context,
const struct pipe_video_buffer *templat);
/**
* Compute kernel execution
@ -927,7 +927,7 @@ struct pipe_context {
* pipe_context::launch_grid.
*/
void *(*create_compute_state)(struct pipe_context *context,
const struct pipe_compute_state *);
const struct pipe_compute_state *);
void (*bind_compute_state)(struct pipe_context *, void *);
void (*delete_compute_state)(struct pipe_context *, void *);

View file

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2007 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,12 +22,12 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
/**
* @file
*
*
* Screen, Adapter or GPU
*
* These are driver functions/facilities that are context independent.
@ -78,6 +78,8 @@ typedef void (*pipe_vertex_state_destroy_func)(struct pipe_screen *screen,
struct pipe_vertex_state *);
typedef void (*pipe_driver_thread_func)(void *job, void *gdata, int thread_index);
/**
* Gallium screen/adapter context. Basically everything
* hardware-specific that doesn't actually require a rendering
@ -96,11 +98,11 @@ struct pipe_screen {
*/
struct u_transfer_helper *transfer_helper;
void (*destroy)( struct pipe_screen * );
void (*destroy)(struct pipe_screen *);
const char *(*get_name)( struct pipe_screen * );
const char *(*get_name)(struct pipe_screen *);
const char *(*get_vendor)( struct pipe_screen * );
const char *(*get_vendor)(struct pipe_screen *);
/**
* Returns the device vendor.
@ -108,35 +110,35 @@ struct pipe_screen {
* The returned value should return the actual device vendor/manufacturer,
* rather than a potentially generic driver string.
*/
const char *(*get_device_vendor)( struct pipe_screen * );
const char *(*get_device_vendor)(struct pipe_screen *);
/**
* Query an integer-valued capability/parameter/limit
* \param param one of PIPE_CAP_x
*/
int (*get_param)( struct pipe_screen *, enum pipe_cap param );
int (*get_param)(struct pipe_screen *, enum pipe_cap param);
/**
* Query a float-valued capability/parameter/limit
* \param param one of PIPE_CAP_x
*/
float (*get_paramf)( struct pipe_screen *, enum pipe_capf param );
float (*get_paramf)(struct pipe_screen *, enum pipe_capf param);
/**
* Query a per-shader-stage integer-valued capability/parameter/limit
* \param param one of PIPE_CAP_x
*/
int (*get_shader_param)( struct pipe_screen *, enum pipe_shader_type shader,
enum pipe_shader_cap param );
int (*get_shader_param)(struct pipe_screen *, enum pipe_shader_type shader,
enum pipe_shader_cap param);
/**
* Query an integer-valued capability/parameter/limit for a codec/profile
* \param param one of PIPE_VIDEO_CAP_x
*/
int (*get_video_param)( struct pipe_screen *,
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param );
int (*get_video_param)(struct pipe_screen *,
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
/**
* Query a compute-specific capability/parameter/limit.
@ -149,9 +151,9 @@ struct pipe_screen {
* returned.
*/
int (*get_compute_param)(struct pipe_screen *,
enum pipe_shader_ir ir_type,
enum pipe_compute_cap param,
void *ret);
enum pipe_shader_ir ir_type,
enum pipe_compute_cap param,
void *ret);
/**
* Get the sample pixel grid's size. This function requires
@ -189,41 +191,42 @@ struct pipe_screen {
* \param flags a mask of PIPE_CONTEXT_* flags
*/
struct pipe_context * (*context_create)(struct pipe_screen *screen,
void *priv, unsigned flags);
void *priv, unsigned flags);
/**
* Check if the given image copy will be faster on compute
* \param cpu If true, this is checking against CPU fallback,
* otherwise the copy will be on GFX
*/
bool (*is_compute_copy_faster)( struct pipe_screen *,
enum pipe_format src_format,
enum pipe_format dst_format,
unsigned width,
unsigned height,
unsigned depth,
bool cpu );
bool (*is_compute_copy_faster)(struct pipe_screen *,
enum pipe_format src_format,
enum pipe_format dst_format,
unsigned width,
unsigned height,
unsigned depth,
bool cpu);
/**
* Check if the given pipe_format is supported as a texture or
* drawing surface.
* \param bindings bitmask of PIPE_BIND_*
*/
bool (*is_format_supported)( struct pipe_screen *,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned bindings );
bool (*is_format_supported)(struct pipe_screen *,
enum pipe_format format,
enum pipe_texture_target target,
unsigned sample_count,
unsigned storage_sample_count,
unsigned bindings);
/**
* Check if the given pipe_format is supported as output for this codec/profile.
* Check if the given pipe_format is supported as output for this
* codec/profile.
* \param profile profile to check, may also be PIPE_VIDEO_PROFILE_UNKNOWN
*/
bool (*is_video_format_supported)( struct pipe_screen *,
enum pipe_format format,
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint );
bool (*is_video_format_supported)(struct pipe_screen *,
enum pipe_format format,
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint);
/**
* Check if we can actually create the given resource (test the dimension,
@ -237,7 +240,7 @@ struct pipe_screen {
* Create a new texture object, using the given template info.
*/
struct pipe_resource * (*resource_create)(struct pipe_screen *,
const struct pipe_resource *templat);
const struct pipe_resource *templat);
struct pipe_resource * (*resource_create_drawable)(struct pipe_screen *,
const struct pipe_resource *tmpl,
@ -259,9 +262,9 @@ struct pipe_screen {
* \param usage A combination of PIPE_HANDLE_USAGE_* flags.
*/
struct pipe_resource * (*resource_from_handle)(struct pipe_screen *,
const struct pipe_resource *templat,
struct winsys_handle *handle,
unsigned usage);
const struct pipe_resource *templat,
struct winsys_handle *handle,
unsigned usage);
/**
* Create a resource from user memory. This maps the user memory into
@ -356,7 +359,7 @@ struct pipe_screen {
void (*resource_changed)(struct pipe_screen *, struct pipe_resource *pt);
void (*resource_destroy)(struct pipe_screen *,
struct pipe_resource *pt);
struct pipe_resource *pt);
/**
@ -366,17 +369,17 @@ struct pipe_screen {
* gets out-of-band
* \param subbox an optional sub region to flush
*/
void (*flush_frontbuffer)( struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_resource *resource,
unsigned level, unsigned layer,
void *winsys_drawable_handle,
struct pipe_box *subbox );
void (*flush_frontbuffer)(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_resource *resource,
unsigned level, unsigned layer,
void *winsys_drawable_handle,
struct pipe_box *subbox);
/** Set ptr = fence, with reference counting */
void (*fence_reference)( struct pipe_screen *screen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence );
void (*fence_reference)(struct pipe_screen *screen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence);
/**
* Wait for the fence to finish.
@ -405,16 +408,16 @@ struct pipe_screen {
int (*fence_get_fd)(struct pipe_screen *screen,
struct pipe_fence_handle *fence);
/**
* Create a fence from an Win32 handle.
*
* This is used for importing a foreign/external fence handle.
*
* \param fence if not NULL, an old fence to unref and transfer a
* new fence reference to
* \param handle opaque handle representing the fence object
* \param type indicates which fence types backs the handle
*/
/**
* Create a fence from an Win32 handle.
*
* This is used for importing a foreign/external fence handle.
*
* \param fence if not NULL, an old fence to unref and transfer a
* new fence reference to
* \param handle opaque handle representing the fence object
* \param type indicates which fence types backs the handle
*/
void (*create_fence_win32)(struct pipe_screen *screen,
struct pipe_fence_handle **fence,
void *handle,
@ -557,7 +560,7 @@ struct pipe_screen {
* Return the device node mask identifying the context
* Together with the contexts LUID, this allows matching
* the context to an IDXGIAdapter1 object.
*
*
* within a linked device adapter
*/
uint32_t (*get_device_node_mask)(struct pipe_screen *screen);
@ -605,16 +608,16 @@ struct pipe_screen {
* gallium frontends should call this before passing shaders to drivers,
* and ideally also before shader caching.
*
* The driver may return a non-NULL string to trigger GLSL link failure and
* logging of that message in the GLSL linker log.
* The driver may return a non-NULL string to trigger GLSL link failure
* and logging of that message in the GLSL linker log.
*/
char *(*finalize_nir)(struct pipe_screen *screen, void *nir);
/*Separated memory/resource allocations interfaces for Vulkan */
/**
* Create a resource, and retrieve the required size for it but don't allocate
* any backing memory.
* Create a resource, and retrieve the required size for it but don't
* allocate any backing memory.
*/
struct pipe_resource * (*resource_create_unbacked)(struct pipe_screen *,
const struct pipe_resource *templat,