ReactOS  0.4.13-dev-259-g5ca9c9c
cs.c File Reference
#include "config.h"
#include "wine/port.h"
#include "wined3d_private.h"
Include dependency graph for cs.c:

Go to the source code of this file.

Classes

struct  wined3d_cs_packet
 
struct  wined3d_cs_nop
 
struct  wined3d_cs_present
 
struct  wined3d_cs_clear
 
struct  wined3d_cs_dispatch
 
struct  wined3d_cs_draw
 
struct  wined3d_cs_flush
 
struct  wined3d_cs_set_predication
 
struct  wined3d_cs_set_viewports
 
struct  wined3d_cs_set_scissor_rects
 
struct  wined3d_cs_set_rendertarget_view
 
struct  wined3d_cs_set_depth_stencil_view
 
struct  wined3d_cs_set_vertex_declaration
 
struct  wined3d_cs_set_stream_source
 
struct  wined3d_cs_set_stream_source_freq
 
struct  wined3d_cs_set_stream_output
 
struct  wined3d_cs_set_index_buffer
 
struct  wined3d_cs_set_constant_buffer
 
struct  wined3d_cs_set_texture
 
struct  wined3d_cs_set_color_key
 
struct  wined3d_cs_set_shader_resource_view
 
struct  wined3d_cs_set_unordered_access_view
 
struct  wined3d_cs_set_sampler
 
struct  wined3d_cs_set_shader
 
struct  wined3d_cs_set_blend_state
 
struct  wined3d_cs_set_rasterizer_state
 
struct  wined3d_cs_set_render_state
 
struct  wined3d_cs_set_texture_state
 
struct  wined3d_cs_set_sampler_state
 
struct  wined3d_cs_set_transform
 
struct  wined3d_cs_set_clip_plane
 
struct  wined3d_cs_set_material
 
struct  wined3d_cs_set_light
 
struct  wined3d_cs_set_light_enable
 
struct  wined3d_cs_push_constants
 
struct  wined3d_cs_reset_state
 
struct  wined3d_cs_callback
 
struct  wined3d_cs_query_issue
 
struct  wined3d_cs_preload_resource
 
struct  wined3d_cs_unload_resource
 
struct  wined3d_cs_map
 
struct  wined3d_cs_unmap
 
struct  wined3d_cs_blt_sub_resource
 
struct  wined3d_cs_update_sub_resource
 
struct  wined3d_cs_add_dirty_texture_region
 
struct  wined3d_cs_clear_unordered_access_view
 
struct  wined3d_cs_copy_uav_counter
 
struct  wined3d_cs_generate_mipmaps
 
struct  wined3d_cs_stop
 

Macros

#define WINED3D_INITIAL_CS_SIZE   4096
 

Enumerations

enum  wined3d_cs_op {
  WINED3D_CS_OP_NOP, WINED3D_CS_OP_PRESENT, WINED3D_CS_OP_CLEAR, WINED3D_CS_OP_DISPATCH,
  WINED3D_CS_OP_DRAW, WINED3D_CS_OP_FLUSH, WINED3D_CS_OP_SET_PREDICATION, WINED3D_CS_OP_SET_VIEWPORTS,
  WINED3D_CS_OP_SET_SCISSOR_RECTS, WINED3D_CS_OP_SET_RENDERTARGET_VIEW, WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW, WINED3D_CS_OP_SET_VERTEX_DECLARATION,
  WINED3D_CS_OP_SET_STREAM_SOURCE, WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ, WINED3D_CS_OP_SET_STREAM_OUTPUT, WINED3D_CS_OP_SET_INDEX_BUFFER,
  WINED3D_CS_OP_SET_CONSTANT_BUFFER, WINED3D_CS_OP_SET_TEXTURE, WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW, WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW,
  WINED3D_CS_OP_SET_SAMPLER, WINED3D_CS_OP_SET_SHADER, WINED3D_CS_OP_SET_BLEND_STATE, WINED3D_CS_OP_SET_RASTERIZER_STATE,
  WINED3D_CS_OP_SET_RENDER_STATE, WINED3D_CS_OP_SET_TEXTURE_STATE, WINED3D_CS_OP_SET_SAMPLER_STATE, WINED3D_CS_OP_SET_TRANSFORM,
  WINED3D_CS_OP_SET_CLIP_PLANE, WINED3D_CS_OP_SET_COLOR_KEY, WINED3D_CS_OP_SET_MATERIAL, WINED3D_CS_OP_SET_LIGHT,
  WINED3D_CS_OP_SET_LIGHT_ENABLE, WINED3D_CS_OP_PUSH_CONSTANTS, WINED3D_CS_OP_RESET_STATE, WINED3D_CS_OP_CALLBACK,
  WINED3D_CS_OP_QUERY_ISSUE, WINED3D_CS_OP_PRELOAD_RESOURCE, WINED3D_CS_OP_UNLOAD_RESOURCE, WINED3D_CS_OP_MAP,
  WINED3D_CS_OP_UNMAP, WINED3D_CS_OP_BLT_SUB_RESOURCE, WINED3D_CS_OP_UPDATE_SUB_RESOURCE, WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION,
  WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW, WINED3D_CS_OP_COPY_UAV_COUNTER, WINED3D_CS_OP_GENERATE_MIPMAPS, WINED3D_CS_OP_STOP
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3d)
 
static void wined3d_cs_exec_nop (struct wined3d_cs *cs, const void *data)
 
static void wined3d_cs_exec_present (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_present (struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, DWORD flags)
 
static void wined3d_cs_exec_clear (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_clear (struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
 
void wined3d_cs_emit_clear_rendertarget_view (struct wined3d_cs *cs, struct wined3d_rendertarget_view *view, const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
 
static void acquire_shader_resources (const struct wined3d_state *state, unsigned int shader_mask)
 
static void release_shader_resources (const struct wined3d_state *state, unsigned int shader_mask)
 
static void acquire_unordered_access_resources (const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
 
static void release_unordered_access_resources (const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
 
static void wined3d_cs_exec_dispatch (struct wined3d_cs *cs, const void *data)
 
static void acquire_compute_pipeline_resources (const struct wined3d_state *state)
 
void wined3d_cs_emit_dispatch (struct wined3d_cs *cs, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z)
 
void wined3d_cs_emit_dispatch_indirect (struct wined3d_cs *cs, struct wined3d_buffer *buffer, unsigned int offset)
 
static void wined3d_cs_exec_draw (struct wined3d_cs *cs, const void *data)
 
static void acquire_graphics_pipeline_resources (const struct wined3d_state *state, BOOL indexed, const struct wined3d_gl_info *gl_info)
 
void wined3d_cs_emit_draw (struct wined3d_cs *cs, GLenum primitive_type, unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count, BOOL indexed)
 
void wined3d_cs_emit_draw_indirect (struct wined3d_cs *cs, GLenum primitive_type, unsigned int patch_vertex_count, struct wined3d_buffer *buffer, unsigned int offset, BOOL indexed)
 
static void wined3d_cs_exec_flush (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_flush (struct wined3d_cs *cs)
 
static void wined3d_cs_exec_set_predication (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_predication (struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
 
static void wined3d_cs_exec_set_viewports (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_viewports (struct wined3d_cs *cs, unsigned int viewport_count, const struct wined3d_viewport *viewports)
 
static void wined3d_cs_exec_set_scissor_rects (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_scissor_rects (struct wined3d_cs *cs, unsigned int rect_count, const RECT *rects)
 
static void wined3d_cs_exec_set_rendertarget_view (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_rendertarget_view (struct wined3d_cs *cs, unsigned int view_idx, struct wined3d_rendertarget_view *view)
 
static void wined3d_cs_exec_set_depth_stencil_view (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_depth_stencil_view (struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
 
static void wined3d_cs_exec_set_vertex_declaration (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_vertex_declaration (struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
 
static void wined3d_cs_exec_set_stream_source (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_stream_source (struct wined3d_cs *cs, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride)
 
static void wined3d_cs_exec_set_stream_source_freq (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_stream_source_freq (struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
 
static void wined3d_cs_exec_set_stream_output (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_stream_output (struct wined3d_cs *cs, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset)
 
static void wined3d_cs_exec_set_index_buffer (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_index_buffer (struct wined3d_cs *cs, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
 
static void wined3d_cs_exec_set_constant_buffer (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_constant_buffer (struct wined3d_cs *cs, enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer)
 
static void wined3d_cs_exec_set_texture (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_texture (struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
 
static void wined3d_cs_exec_set_shader_resource_view (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_shader_resource_view (struct wined3d_cs *cs, enum wined3d_shader_type type, UINT view_idx, struct wined3d_shader_resource_view *view)
 
static void wined3d_cs_exec_set_unordered_access_view (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_unordered_access_view (struct wined3d_cs *cs, enum wined3d_pipeline pipeline, unsigned int view_idx, struct wined3d_unordered_access_view *view, unsigned int initial_count)
 
static void wined3d_cs_exec_set_sampler (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_sampler (struct wined3d_cs *cs, enum wined3d_shader_type type, UINT sampler_idx, struct wined3d_sampler *sampler)
 
static void wined3d_cs_exec_set_shader (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_shader (struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
 
static void wined3d_cs_exec_set_blend_state (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_blend_state (struct wined3d_cs *cs, struct wined3d_blend_state *state)
 
static void wined3d_cs_exec_set_rasterizer_state (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_rasterizer_state (struct wined3d_cs *cs, struct wined3d_rasterizer_state *rasterizer_state)
 
static void wined3d_cs_exec_set_render_state (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_render_state (struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
 
static void wined3d_cs_exec_set_texture_state (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_texture_state (struct wined3d_cs *cs, UINT stage, enum wined3d_texture_stage_state state, DWORD value)
 
static void wined3d_cs_exec_set_sampler_state (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_sampler_state (struct wined3d_cs *cs, UINT sampler_idx, enum wined3d_sampler_state state, DWORD value)
 
static void wined3d_cs_exec_set_transform (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_transform (struct wined3d_cs *cs, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
 
static void wined3d_cs_exec_set_clip_plane (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_clip_plane (struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
 
static void wined3d_cs_exec_set_color_key (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_color_key (struct wined3d_cs *cs, struct wined3d_texture *texture, WORD flags, const struct wined3d_color_key *color_key)
 
static void wined3d_cs_exec_set_material (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_material (struct wined3d_cs *cs, const struct wined3d_material *material)
 
static void wined3d_cs_exec_set_light (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_light (struct wined3d_cs *cs, const struct wined3d_light_info *light)
 
static void wined3d_cs_exec_set_light_enable (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_light_enable (struct wined3d_cs *cs, unsigned int idx, BOOL enable)
 
static void wined3d_cs_st_push_constants (struct wined3d_cs *cs, enum wined3d_push_constants p, unsigned int start_idx, unsigned int count, const void *constants)
 
static void wined3d_cs_exec_push_constants (struct wined3d_cs *cs, const void *data)
 
static void wined3d_cs_mt_push_constants (struct wined3d_cs *cs, enum wined3d_push_constants p, unsigned int start_idx, unsigned int count, const void *constants)
 
static void wined3d_cs_exec_reset_state (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_reset_state (struct wined3d_cs *cs)
 
static void wined3d_cs_exec_callback (struct wined3d_cs *cs, const void *data)
 
static void wined3d_cs_emit_callback (struct wined3d_cs *cs, void(*callback)(void *object), void *object)
 
void wined3d_cs_destroy_object (struct wined3d_cs *cs, void(*callback)(void *object), void *object)
 
void wined3d_cs_init_object (struct wined3d_cs *cs, void(*callback)(void *object), void *object)
 
static void wined3d_cs_exec_query_issue (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_query_issue (struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags)
 
static void wined3d_cs_exec_preload_resource (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_preload_resource (struct wined3d_cs *cs, struct wined3d_resource *resource)
 
static void wined3d_cs_exec_unload_resource (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_unload_resource (struct wined3d_cs *cs, struct wined3d_resource *resource)
 
static void wined3d_cs_exec_map (struct wined3d_cs *cs, const void *data)
 
HRESULT wined3d_cs_map (struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
 
static void wined3d_cs_exec_unmap (struct wined3d_cs *cs, const void *data)
 
HRESULT wined3d_cs_unmap (struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
 
static void wined3d_cs_exec_blt_sub_resource (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_blt_sub_resource (struct wined3d_cs *cs, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static void wined3d_cs_exec_update_sub_resource (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_update_sub_resource (struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch)
 
static void wined3d_cs_exec_add_dirty_texture_region (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_add_dirty_texture_region (struct wined3d_cs *cs, struct wined3d_texture *texture, unsigned int layer)
 
static void wined3d_cs_exec_clear_unordered_access_view (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_clear_unordered_access_view_uint (struct wined3d_cs *cs, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value)
 
static void wined3d_cs_exec_copy_uav_counter (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_copy_uav_counter (struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
 
static void wined3d_cs_exec_generate_mipmaps (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_generate_mipmaps (struct wined3d_cs *cs, struct wined3d_shader_resource_view *view)
 
static void wined3d_cs_emit_stop (struct wined3d_cs *cs)
 
static BOOL wined3d_cs_st_check_space (struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
 
static voidwined3d_cs_st_require_space (struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
 
static void wined3d_cs_st_submit (struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
 
static void wined3d_cs_st_finish (struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
 
static BOOL wined3d_cs_queue_is_empty (const struct wined3d_cs *cs, const struct wined3d_cs_queue *queue)
 
static void wined3d_cs_queue_submit (struct wined3d_cs_queue *queue, struct wined3d_cs *cs)
 
static void wined3d_cs_mt_submit (struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
 
static BOOL wined3d_cs_queue_check_space (struct wined3d_cs_queue *queue, size_t size)
 
static voidwined3d_cs_queue_require_space (struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs)
 
static BOOL wined3d_cs_mt_check_space (struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
 
static voidwined3d_cs_mt_require_space (struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
 
static void wined3d_cs_mt_finish (struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
 
static void poll_queries (struct wined3d_cs *cs)
 
static void wined3d_cs_wait_event (struct wined3d_cs *cs)
 
static DWORD WINAPI wined3d_cs_run (void *ctx)
 
struct wined3d_cswined3d_cs_create (struct wined3d_device *device)
 
void wined3d_cs_destroy (struct wined3d_cs *cs)
 

Variables

struct {
   size_t   offset
 
   size_t   size
 
   DWORD   mask
 
wined3d_cs_push_constant_info []
 
static void(*const wined3d_cs_op_handlers [])(struct wined3d_cs *cs, const void *data)
 
static const struct wined3d_cs_ops wined3d_cs_st_ops
 
static const struct wined3d_cs_ops wined3d_cs_mt_ops
 

Macro Definition Documentation

◆ WINED3D_INITIAL_CS_SIZE

#define WINED3D_INITIAL_CS_SIZE   4096

Definition at line 25 of file cs.c.

Enumeration Type Documentation

◆ wined3d_cs_op

Enumerator
WINED3D_CS_OP_NOP 
WINED3D_CS_OP_PRESENT 
WINED3D_CS_OP_CLEAR 
WINED3D_CS_OP_DISPATCH 
WINED3D_CS_OP_DRAW 
WINED3D_CS_OP_FLUSH 
WINED3D_CS_OP_SET_PREDICATION 
WINED3D_CS_OP_SET_VIEWPORTS 
WINED3D_CS_OP_SET_SCISSOR_RECTS 
WINED3D_CS_OP_SET_RENDERTARGET_VIEW 
WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW 
WINED3D_CS_OP_SET_VERTEX_DECLARATION 
WINED3D_CS_OP_SET_STREAM_SOURCE 
WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ 
WINED3D_CS_OP_SET_STREAM_OUTPUT 
WINED3D_CS_OP_SET_INDEX_BUFFER 
WINED3D_CS_OP_SET_CONSTANT_BUFFER 
WINED3D_CS_OP_SET_TEXTURE 
WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW 
WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW 
WINED3D_CS_OP_SET_SAMPLER 
WINED3D_CS_OP_SET_SHADER 
WINED3D_CS_OP_SET_BLEND_STATE 
WINED3D_CS_OP_SET_RASTERIZER_STATE 
WINED3D_CS_OP_SET_RENDER_STATE 
WINED3D_CS_OP_SET_TEXTURE_STATE 
WINED3D_CS_OP_SET_SAMPLER_STATE 
WINED3D_CS_OP_SET_TRANSFORM 
WINED3D_CS_OP_SET_CLIP_PLANE 
WINED3D_CS_OP_SET_COLOR_KEY 
WINED3D_CS_OP_SET_MATERIAL 
WINED3D_CS_OP_SET_LIGHT 
WINED3D_CS_OP_SET_LIGHT_ENABLE 
WINED3D_CS_OP_PUSH_CONSTANTS 
WINED3D_CS_OP_RESET_STATE 
WINED3D_CS_OP_CALLBACK 
WINED3D_CS_OP_QUERY_ISSUE 
WINED3D_CS_OP_PRELOAD_RESOURCE 
WINED3D_CS_OP_UNLOAD_RESOURCE 
WINED3D_CS_OP_MAP 
WINED3D_CS_OP_UNMAP 
WINED3D_CS_OP_BLT_SUB_RESOURCE 
WINED3D_CS_OP_UPDATE_SUB_RESOURCE 
WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION 
WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW 
WINED3D_CS_OP_COPY_UAV_COUNTER 
WINED3D_CS_OP_GENERATE_MIPMAPS 
WINED3D_CS_OP_STOP 

Definition at line 27 of file cs.c.

28 {
77 };

Function Documentation

◆ acquire_compute_pipeline_resources()

static void acquire_compute_pipeline_resources ( const struct wined3d_state state)
static

Definition at line 739 of file cs.c.

740 {
743  state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
744 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
static int state
Definition: maze.c:121
static void acquire_shader_resources(const struct wined3d_state *state, unsigned int shader_mask)
Definition: cs.c:618
static void acquire_unordered_access_resources(const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
Definition: cs.c:684

Referenced by wined3d_cs_emit_dispatch(), and wined3d_cs_emit_dispatch_indirect().

◆ acquire_graphics_pipeline_resources()

static void acquire_graphics_pipeline_resources ( const struct wined3d_state state,
BOOL  indexed,
const struct wined3d_gl_info gl_info 
)
static

Definition at line 850 of file cs.c.

852 {
853  unsigned int i;
854 
855  if (indexed)
856  wined3d_resource_acquire(&state->index_buffer->resource);
857  for (i = 0; i < ARRAY_SIZE(state->streams); ++i)
858  {
859  if (state->streams[i].buffer)
860  wined3d_resource_acquire(&state->streams[i].buffer->resource);
861  }
862  for (i = 0; i < ARRAY_SIZE(state->stream_output); ++i)
863  {
864  if (state->stream_output[i].buffer)
865  wined3d_resource_acquire(&state->stream_output[i].buffer->resource);
866  }
867  for (i = 0; i < ARRAY_SIZE(state->textures); ++i)
868  {
869  if (state->textures[i])
870  wined3d_resource_acquire(&state->textures[i]->resource);
871  }
872  for (i = 0; i < gl_info->limits.buffers; ++i)
873  {
874  if (state->fb->render_targets[i])
875  wined3d_resource_acquire(state->fb->render_targets[i]->resource);
876  }
877  if (state->fb->depth_stencil)
878  wined3d_resource_acquire(state->fb->depth_stencil->resource);
881  state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
882 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
static void wined3d_resource_acquire(struct wined3d_resource *resource)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static int state
Definition: maze.c:121
static void acquire_shader_resources(const struct wined3d_state *state, unsigned int shader_mask)
Definition: cs.c:618
#define ARRAY_SIZE(a)
Definition: main.h:24
struct wined3d_gl_limits limits
static void acquire_unordered_access_resources(const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
Definition: cs.c:684

Referenced by wined3d_cs_emit_draw(), and wined3d_cs_emit_draw_indirect().

◆ acquire_shader_resources()

static void acquire_shader_resources ( const struct wined3d_state state,
unsigned int  shader_mask 
)
static

Definition at line 618 of file cs.c.

619 {
622  struct wined3d_shader *shader;
623  unsigned int i, j;
624 
625  for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
626  {
627  if (!(shader_mask & (1u << i)))
628  continue;
629 
630  if (!(shader = state->shader[i]))
631  continue;
632 
633  for (j = 0; j < WINED3D_MAX_CBS; ++j)
634  {
635  if (state->cb[i][j])
636  wined3d_resource_acquire(&state->cb[i][j]->resource);
637  }
638 
639  for (j = 0; j < shader->reg_maps.sampler_map.count; ++j)
640  {
641  entry = &shader->reg_maps.sampler_map.entries[j];
642 
643  if (!(view = state->shader_resource_view[i][entry->resource_idx]))
644  continue;
645 
646  wined3d_resource_acquire(view->resource);
647  }
648  }
649 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define WINED3D_MAX_CBS
static void wined3d_resource_acquire(struct wined3d_resource *resource)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
GLuint shader
Definition: glext.h:6030
static int state
Definition: maze.c:121
uint32_t entry
Definition: isohybrid.c:63
static IOleDocumentView * view
Definition: activex.c:1749

Referenced by acquire_compute_pipeline_resources(), and acquire_graphics_pipeline_resources().

◆ acquire_unordered_access_resources()

static void acquire_unordered_access_resources ( const struct wined3d_shader shader,
struct wined3d_unordered_access_view *const views 
)
static

Definition at line 684 of file cs.c.

686 {
687  unsigned int i;
688 
689  if (!shader)
690  return;
691 
692  for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i)
693  {
694  if (!shader->reg_maps.uav_resource_info[i].type)
695  continue;
696 
697  if (!views[i])
698  continue;
699 
701  }
702 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define MAX_UNORDERED_ACCESS_VIEWS
GLuint shader
Definition: glext.h:6030

Referenced by acquire_compute_pipeline_resources(), and acquire_graphics_pipeline_resources().

◆ poll_queries()

static void poll_queries ( struct wined3d_cs cs)
static

Definition at line 2715 of file cs.c.

2716 {
2717  struct wined3d_query *query, *cursor;
2718 
2720  {
2721  if (!query->query_ops->query_poll(query, 0))
2722  continue;
2723 
2724  list_remove(&query->poll_list_entry);
2725  list_init(&query->poll_list_entry);
2726  InterlockedIncrement(&query->counter_retrieved);
2727  }
2728 }
struct list poll_list_entry
uint32_t cs
Definition: isohybrid.c:75
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
#define InterlockedIncrement
Definition: armddk.h:53
const char cursor[]
Definition: icontest.c:13
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
GLenum query
Definition: glext.h:7781

Referenced by wined3d_cs_run().

◆ release_shader_resources()

static void release_shader_resources ( const struct wined3d_state state,
unsigned int  shader_mask 
)
static

Definition at line 651 of file cs.c.

652 {
655  struct wined3d_shader *shader;
656  unsigned int i, j;
657 
658  for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
659  {
660  if (!(shader_mask & (1u << i)))
661  continue;
662 
663  if (!(shader = state->shader[i]))
664  continue;
665 
666  for (j = 0; j < WINED3D_MAX_CBS; ++j)
667  {
668  if (state->cb[i][j])
669  wined3d_resource_release(&state->cb[i][j]->resource);
670  }
671 
672  for (j = 0; j < shader->reg_maps.sampler_map.count; ++j)
673  {
674  entry = &shader->reg_maps.sampler_map.entries[j];
675 
676  if (!(view = state->shader_resource_view[i][entry->resource_idx]))
677  continue;
678 
679  wined3d_resource_release(view->resource);
680  }
681  }
682 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define WINED3D_MAX_CBS
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
GLuint shader
Definition: glext.h:6030
static int state
Definition: maze.c:121
uint32_t entry
Definition: isohybrid.c:63
static void wined3d_resource_release(struct wined3d_resource *resource)
static IOleDocumentView * view
Definition: activex.c:1749

Referenced by wined3d_cs_exec_dispatch(), and wined3d_cs_exec_draw().

◆ release_unordered_access_resources()

static void release_unordered_access_resources ( const struct wined3d_shader shader,
struct wined3d_unordered_access_view *const views 
)
static

Definition at line 704 of file cs.c.

706 {
707  unsigned int i;
708 
709  if (!shader)
710  return;
711 
712  for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i)
713  {
714  if (!shader->reg_maps.uav_resource_info[i].type)
715  continue;
716 
717  if (!views[i])
718  continue;
719 
721  }
722 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define MAX_UNORDERED_ACCESS_VIEWS
GLuint shader
Definition: glext.h:6030
static void wined3d_resource_release(struct wined3d_resource *resource)

Referenced by wined3d_cs_exec_dispatch(), and wined3d_cs_exec_draw().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3d  )

◆ wined3d_cs_create()

struct wined3d_cs* wined3d_cs_create ( struct wined3d_device device)

Definition at line 2816 of file cs.c.

2817 {
2818  const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
2819  struct wined3d_cs *cs;
2820 
2821  if (!(cs = heap_alloc_zero(sizeof(*cs))))
2822  return NULL;
2823 
2824  cs->ops = &wined3d_cs_st_ops;
2825  cs->device = device;
2826 
2827  state_init(&cs->state, &cs->fb, gl_info, &device->adapter->d3d_info,
2829 
2830  cs->data_size = WINED3D_INITIAL_CS_SIZE;
2831  if (!(cs->data = heap_alloc(cs->data_size)))
2832  goto fail;
2833 
2836  {
2837  cs->ops = &wined3d_cs_mt_ops;
2838 
2839  if (!(cs->event = CreateEventW(NULL, FALSE, FALSE, NULL)))
2840  {
2841  ERR("Failed to create command stream event.\n");
2842  heap_free(cs->data);
2843  goto fail;
2844  }
2845 
2846  if (!(GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
2847  (const WCHAR *)wined3d_cs_run, &cs->wined3d_module)))
2848  {
2849  ERR("Failed to get wined3d module handle.\n");
2850  CloseHandle(cs->event);
2851  heap_free(cs->data);
2852  goto fail;
2853  }
2854 
2855  if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
2856  {
2857  ERR("Failed to create wined3d command stream thread.\n");
2858  FreeLibrary(cs->wined3d_module);
2859  CloseHandle(cs->event);
2860  heap_free(cs->data);
2861  goto fail;
2862  }
2863  }
2864 
2865  return cs;
2866 
2867 fail:
2868  state_cleanup(&cs->state);
2869  heap_free(cs);
2870  return NULL;
2871 }
NTSYSAPI ULONG NTAPI RtlIsCriticalSectionLockedByThread(_In_ PRTL_CRITICAL_SECTION CriticalSection)
#define CloseHandle
Definition: compat.h:398
PPEB Peb
Definition: dllmain.c:27
struct wined3d_device * device
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:597
uint32_t cs
Definition: isohybrid.c:75
static const struct wined3d_cs_ops wined3d_cs_mt_ops
Definition: cs.c:2706
Definition: devices.h:37
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:111
smooth NULL
Definition: ftsmooth.c:416
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:527
#define FreeLibrary(x)
Definition: compat.h:405
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned int cs_multithreaded
static DWORD WINAPI wined3d_cs_run(void *ctx)
Definition: cs.c:2749
PVOID LoaderLock
Definition: ntddk_ex.h:295
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI GetModuleHandleExW(IN DWORD dwFlags, IN LPCWSTR lpwModuleName OPTIONAL, OUT HMODULE *phModule)
Definition: loader.c:873
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define WINED3D_STATE_NO_REF
void state_init(void *ipp)
Definition: dhclient.c:218
#define WINED3D_STATE_INIT_DEFAULT
#define WINED3D_INITIAL_CS_SIZE
Definition: cs.c:25
static const struct wined3d_cs_ops wined3d_cs_st_ops
Definition: cs.c:2565
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by device_init().

◆ wined3d_cs_destroy()

void wined3d_cs_destroy ( struct wined3d_cs cs)

Definition at line 2873 of file cs.c.

2874 {
2875  if (cs->thread)
2876  {
2878  CloseHandle(cs->thread);
2879  if (!CloseHandle(cs->event))
2880  ERR("Closing event failed.\n");
2881  }
2882 
2883  state_cleanup(&cs->state);
2884  heap_free(cs->data);
2885  heap_free(cs);
2886 }
#define CloseHandle
Definition: compat.h:398
uint32_t cs
Definition: isohybrid.c:75
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:527
static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
Definition: cs.c:2447
#define ERR(fmt,...)
Definition: debug.h:109
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by wined3d_device_decref().

◆ wined3d_cs_destroy_object()

◆ wined3d_cs_emit_add_dirty_texture_region()

void wined3d_cs_emit_add_dirty_texture_region ( struct wined3d_cs cs,
struct wined3d_texture texture,
unsigned int  layer 
)

Definition at line 2351 of file cs.c.

2353 {
2355 
2356  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2358  op->texture = texture;
2359  op->layer = layer;
2360 
2361  wined3d_resource_acquire(&texture->resource);
2362 
2363  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2364 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
uint32_t cs
Definition: isohybrid.c:75
GLenum GLuint GLint GLint layer
Definition: glext.h:7007
GLenum GLuint texture
Definition: glext.h:6295
UINT op
Definition: effect.c:223

Referenced by wined3d_texture_add_dirty_region().

◆ wined3d_cs_emit_blt_sub_resource()

void wined3d_cs_emit_blt_sub_resource ( struct wined3d_cs cs,
struct wined3d_resource dst_resource,
unsigned int  dst_sub_resource_idx,
const struct wined3d_box dst_box,
struct wined3d_resource src_resource,
unsigned int  src_sub_resource_idx,
const struct wined3d_box src_box,
DWORD  flags,
const struct wined3d_blt_fx fx,
enum wined3d_texture_filter_type  filter 
)

Definition at line 2174 of file cs.c.

2178 {
2180 
2181  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2183  op->dst_resource = dst_resource;
2184  op->dst_sub_resource_idx = dst_sub_resource_idx;
2185  op->dst_box = *dst_box;
2186  op->src_resource = src_resource;
2187  op->src_sub_resource_idx = src_sub_resource_idx;
2188  op->src_box = *src_box;
2189  op->flags = flags;
2190  if (fx)
2191  op->fx = *fx;
2192  else
2193  memset(&op->fx, 0, sizeof(op->fx));
2194  op->filter = filter;
2195 
2197  if (src_resource)
2199 
2200  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2202  cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT);
2203 }
struct wined3d_resource * src_resource
Definition: cs.c:396
#define WINED3D_BLT_SYNCHRONOUS
Definition: wined3d.h:1367
static void wined3d_resource_acquire(struct wined3d_resource *resource)
uint32_t cs
Definition: isohybrid.c:75
unsigned int src_sub_resource_idx
Definition: cs.c:397
struct wined3d_box src_box
Definition: cs.c:398
struct wined3d_box dst_box
Definition: cs.c:395
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
struct wined3d_resource * dst_resource
Definition: cs.c:393
UINT op
Definition: effect.c:223
#define memset(x, y, z)
Definition: compat.h:39
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
unsigned int dst_sub_resource_idx
Definition: cs.c:394

Referenced by wined3d_device_copy_resource(), wined3d_device_copy_sub_resource_region(), wined3d_device_update_texture(), and wined3d_texture_blt().

◆ wined3d_cs_emit_callback()

static void wined3d_cs_emit_callback ( struct wined3d_cs cs,
void(*)(void *object callback,
void object 
)
static

Definition at line 1895 of file cs.c.

1896 {
1897  struct wined3d_cs_callback *op;
1898 
1899  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1900  op->opcode = WINED3D_CS_OP_CALLBACK;
1901  op->callback = callback;
1902  op->object = object;
1903 
1904  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1905 }
uint32_t cs
Definition: isohybrid.c:75
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
UINT op
Definition: effect.c:223
void * object
Definition: jmemsys.h:48

Referenced by wined3d_cs_destroy_object(), and wined3d_cs_init_object().

◆ wined3d_cs_emit_clear()

void wined3d_cs_emit_clear ( struct wined3d_cs cs,
DWORD  rect_count,
const RECT rects,
DWORD  flags,
const struct wined3d_color color,
float  depth,
DWORD  stencil 
)

Definition at line 530 of file cs.c.

532 {
533  unsigned int rt_count = cs->device->adapter->gl_info.limits.buffers;
534  const struct wined3d_state *state = &cs->device->state;
535  const struct wined3d_viewport *vp = &state->viewports[0];
537  struct wined3d_cs_clear *op;
538  RECT view_rect;
539  unsigned int i;
540 
541  op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]),
543  op->opcode = WINED3D_CS_OP_CLEAR;
544  op->flags = flags;
546  op->rt_count = rt_count;
547  else
548  op->rt_count = 0;
549  op->fb = &cs->fb;
550  SetRect(&op->draw_rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height);
551  if (state->render_states[WINED3D_RS_SCISSORTESTENABLE])
552  IntersectRect(&op->draw_rect, &op->draw_rect, &state->scissor_rects[0]);
553  op->color = *color;
554  op->depth = depth;
555  op->stencil = stencil;
556  op->rect_count = rect_count;
557  memcpy(op->rects, rects, sizeof(*rects) * rect_count);
558 
560  {
561  for (i = 0; i < rt_count; ++i)
562  {
563  if ((view = state->fb->render_targets[i]))
564  {
565  SetRect(&view_rect, 0, 0, view->width, view->height);
566  IntersectRect(&op->draw_rect, &op->draw_rect, &view_rect);
567  wined3d_resource_acquire(view->resource);
568  }
569  }
570  }
572  {
573  view = state->fb->depth_stencil;
574  SetRect(&view_rect, 0, 0, view->width, view->height);
575  IntersectRect(&op->draw_rect, &op->draw_rect, &view_rect);
576  wined3d_resource_acquire(view->resource);
577  }
578 
579  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
580 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
#define WINED3DCLEAR_STENCIL
Definition: wined3d.h:1001
GLint GLfloat GLint stencil
Definition: glext.h:6260
#define WINED3DCLEAR_ZBUFFER
Definition: wined3d.h:1000
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLuint color
Definition: glext.h:6243
unsigned int rt_count
Definition: cs.c:105
RECT rects[1]
Definition: cs.c:112
GLbitfield flags
Definition: glext.h:7161
unsigned int rect_count
Definition: cs.c:111
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
static int state
Definition: maze.c:121
#define WINED3DCLEAR_TARGET
Definition: wined3d.h:999
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_clear().

◆ wined3d_cs_emit_clear_rendertarget_view()

void wined3d_cs_emit_clear_rendertarget_view ( struct wined3d_cs cs,
struct wined3d_rendertarget_view view,
const RECT rect,
DWORD  flags,
const struct wined3d_color color,
float  depth,
DWORD  stencil 
)

Definition at line 582 of file cs.c.

584 {
585  struct wined3d_cs_clear *op;
586  size_t size;
587 
588  size = FIELD_OFFSET(struct wined3d_cs_clear, rects[1]) + sizeof(struct wined3d_fb_state);
589  op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
590  op->fb = (void *)&op->rects[1];
591 
592  op->opcode = WINED3D_CS_OP_CLEAR;
593  op->flags = flags;
595  {
596  op->rt_count = 1;
597  op->fb->render_targets[0] = view;
598  op->fb->depth_stencil = NULL;
599  op->color = *color;
600  }
601  else
602  {
603  op->rt_count = 0;
604  op->fb->render_targets[0] = NULL;
605  op->fb->depth_stencil = view;
606  op->depth = depth;
607  op->stencil = stencil;
608  }
609  SetRect(&op->draw_rect, 0, 0, view->width, view->height);
610  op->rect_count = 1;
611  op->rects[0] = *rect;
612 
613  wined3d_resource_acquire(view->resource);
614 
615  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
616 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
& rect
Definition: startmenu.cpp:1413
GLint GLfloat GLint stencil
Definition: glext.h:6260
uint32_t cs
Definition: isohybrid.c:75
GLuint color
Definition: glext.h:6243
smooth NULL
Definition: ftsmooth.c:416
size_t size
Definition: cs.c:1803
GLsizeiptr size
Definition: glext.h:5919
if(!(yy_init))
Definition: macro.lex.yy.c:714
RECT rects[1]
Definition: cs.c:112
GLbitfield flags
Definition: glext.h:7161
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
#define WINED3DCLEAR_TARGET
Definition: wined3d.h:999
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_clear_rendertarget_view().

◆ wined3d_cs_emit_clear_unordered_access_view_uint()

void wined3d_cs_emit_clear_unordered_access_view_uint ( struct wined3d_cs cs,
struct wined3d_unordered_access_view view,
const struct wined3d_uvec4 clear_value 
)

Definition at line 2379 of file cs.c.

2381 {
2383 
2384  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2386  op->view = view;
2387  op->clear_value = *clear_value;
2388 
2389  wined3d_resource_acquire(view->resource);
2390 
2391  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2392 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
struct wined3d_uvec4 clear_value
Definition: cs.c:425
uint32_t cs
Definition: isohybrid.c:75
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_clear_unordered_access_view_uint().

◆ wined3d_cs_emit_copy_uav_counter()

void wined3d_cs_emit_copy_uav_counter ( struct wined3d_cs cs,
struct wined3d_buffer dst_buffer,
unsigned int  offset,
struct wined3d_unordered_access_view uav 
)

Definition at line 2408 of file cs.c.

2410 {
2412 
2413  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2415  op->buffer = dst_buffer;
2416  op->offset = offset;
2417  op->view = uav;
2418 
2419  wined3d_resource_acquire(&dst_buffer->resource);
2421 
2422  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2423 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
size_t offset
Definition: cs.c:1802
struct wined3d_resource resource
uint32_t cs
Definition: isohybrid.c:75
struct wined3d_resource * resource
UINT op
Definition: effect.c:223

Referenced by wined3d_device_copy_uav_counter().

◆ wined3d_cs_emit_dispatch()

void wined3d_cs_emit_dispatch ( struct wined3d_cs cs,
unsigned int  group_count_x,
unsigned int  group_count_y,
unsigned int  group_count_z 
)

Definition at line 746 of file cs.c.

748 {
749  const struct wined3d_state *state = &cs->device->state;
750  struct wined3d_cs_dispatch *op;
751 
752  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
753  op->opcode = WINED3D_CS_OP_DISPATCH;
754  op->parameters.indirect = FALSE;
755  op->parameters.u.direct.group_count_x = group_count_x;
756  op->parameters.u.direct.group_count_y = group_count_y;
757  op->parameters.u.direct.group_count_z = group_count_z;
758 
760 
761  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
762 }
uint32_t cs
Definition: isohybrid.c:75
static void acquire_compute_pipeline_resources(const struct wined3d_state *state)
Definition: cs.c:739
static int state
Definition: maze.c:121
UINT op
Definition: effect.c:223

Referenced by wined3d_device_dispatch_compute().

◆ wined3d_cs_emit_dispatch_indirect()

void wined3d_cs_emit_dispatch_indirect ( struct wined3d_cs cs,
struct wined3d_buffer buffer,
unsigned int  offset 
)

Definition at line 764 of file cs.c.

766 {
767  const struct wined3d_state *state = &cs->device->state;
768  struct wined3d_cs_dispatch *op;
769 
770  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
771  op->opcode = WINED3D_CS_OP_DISPATCH;
772  op->parameters.indirect = TRUE;
773  op->parameters.u.indirect.buffer = buffer;
774  op->parameters.u.indirect.offset = offset;
775 
777  wined3d_resource_acquire(&buffer->resource);
778 
779  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
780 }
#define TRUE
Definition: types.h:120
static void wined3d_resource_acquire(struct wined3d_resource *resource)
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1802
uint32_t cs
Definition: isohybrid.c:75
static void acquire_compute_pipeline_resources(const struct wined3d_state *state)
Definition: cs.c:739
static int state
Definition: maze.c:121
UINT op
Definition: effect.c:223

Referenced by wined3d_device_dispatch_compute_indirect().

◆ wined3d_cs_emit_draw()

void wined3d_cs_emit_draw ( struct wined3d_cs cs,
GLenum  primitive_type,
unsigned int  patch_vertex_count,
int  base_vertex_idx,
unsigned int  start_idx,
unsigned int  index_count,
unsigned int  start_instance,
unsigned int  instance_count,
BOOL  indexed 
)

Definition at line 884 of file cs.c.

887 {
888  const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
889  const struct wined3d_state *state = &cs->device->state;
890  struct wined3d_cs_draw *op;
891 
892  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
893  op->opcode = WINED3D_CS_OP_DRAW;
894  op->primitive_type = primitive_type;
895  op->patch_vertex_count = patch_vertex_count;
896  op->parameters.indirect = FALSE;
897  op->parameters.u.direct.base_vertex_idx = base_vertex_idx;
898  op->parameters.u.direct.start_idx = start_idx;
899  op->parameters.u.direct.index_count = index_count;
900  op->parameters.u.direct.start_instance = start_instance;
901  op->parameters.u.direct.instance_count = instance_count;
902  op->parameters.indexed = indexed;
903 
904  acquire_graphics_pipeline_resources(state, indexed, gl_info);
905 
906  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
907 }
uint32_t cs
Definition: isohybrid.c:75
GLenum primitive_type
Definition: cs.c:124
static void acquire_graphics_pipeline_resources(const struct wined3d_state *state, BOOL indexed, const struct wined3d_gl_info *gl_info)
Definition: cs.c:850
static int state
Definition: maze.c:121
GLint patch_vertex_count
Definition: cs.c:125
UINT op
Definition: effect.c:223

Referenced by wined3d_device_draw_indexed_primitive(), wined3d_device_draw_indexed_primitive_instanced(), wined3d_device_draw_primitive(), and wined3d_device_draw_primitive_instanced().

◆ wined3d_cs_emit_draw_indirect()

void wined3d_cs_emit_draw_indirect ( struct wined3d_cs cs,
GLenum  primitive_type,
unsigned int  patch_vertex_count,
struct wined3d_buffer buffer,
unsigned int  offset,
BOOL  indexed 
)

Definition at line 909 of file cs.c.

911 {
912  const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
913  const struct wined3d_state *state = &cs->device->state;
914  struct wined3d_cs_draw *op;
915 
916  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
917  op->opcode = WINED3D_CS_OP_DRAW;
918  op->primitive_type = primitive_type;
919  op->patch_vertex_count = patch_vertex_count;
920  op->parameters.indirect = TRUE;
921  op->parameters.u.indirect.buffer = buffer;
922  op->parameters.u.indirect.offset = offset;
923  op->parameters.indexed = indexed;
924 
925  acquire_graphics_pipeline_resources(state, indexed, gl_info);
926  wined3d_resource_acquire(&buffer->resource);
927 
928  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
929 }
#define TRUE
Definition: types.h:120
static void wined3d_resource_acquire(struct wined3d_resource *resource)
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1802
uint32_t cs
Definition: isohybrid.c:75
GLenum primitive_type
Definition: cs.c:124
static void acquire_graphics_pipeline_resources(const struct wined3d_state *state, BOOL indexed, const struct wined3d_gl_info *gl_info)
Definition: cs.c:850
static int state
Definition: maze.c:121
GLint patch_vertex_count
Definition: cs.c:125
UINT op
Definition: effect.c:223

Referenced by wined3d_device_draw_indexed_primitive_instanced_indirect(), and wined3d_device_draw_primitive_instanced_indirect().

◆ wined3d_cs_emit_flush()

void wined3d_cs_emit_flush ( struct wined3d_cs cs)

Definition at line 941 of file cs.c.

942 {
943  struct wined3d_cs_flush *op;
944 
945  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
946  op->opcode = WINED3D_CS_OP_FLUSH;
947 
948  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
949  cs->queries_flushed = TRUE;
950 }
#define TRUE
Definition: types.h:120
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_end_scene(), and wined3d_query_get_data().

◆ wined3d_cs_emit_generate_mipmaps()

void wined3d_cs_emit_generate_mipmaps ( struct wined3d_cs cs,
struct wined3d_shader_resource_view view 
)

Definition at line 2434 of file cs.c.

2435 {
2437 
2438  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2440  op->view = view;
2441 
2442  wined3d_resource_acquire(view->resource);
2443 
2444  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2445 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
uint32_t cs
Definition: isohybrid.c:75
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_shader_resource_view_generate_mipmaps().

◆ wined3d_cs_emit_preload_resource()

void wined3d_cs_emit_preload_resource ( struct wined3d_cs cs,
struct wined3d_resource resource 
)

Definition at line 1978 of file cs.c.

1979 {
1981 
1982  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1984  op->resource = resource;
1985 
1987 
1988  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1989 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
int resource
Definition: rdpsnd_sgi.c:44
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_resource_preload().

◆ wined3d_cs_emit_present()

void wined3d_cs_emit_present ( struct wined3d_cs cs,
struct wined3d_swapchain swapchain,
const RECT src_rect,
const RECT dst_rect,
HWND  dst_window_override,
unsigned int  swap_interval,
DWORD  flags 
)

Definition at line 472 of file cs.c.

475 {
476  struct wined3d_cs_present *op;
477  unsigned int i;
478  LONG pending;
479 
480  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
481  op->opcode = WINED3D_CS_OP_PRESENT;
482  op->dst_window_override = dst_window_override;
483  op->swapchain = swapchain;
484  op->src_rect = *src_rect;
485  op->dst_rect = *dst_rect;
486  op->swap_interval = swap_interval;
487  op->flags = flags;
488 
489  pending = InterlockedIncrement(&cs->pending_presents);
490 
491  wined3d_resource_acquire(&swapchain->front_buffer->resource);
492  for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
493  {
494  wined3d_resource_acquire(&swapchain->back_buffers[i]->resource);
495  }
496 
497  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
498 
499  /* Limit input latency by limiting the number of presents that we can get
500  * ahead of the worker thread. */
501  while (pending >= swapchain->max_frame_latency)
502  {
503  wined3d_pause();
504  pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
505  }
506 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
#define InterlockedCompareExchange
Definition: interlocked.h:104
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
RECT dst_rect
Definition: cs.c:96
RECT src_rect
Definition: cs.c:95
unsigned int swap_interval
Definition: cs.c:97
HWND dst_window_override
Definition: cs.c:93
GLbitfield flags
Definition: glext.h:7161
static void wined3d_pause(void)
#define InterlockedIncrement
Definition: armddk.h:53
struct wined3d_swapchain * swapchain
Definition: cs.c:94
UINT op
Definition: effect.c:223

Referenced by wined3d_swapchain_present().

◆ wined3d_cs_emit_query_issue()

void wined3d_cs_emit_query_issue ( struct wined3d_cs cs,
struct wined3d_query query,
DWORD  flags 
)

Definition at line 1956 of file cs.c.

1957 {
1958  struct wined3d_cs_query_issue *op;
1959 
1960  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1961  op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
1962  op->query = query;
1963  op->flags = flags;
1964 
1965  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1966  cs->queries_flushed = FALSE;
1967 }
uint32_t cs
Definition: isohybrid.c:75
GLbitfield flags
Definition: glext.h:7161
UINT op
Definition: effect.c:223
GLenum query
Definition: glext.h:7781

Referenced by wined3d_query_issue().

◆ wined3d_cs_emit_reset_state()

void wined3d_cs_emit_reset_state ( struct wined3d_cs cs)

Definition at line 1878 of file cs.c.

1879 {
1880  struct wined3d_cs_reset_state *op;
1881 
1882  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1883  op->opcode = WINED3D_CS_OP_RESET_STATE;
1884 
1885  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1886 }
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_reset().

◆ wined3d_cs_emit_set_blend_state()

void wined3d_cs_emit_set_blend_state ( struct wined3d_cs cs,
struct wined3d_blend_state state 
)

Definition at line 1479 of file cs.c.

1480 {
1482 
1483  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1485  op->state = state;
1486 
1487  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1488 }
uint32_t cs
Definition: isohybrid.c:75
static int state
Definition: maze.c:121
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_blend_state().

◆ wined3d_cs_emit_set_clip_plane()

void wined3d_cs_emit_set_clip_plane ( struct wined3d_cs cs,
UINT  plane_idx,
const struct wined3d_vec4 plane 
)

Definition at line 1604 of file cs.c.

1605 {
1606  struct wined3d_cs_set_clip_plane *op;
1607 
1608  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1609  op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
1610  op->plane_idx = plane_idx;
1611  op->plane = *plane;
1612 
1613  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1614 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum plane
Definition: glfuncs.h:270
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_clip_plane().

◆ wined3d_cs_emit_set_color_key()

void wined3d_cs_emit_set_color_key ( struct wined3d_cs cs,
struct wined3d_texture texture,
WORD  flags,
const struct wined3d_color_key color_key 
)

Definition at line 1679 of file cs.c.

1681 {
1682  struct wined3d_cs_set_color_key *op;
1683 
1684  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1685  op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
1686  op->texture = texture;
1687  op->flags = flags;
1688  if (color_key)
1689  {
1690  op->color_key = *color_key;
1691  op->set = 1;
1692  }
1693  else
1694  op->set = 0;
1695 
1696  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1697 }
struct wined3d_color_key color_key
Definition: cs.c:228
uint32_t cs
Definition: isohybrid.c:75
GLenum GLuint texture
Definition: glext.h:6295
GLbitfield flags
Definition: glext.h:7161
UINT op
Definition: effect.c:223

Referenced by wined3d_texture_set_color_key().

◆ wined3d_cs_emit_set_constant_buffer()

void wined3d_cs_emit_set_constant_buffer ( struct wined3d_cs cs,
enum wined3d_shader_type  type,
UINT  cb_idx,
struct wined3d_buffer buffer 
)

Definition at line 1250 of file cs.c.

1252 {
1254 
1255  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1257  op->type = type;
1258  op->cb_idx = cb_idx;
1259  op->buffer = buffer;
1260 
1261  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1262 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_constant_buffer().

◆ wined3d_cs_emit_set_depth_stencil_view()

void wined3d_cs_emit_set_depth_stencil_view ( struct wined3d_cs cs,
struct wined3d_rendertarget_view view 
)

Definition at line 1079 of file cs.c.

1080 {
1082 
1083  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1085  op->view = view;
1086 
1087  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1088 }
uint32_t cs
Definition: isohybrid.c:75
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_depth_stencil_view().

◆ wined3d_cs_emit_set_index_buffer()

void wined3d_cs_emit_set_index_buffer ( struct wined3d_cs cs,
struct wined3d_buffer buffer,
enum wined3d_format_id  format_id,
unsigned int  offset 
)

Definition at line 1220 of file cs.c.

1222 {
1224 
1225  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1227  op->buffer = buffer;
1228  op->format_id = format_id;
1229  op->offset = offset;
1230 
1231  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1232 }
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1802
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223
static UINT format_id
Definition: clipboard.c:1343

Referenced by wined3d_device_set_index_buffer().

◆ wined3d_cs_emit_set_light()

void wined3d_cs_emit_set_light ( struct wined3d_cs cs,
const struct wined3d_light_info light 
)

Definition at line 1755 of file cs.c.

1756 {
1757  struct wined3d_cs_set_light *op;
1758 
1759  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1760  op->opcode = WINED3D_CS_OP_SET_LIGHT;
1761  op->light = *light;
1762 
1763  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1764 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
Definition: glfuncs.h:170
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_light().

◆ wined3d_cs_emit_set_light_enable()

void wined3d_cs_emit_set_light_enable ( struct wined3d_cs cs,
unsigned int  idx,
BOOL  enable 
)

Definition at line 1788 of file cs.c.

1789 {
1791 
1792  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1794  op->idx = idx;
1795  op->enable = enable;
1796 
1797  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1798 }
uint32_t cs
Definition: isohybrid.c:75
unsigned int idx
Definition: utils.c:41
GLboolean enable
Definition: glext.h:11120
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_light_enable().

◆ wined3d_cs_emit_set_material()

void wined3d_cs_emit_set_material ( struct wined3d_cs cs,
const struct wined3d_material material 
)

Definition at line 1707 of file cs.c.

1708 {
1709  struct wined3d_cs_set_material *op;
1710 
1711  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1712  op->opcode = WINED3D_CS_OP_SET_MATERIAL;
1713  op->material = *material;
1714 
1715  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1716 }
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223
struct wined3d_material material
Definition: cs.c:315

Referenced by wined3d_device_set_material().

◆ wined3d_cs_emit_set_predication()

void wined3d_cs_emit_set_predication ( struct wined3d_cs cs,
struct wined3d_query predicate,
BOOL  value 
)

Definition at line 960 of file cs.c.

961 {
963 
964  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
966  op->predicate = predicate;
967  op->value = value;
968 
969  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
970 }
uint32_t cs
Definition: isohybrid.c:75
GLsizei const GLfloat * value
Definition: glext.h:6069
struct wined3d_query * predicate
Definition: cs.c:137
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_predication().

◆ wined3d_cs_emit_set_rasterizer_state()

void wined3d_cs_emit_set_rasterizer_state ( struct wined3d_cs cs,
struct wined3d_rasterizer_state rasterizer_state 
)

Definition at line 1498 of file cs.c.

1500 {
1502 
1503  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1505  op->state = rasterizer_state;
1506 
1507  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1508 }
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_rasterizer_state().

◆ wined3d_cs_emit_set_render_state()

void wined3d_cs_emit_set_render_state ( struct wined3d_cs cs,
enum wined3d_render_state  state,
DWORD  value 
)

Definition at line 1518 of file cs.c.

1519 {
1521 
1522  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1524  op->state = state;
1525  op->value = value;
1526 
1527  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1528 }
uint32_t cs
Definition: isohybrid.c:75
static int state
Definition: maze.c:121
GLsizei const GLfloat * value
Definition: glext.h:6069
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_render_state().

◆ wined3d_cs_emit_set_rendertarget_view()

void wined3d_cs_emit_set_rendertarget_view ( struct wined3d_cs cs,
unsigned int  view_idx,
struct wined3d_rendertarget_view view 
)

Definition at line 1031 of file cs.c.

1033 {
1035 
1036  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1038  op->view_idx = view_idx;
1039  op->view = view;
1040 
1041  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1042 }
uint32_t cs
Definition: isohybrid.c:75
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_rendertarget_view().

◆ wined3d_cs_emit_set_sampler()

void wined3d_cs_emit_set_sampler ( struct wined3d_cs cs,
enum wined3d_shader_type  type,
UINT  sampler_idx,
struct wined3d_sampler sampler 
)

Definition at line 1433 of file cs.c.

1435 {
1436  struct wined3d_cs_set_sampler *op;
1437 
1438  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1439  op->opcode = WINED3D_CS_OP_SET_SAMPLER;
1440  op->type = type;
1441  op->sampler_idx = sampler_idx;
1442  op->sampler = sampler;
1443 
1444  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1445 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223
GLuint sampler
Definition: glext.h:7283

Referenced by wined3d_device_set_sampler().

◆ wined3d_cs_emit_set_sampler_state()

void wined3d_cs_emit_set_sampler_state ( struct wined3d_cs cs,
UINT  sampler_idx,
enum wined3d_sampler_state  state,
DWORD  value 
)

Definition at line 1560 of file cs.c.

1562 {
1564 
1565  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1567  op->sampler_idx = sampler_idx;
1568  op->state = state;
1569  op->value = value;
1570 
1571  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1572 }
uint32_t cs
Definition: isohybrid.c:75
static int state
Definition: maze.c:121
GLsizei const GLfloat * value
Definition: glext.h:6069
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_sampler_state(), and wined3d_texture_set_lod().

◆ wined3d_cs_emit_set_scissor_rects()

void wined3d_cs_emit_set_scissor_rects ( struct wined3d_cs cs,
unsigned int  rect_count,
const RECT rects 
)

Definition at line 1010 of file cs.c.

1011 {
1013 
1014  op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_set_scissor_rects, rects[rect_count]),
1017  memcpy(op->rects, rects, rect_count * sizeof(*rects));
1018  op->rect_count = rect_count;
1019 
1020  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1021 }
unsigned int rect_count
Definition: cs.c:151
uint32_t cs
Definition: isohybrid.c:75
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
UINT op
Definition: effect.c:223

Referenced by wined3d_device_reset(), wined3d_device_set_rendertarget_view(), and wined3d_device_set_scissor_rects().

◆ wined3d_cs_emit_set_shader()

void wined3d_cs_emit_set_shader ( struct wined3d_cs cs,
enum wined3d_shader_type  type,
struct wined3d_shader shader 
)

Definition at line 1459 of file cs.c.

1460 {
1461  struct wined3d_cs_set_shader *op;
1462 
1463  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1464  op->opcode = WINED3D_CS_OP_SET_SHADER;
1465  op->type = type;
1466  op->shader = shader;
1467 
1468  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1469 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
uint32_t cs
Definition: isohybrid.c:75
GLuint shader
Definition: glext.h:6030
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_compute_shader(), wined3d_device_set_domain_shader(), wined3d_device_set_geometry_shader(), wined3d_device_set_hull_shader(), wined3d_device_set_pixel_shader(), and wined3d_device_set_vertex_shader().

◆ wined3d_cs_emit_set_shader_resource_view()

void wined3d_cs_emit_set_shader_resource_view ( struct wined3d_cs cs,
enum wined3d_shader_type  type,
UINT  view_idx,
struct wined3d_shader_resource_view view 
)

Definition at line 1374 of file cs.c.

1376 {
1378 
1379  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1381  op->type = type;
1382  op->view_idx = view_idx;
1383  op->view = view;
1384 
1385  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1386 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
uint32_t cs
Definition: isohybrid.c:75
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_shader_resource_view().

◆ wined3d_cs_emit_set_stream_output()

void wined3d_cs_emit_set_stream_output ( struct wined3d_cs cs,
UINT  stream_idx,
struct wined3d_buffer buffer,
UINT  offset 
)

Definition at line 1188 of file cs.c.

1190 {
1192 
1193  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1195  op->stream_idx = stream_idx;
1196  op->buffer = buffer;
1197  op->offset = offset;
1198 
1199  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1200 }
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1802
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_stream_output().

◆ wined3d_cs_emit_set_stream_source()

void wined3d_cs_emit_set_stream_source ( struct wined3d_cs cs,
UINT  stream_idx,
struct wined3d_buffer buffer,
UINT  offset,
UINT  stride 
)

Definition at line 1129 of file cs.c.

1131 {
1133 
1134  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1136  op->stream_idx = stream_idx;
1137  op->buffer = buffer;
1138  op->offset = offset;
1139  op->stride = stride;
1140 
1141  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1142 }
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1802
uint32_t cs
Definition: isohybrid.c:75
GLsizei stride
Definition: glext.h:5848
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_stream_source().

◆ wined3d_cs_emit_set_stream_source_freq()

void wined3d_cs_emit_set_stream_source_freq ( struct wined3d_cs cs,
UINT  stream_idx,
UINT  frequency,
UINT  flags 
)

Definition at line 1156 of file cs.c.

1157 {
1159 
1160  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1162  op->stream_idx = stream_idx;
1163  op->frequency = frequency;
1164  op->flags = flags;
1165 
1166  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1167 }
uint32_t cs
Definition: isohybrid.c:75
GLbitfield flags
Definition: glext.h:7161
static LARGE_INTEGER * frequency
Definition: time.c:106
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_stream_source_freq().

◆ wined3d_cs_emit_set_texture()

void wined3d_cs_emit_set_texture ( struct wined3d_cs cs,
UINT  stage,
struct wined3d_texture texture 
)

Definition at line 1343 of file cs.c.

1344 {
1345  struct wined3d_cs_set_texture *op;
1346 
1347  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1348  op->opcode = WINED3D_CS_OP_SET_TEXTURE;
1349  op->stage = stage;
1350  op->texture = texture;
1351 
1352  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1353 }
uint32_t cs
Definition: isohybrid.c:75
GLenum GLuint texture
Definition: glext.h:6295
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_texture().

◆ wined3d_cs_emit_set_texture_state()

void wined3d_cs_emit_set_texture_state ( struct wined3d_cs cs,
UINT  stage,
enum wined3d_texture_stage_state  state,
DWORD  value 
)

Definition at line 1538 of file cs.c.

1540 {
1542 
1543  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1545  op->stage = stage;
1546  op->state = state;
1547  op->value = value;
1548 
1549  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1550 }
uint32_t cs
Definition: isohybrid.c:75
static int state
Definition: maze.c:121
GLsizei const GLfloat * value
Definition: glext.h:6069
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_texture_stage_state().

◆ wined3d_cs_emit_set_transform()

void wined3d_cs_emit_set_transform ( struct wined3d_cs cs,
enum wined3d_transform_state  state,
const struct wined3d_matrix matrix 
)

Definition at line 1583 of file cs.c.

1585 {
1586  struct wined3d_cs_set_transform *op;
1587 
1588  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1589  op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
1590  op->state = state;
1591  op->matrix = *matrix;
1592 
1593  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1594 }
GLuint GLenum matrix
Definition: glext.h:9407
uint32_t cs
Definition: isohybrid.c:75
static int state
Definition: maze.c:121
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_transform().

◆ wined3d_cs_emit_set_unordered_access_view()

void wined3d_cs_emit_set_unordered_access_view ( struct wined3d_cs cs,
enum wined3d_pipeline  pipeline,
unsigned int  view_idx,
struct wined3d_unordered_access_view view,
unsigned int  initial_count 
)

Definition at line 1407 of file cs.c.

1409 {
1411 
1412  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1414  op->pipeline = pipeline;
1415  op->view_idx = view_idx;
1416  op->view = view;
1417  op->initial_count = initial_count;
1418 
1419  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1420 }
enum wined3d_pipeline pipeline
Definition: cs.c:242
uint32_t cs
Definition: isohybrid.c:75
static IOleDocumentView * view
Definition: activex.c:1749
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_pipeline_unordered_access_view().

◆ wined3d_cs_emit_set_vertex_declaration()

void wined3d_cs_emit_set_vertex_declaration ( struct wined3d_cs cs,
struct wined3d_vertex_declaration declaration 
)

Definition at line 1098 of file cs.c.

1099 {
1101 
1102  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1104  op->declaration = declaration;
1105 
1106  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1107 }
struct wined3d_vertex_declaration * declaration
Definition: cs.c:171
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_vertex_declaration().

◆ wined3d_cs_emit_set_viewports()

void wined3d_cs_emit_set_viewports ( struct wined3d_cs cs,
unsigned int  viewport_count,
const struct wined3d_viewport viewports 
)

Definition at line 984 of file cs.c.

986 {
988 
989  op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_set_viewports, viewports[viewport_count]),
992  memcpy(op->viewports, viewports, viewport_count * sizeof(*viewports));
993  op->viewport_count = viewport_count;
994 
995  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
996 }
uint32_t cs
Definition: isohybrid.c:75
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
struct wined3d_viewport viewports[1]
Definition: cs.c:145
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
UINT op
Definition: effect.c:223
unsigned int viewport_count
Definition: cs.c:144

Referenced by wined3d_device_reset(), wined3d_device_set_rendertarget_view(), and wined3d_device_set_viewports().

◆ wined3d_cs_emit_stop()

static void wined3d_cs_emit_stop ( struct wined3d_cs cs)
static

Definition at line 2447 of file cs.c.

2448 {
2449  struct wined3d_cs_stop *op;
2450 
2451  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2452  op->opcode = WINED3D_CS_OP_STOP;
2453 
2454  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2455  cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT);
2456 }
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_cs_destroy().

◆ wined3d_cs_emit_unload_resource()

void wined3d_cs_emit_unload_resource ( struct wined3d_cs cs,
struct wined3d_resource resource 
)

Definition at line 2000 of file cs.c.

2001 {
2003 
2004  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2006  op->resource = resource;
2007 
2009 
2010  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2011 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
int resource
Definition: rdpsnd_sgi.c:44
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_delete_opengl_contexts_cs(), wined3d_device_evict_managed_resources(), and wined3d_texture_update_desc().

◆ wined3d_cs_emit_update_sub_resource()

void wined3d_cs_emit_update_sub_resource ( struct wined3d_cs cs,
struct wined3d_resource resource,
unsigned int  sub_resource_idx,
const struct wined3d_box box,
const void data,
unsigned int  row_pitch,
unsigned int  slice_pitch 
)

Definition at line 2264 of file cs.c.

2267 {
2269  size_t data_size, size;
2270 
2271  if (resource->type != WINED3D_RTYPE_BUFFER && resource->format_flags & WINED3DFMT_FLAG_BLOCKS)
2272  goto no_async;
2273 
2274  data_size = 0;
2275  switch (resource->type)
2276  {
2278  data_size += (box->back - box->front - 1) * slice_pitch;
2279  /* fall-through */
2281  data_size += (box->bottom - box->top - 1) * row_pitch;
2282  /* fall-through */
2284  data_size += (box->right - box->left) * resource->format->byte_count;
2285  break;
2286  case WINED3D_RTYPE_BUFFER:
2287  data_size = box->right - box->left;
2288  break;
2289  case WINED3D_RTYPE_NONE:
2290  return;
2291  }
2292 
2294  if (!cs->ops->check_space(cs, size, WINED3D_CS_QUEUE_DEFAULT))
2295  goto no_async;
2296 
2297  op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
2299  op->resource = resource;
2300  op->sub_resource_idx = sub_resource_idx;
2301  op->box = *box;
2302  op->data.row_pitch = row_pitch;
2303  op->data.slice_pitch = slice_pitch;
2304  op->data.data = op->copy_data;
2305  memcpy(op->copy_data, data, data_size);
2306 
2308 
2309  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2310  return;
2311 
2312 no_async:
2314 
2315  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
2317  op->resource = resource;
2318  op->sub_resource_idx = sub_resource_idx;
2319  op->box = *box;
2320  op->data.row_pitch = row_pitch;
2321  op->data.slice_pitch = slice_pitch;
2322  op->data.data = data;
2323 
2325 
2326  cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP);
2327  cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP);
2328 }
#define WINED3DFMT_FLAG_BLOCKS
static void wined3d_resource_acquire(struct wined3d_resource *resource)
int resource
Definition: rdpsnd_sgi.c:44
static void wined3d_resource_wait_idle(struct wined3d_resource *resource)
uint32_t cs
Definition: isohybrid.c:75
struct wined3d_box box
Definition: cs.c:409
unsigned int sub_resource_idx
Definition: cs.c:408
size_t size
Definition: cs.c:1803
GLsizeiptr size
Definition: glext.h:5919
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
UINT op
Definition: effect.c:223
Definition: palette.c:467

Referenced by wined3d_device_update_sub_resource().

◆ wined3d_cs_exec_add_dirty_texture_region()

static void wined3d_cs_exec_add_dirty_texture_region ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 2330 of file cs.c.

2331 {
2333  struct wined3d_texture *texture = op->texture;
2334  unsigned int sub_resource_idx, i;
2335  struct wined3d_context *context;
2336 
2337  context = context_acquire(cs->device, NULL, 0);
2338  sub_resource_idx = op->layer * texture->level_count;
2339  for (i = 0; i < texture->level_count; ++i, ++sub_resource_idx)
2340  {
2343  else
2344  ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
2345  }
2347 
2348  wined3d_resource_release(&texture->resource);
2349 }
Definition: http.c:6587
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const char * wined3d_debug_location(DWORD location)
Definition: utils.c:6306
smooth NULL
Definition: ftsmooth.c:416
void context_release(struct wined3d_context *context)
Definition: context.c:1559
GLenum GLuint texture
Definition: glext.h:6295
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define ERR(fmt,...)
Definition: debug.h:109
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:4218
static void wined3d_resource_release(struct wined3d_resource *resource)
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
Definition: texture.c:310
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
Definition: texture.c:380
UINT op
Definition: effect.c:223
unsigned int sub_resource_idx

◆ wined3d_cs_exec_blt_sub_resource()

static void wined3d_cs_exec_blt_sub_resource ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 2074 of file cs.c.

2075 {
2076  const struct wined3d_cs_blt_sub_resource *op = data;
2077 
2078  if (op->dst_resource->type == WINED3D_RTYPE_BUFFER)
2079  {
2080  wined3d_buffer_copy(buffer_from_resource(op->dst_resource), op->dst_box.left,
2081  buffer_from_resource(op->src_resource), op->src_box.left,
2082  op->src_box.right - op->src_box.left);
2083  }
2084  else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_3D)
2085  {
2086  struct wined3d_texture *src_texture, *dst_texture;
2087  unsigned int level, update_w, update_h, update_d;
2088  unsigned int row_pitch, slice_pitch;
2089  struct wined3d_context *context;
2090  struct wined3d_bo_address addr;
2091 
2092  if (op->flags & ~WINED3D_BLT_RAW)
2093  {
2094  FIXME("Flags %#x not implemented for %s resources.\n",
2095  op->flags, debug_d3dresourcetype(op->dst_resource->type));
2096  goto error;
2097  }
2098 
2099  if (!(op->flags & WINED3D_BLT_RAW) && op->src_resource->format != op->dst_resource->format)
2100  {
2101  FIXME("Format conversion not implemented for %s resources.\n",
2102  debug_d3dresourcetype(op->dst_resource->type));
2103  goto error;
2104  }
2105 
2106  update_w = op->dst_box.right - op->dst_box.left;
2107  update_h = op->dst_box.bottom - op->dst_box.top;
2108  update_d = op->dst_box.back - op->dst_box.front;
2109  if (op->src_box.right - op->src_box.left != update_w
2110  || op->src_box.bottom - op->src_box.top != update_h
2111  || op->src_box.back - op->src_box.front != update_d)
2112  {
2113  FIXME("Stretching not implemented for %s resources.\n",
2114  debug_d3dresourcetype(op->dst_resource->type));
2115  goto error;
2116  }
2117 
2118  dst_texture = texture_from_resource(op->dst_resource);
2119  src_texture = texture_from_resource(op->src_resource);
2120 
2121  context = context_acquire(cs->device, NULL, 0);
2122 
2123  if (!wined3d_texture_load_location(src_texture, op->src_sub_resource_idx,
2124  context, src_texture->resource.map_binding))
2125  {
2126  ERR("Failed to load source sub-resource into %s.\n",
2127  wined3d_debug_location(src_texture->resource.map_binding));
2129  goto error;
2130  }
2131 
2132  level = op->dst_sub_resource_idx % dst_texture->level_count;
2133  if (update_w == wined3d_texture_get_level_width(dst_texture, level)
2134  && update_h == wined3d_texture_get_level_height(dst_texture, level)
2135  && update_d == wined3d_texture_get_level_depth(dst_texture, level))
2136  {
2138  }
2139  else if (!wined3d_texture_load_location(dst_texture, op->dst_sub_resource_idx,
2141  {
2142  ERR("Failed to load destination sub-resource.\n");
2144  goto error;
2145  }
2146 
2147  wined3d_texture_get_memory(src_texture, op->src_sub_resource_idx, &addr, src_texture->resource.map_binding);
2148  wined3d_texture_get_pitch(src_texture, op->src_sub_resource_idx % src_texture->level_count,
2149  &row_pitch, &slice_pitch);
2150 
2152  wined3d_texture_upload_data(dst_texture, op->dst_sub_resource_idx, context,
2153  dst_texture->resource.format, &op->src_box, wined3d_const_bo_address(&addr),
2154  row_pitch, slice_pitch, op->dst_box.left, op->dst_box.top, op->dst_box.front, FALSE);
2155  wined3d_texture_validate_location(dst_texture, op->dst_sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB);
2156  wined3d_texture_invalidate_location(dst_texture, op->dst_sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB);
2157 
2159  }
2160  else
2161  {
2162  if (FAILED(texture2d_blt(texture_from_resource(op->dst_resource), op->dst_sub_resource_idx,
2163  &op->dst_box, texture_from_resource(op->src_resource), op->src_sub_resource_idx,
2164  &op->src_box, op->flags, &op->fx, op->filter)))
2165  FIXME("Blit failed.\n");
2166  }
2167 
2168 error:
2169  if (op->src_resource)
2170  wined3d_resource_release(op->src_resource);
2171  wined3d_resource_release(op->dst_resource);
2172 }
GLint level
Definition: gl.h:1546
static unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture, unsigned int level)
#define error(str)
Definition: mkdosfs.c:1605
Definition: http.c:6587
static unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture, unsigned int level)
void wined3d_texture_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
Definition: texture.c:1706
static unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture, unsigned int level)
struct wined3d_resource resource
unsigned int row_pitch
uint32_t cs
Definition: isohybrid.c:75
#define WINED3D_BLT_RAW
Definition: wined3d.h:1366
const char * wined3d_debug_location(DWORD location)
Definition: utils.c:6306
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, const struct wined3d_format *format, const struct wined3d_box *src_box, const struct wined3d_const_bo_address *data, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, BOOL srgb)
Definition: texture.c:1887
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_bo_address *data, DWORD locations)
Definition: texture.c:436
void context_release(struct wined3d_context *context)
Definition: context.c:1559
void wined3d_texture_validate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
Definition: texture.c:286
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)
GLenum const GLvoid * addr
Definition: glext.h:9621
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)
unsigned int slice_pitch
#define ERR(fmt,...)
Definition: debug.h:109
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:4218
static void wined3d_resource_release(struct wined3d_resource *resource)
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
Definition: texture.c:310
#define WINED3D_LOCATION_TEXTURE_RGB
HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: surface.c:3465
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
Definition: texture.c:380
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
Definition: utils.c:4271
UINT op
Definition: effect.c:223
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
Definition: texture.c:1064
void wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size)
Definition: buffer.c:1190
void CDECL wined3d_texture_get_pitch(const struct wined3d_texture *texture, unsigned int level, unsigned int *row_pitch, unsigned int *slice_pitch)
Definition: texture.c:1364

◆ wined3d_cs_exec_callback()

static void wined3d_cs_exec_callback ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1888 of file cs.c.

1889 {
1890  const struct wined3d_cs_callback *op = data;
1891 
1892  op->callback(op->object);
1893 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_clear()

static void wined3d_cs_exec_clear ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 508 of file cs.c.

509 {
510  const struct wined3d_cs_clear *op = data;
511  struct wined3d_device *device;
512  unsigned int i;
513 
514  device = cs->device;
515  device->blitter->ops->blitter_clear(device->blitter, device, op->rt_count, op->fb,
516  op->rect_count, op->rects, &op->draw_rect, op->flags, &op->color, op->depth, op->stencil);
517 
518  if (op->flags & WINED3DCLEAR_TARGET)
519  {
520  for (i = 0; i < op->rt_count; ++i)
521  {
522  if (op->fb->render_targets[i])
523  wined3d_resource_release(op->fb->render_targets[i]->resource);
524  }
525  }
527  wined3d_resource_release(op->fb->depth_stencil->resource);
528 }
#define WINED3DCLEAR_STENCIL
Definition: wined3d.h:1001
#define WINED3DCLEAR_ZBUFFER
Definition: wined3d.h:1000
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: devices.h:37
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define WINED3DCLEAR_TARGET
Definition: wined3d.h:999
static void wined3d_resource_release(struct wined3d_resource *resource)
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_clear_unordered_access_view()

static void wined3d_cs_exec_clear_unordered_access_view ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 2366 of file cs.c.

2367 {
2369  struct wined3d_unordered_access_view *view = op->view;
2370  struct wined3d_context *context;
2371 
2372  context = context_acquire(cs->device, NULL, 0);
2375 
2376  wined3d_resource_release(view->resource);
2377 }
Definition: http.c:6587
uint32_t cs
Definition: isohybrid.c:75
smooth NULL
Definition: ftsmooth.c:416
void context_release(struct wined3d_context *context)
Definition: context.c:1559
void wined3d_unordered_access_view_clear_uint(struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, struct wined3d_context *context)
Definition: view.c:1000
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:4218
static void wined3d_resource_release(struct wined3d_resource *resource)
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_copy_uav_counter()

static void wined3d_cs_exec_copy_uav_counter ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 2394 of file cs.c.

2395 {
2396  const struct wined3d_cs_copy_uav_counter *op = data;
2397  struct wined3d_unordered_access_view *view = op->view;
2398  struct wined3d_context *context;
2399 
2400  context = context_acquire(cs->device, NULL, 0);
2403 
2404  wined3d_resource_release(&op->buffer->resource);
2405  wined3d_resource_release(view->resource);
2406 }
Definition: http.c:6587
void wined3d_unordered_access_view_copy_counter(struct wined3d_unordered_access_view *view, struct wined3d_buffer *buffer, unsigned int offset, struct wined3d_context *context)
Definition: view.c:1059
uint32_t cs
Definition: isohybrid.c:75
smooth NULL
Definition: ftsmooth.c:416
void context_release(struct wined3d_context *context)
Definition: context.c:1559
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:4218
static void wined3d_resource_release(struct wined3d_resource *resource)
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_dispatch()

static void wined3d_cs_exec_dispatch ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 724 of file cs.c.

725 {
726  const struct wined3d_cs_dispatch *op = data;
727  struct wined3d_state *state = &cs->state;
728 
729  dispatch_compute(cs->device, state, &op->parameters);
730 
731  if (op->parameters.indirect)
732  wined3d_resource_release(&op->parameters.u.indirect.buffer->resource);
733 
736  state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
737 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *parameters)
Definition: context.c:4303
uint32_t cs
Definition: isohybrid.c:75
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static int state
Definition: maze.c:121
static void release_shader_resources(const struct wined3d_state *state, unsigned int shader_mask)
Definition: cs.c:651
static void wined3d_resource_release(struct wined3d_resource *resource)
static void release_unordered_access_resources(const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
Definition: cs.c:704
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_draw()

static void wined3d_cs_exec_draw ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 782 of file cs.c.

783 {
784  const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
785  const struct wined3d_shader *geometry_shader;
786  struct wined3d_state *state = &cs->state;
787  const struct wined3d_cs_draw *op = data;
788  int load_base_vertex_idx;
789  unsigned int i;
790 
791  /* ARB_draw_indirect always supports a base vertex offset. */
792  if (!op->parameters.indirect && !gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
793  load_base_vertex_idx = op->parameters.u.direct.base_vertex_idx;
794  else
795  load_base_vertex_idx = 0;
796 
797  if (state->load_base_vertex_index != load_base_vertex_idx)
798  {
799  state->load_base_vertex_index = load_base_vertex_idx;
801  }
802 
803  if (state->gl_primitive_type != op->primitive_type)
804  {
805  if ((geometry_shader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]) && !geometry_shader->function)
807  if (state->gl_primitive_type == GL_POINTS || op->primitive_type == GL_POINTS)
809  state->gl_primitive_type = op->primitive_type;
810  }
811  state->gl_patch_vertices = op->patch_vertex_count;
812 
813  draw_primitive(cs->device, state, &op->parameters);
814 
815  if (op->parameters.indirect)
816  {
817  struct wined3d_buffer *buffer = op->parameters.u.indirect.buffer;
818  wined3d_resource_release(&buffer->resource);
819  }
820 
821  if (op->parameters.indexed)
822  wined3d_resource_release(&state->index_buffer->resource);
823  for (i = 0; i < ARRAY_SIZE(state->streams); ++i)
824  {
825  if (state->streams[i].buffer)
826  wined3d_resource_release(&state->streams[i].buffer->resource);
827  }
828  for (i = 0; i < ARRAY_SIZE(state->stream_output); ++i)
829  {
830  if (state->stream_output[i].buffer)
831  wined3d_resource_release(&state->stream_output[i].buffer->resource);
832  }
833  for (i = 0; i < ARRAY_SIZE(state->textures); ++i)
834  {
835  if (state->textures[i])
836  wined3d_resource_release(&state->textures[i]->resource);
837  }
838  for (i = 0; i < gl_info->limits.buffers; ++i)
839  {
840  if (state->fb->render_targets[i])
841  wined3d_resource_release(state->fb->render_targets[i]->resource);
842  }
843  if (state->fb->depth_stencil)
844  wined3d_resource_release(state->fb->depth_stencil->resource);
847  state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
848 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define GL_POINTS
Definition: gl.h:190
GLuint buffer
Definition: glext.h:5915
#define STATE_BASEVERTEXINDEX
#define STATE_SHADER(a)
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
BOOL supported[WINED3D_GL_EXT_COUNT]
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static int state
Definition: maze.c:121
static void release_shader_resources(const struct wined3d_state *state, unsigned int shader_mask)
Definition: cs.c:651
static void wined3d_resource_release(struct wined3d_resource *resource)
#define STATE_POINT_ENABLE
#define ARRAY_SIZE(a)
Definition: main.h:24
void device_invalidate_state(const struct wined3d_device *device, DWORD state)
Definition: device.c:5293
static void release_unordered_access_resources(const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
Definition: cs.c:704
UINT op
Definition: effect.c:223
void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_draw_parameters *parameters)
Definition: context.c:4898
struct wined3d_gl_limits limits

◆ wined3d_cs_exec_flush()

static void wined3d_cs_exec_flush ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 931 of file cs.c.

932 {
933  struct wined3d_context *context;
934 
935  context = context_acquire(cs->device, NULL, 0);
936  if (context->valid)
937  context->gl_info->gl_ops.gl.p_glFlush();
939 }
Definition: http.c:6587
uint32_t cs
Definition: isohybrid.c:75
smooth NULL
Definition: ftsmooth.c:416
void context_release(struct wined3d_context *context)
Definition: context.c:1559
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:4218

◆ wined3d_cs_exec_generate_mipmaps()

static void wined3d_cs_exec_generate_mipmaps ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 2425 of file cs.c.

2426 {
2427  const struct wined3d_cs_generate_mipmaps *op = data;
2428  struct wined3d_shader_resource_view *view = op->view;
2429 
2431  wined3d_resource_release(view->resource);
2432 }
void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view *view)
Definition: view.c:847
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static void wined3d_resource_release(struct wined3d_resource *resource)
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_map()

static void wined3d_cs_exec_map ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 2013 of file cs.c.

2014 {
2015  const struct wined3d_cs_map *op = data;
2016  struct wined3d_resource *resource = op->resource;
2017 
2018  *op->hr = resource->resource_ops->resource_sub_resource_map(resource,
2019  op->sub_resource_idx, op->map_desc, op->box, op->flags);
2020 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_nop()

static void wined3d_cs_exec_nop ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 447 of file cs.c.

448 {
449 }

◆ wined3d_cs_exec_preload_resource()

static void wined3d_cs_exec_preload_resource ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1969 of file cs.c.

1970 {
1971  const struct wined3d_cs_preload_resource *op = data;
1972  struct wined3d_resource *resource = op->resource;
1973 
1974  resource->resource_ops->resource_preload(resource);
1976 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static void wined3d_resource_release(struct wined3d_resource *resource)
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_present()

static void wined3d_cs_exec_present ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 451 of file cs.c.

452 {
453  const struct wined3d_cs_present *op = data;
454  struct wined3d_swapchain *swapchain;
455  unsigned int i;
456 
457  swapchain = op->swapchain;
458  wined3d_swapchain_set_window(swapchain, op->dst_window_override);
459  wined3d_swapchain_set_swap_interval(swapchain, op->swap_interval);
460 
461  swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags);
462 
463  wined3d_resource_release(&swapchain->front_buffer->resource);
464  for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
465  {
466  wined3d_resource_release(&swapchain->back_buffers[i]->resource);
467  }
468 
469  InterlockedDecrement(&cs->pending_presents);
470 }
struct wined3d_texture * front_buffer
void wined3d_swapchain_set_swap_interval(struct wined3d_swapchain *swapchain, unsigned int swap_interval)
Definition: swapchain.c:680
struct wined3d_texture ** back_buffers
uint32_t cs
Definition: isohybrid.c:75
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
struct wined3d_swapchain_desc desc
void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window)
Definition: swapchain.c:140
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define InterlockedDecrement
Definition: armddk.h:52
static void wined3d_resource_release(struct wined3d_resource *resource)
UINT op
Definition: effect.c:223
const struct wined3d_swapchain_ops * swapchain_ops

◆ wined3d_cs_exec_push_constants()

static void wined3d_cs_exec_push_constants ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1843 of file cs.c.

1844 {
1845  const struct wined3d_cs_push_constants *op = data;
1846 
1847  wined3d_cs_st_push_constants(cs, op->type, op->start_idx, op->count, op->constants);
1848 }
uint32_t cs
Definition: isohybrid.c:75
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
UINT op
Definition: effect.c:223
static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p, unsigned int start_idx, unsigned int count, const void *constants)
Definition: cs.c:1822

◆ wined3d_cs_exec_query_issue()

static void wined3d_cs_exec_query_issue ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1917 of file cs.c.

1918 {
1919  const struct wined3d_cs_query_issue *op = data;
1920  struct wined3d_query *query = op->query;
1921  BOOL poll;
1922 
1923  poll = query->query_ops->query_issue(query, op->flags);
1924 
1925  if (!cs->thread)
1926  return;
1927 
1928  if (poll && list_empty(&query->poll_list_entry))
1929  {
1930  list_add_tail(&cs->query_poll_list, &query->poll_list_entry);
1931  return;
1932  }
1933 
1934  /* This can happen if occlusion queries are restarted. This discards the
1935  * old result, since polling it could result in a GL error. */
1936  if ((op->flags & WINED3DISSUE_BEGIN) && !poll && !list_empty(&query->poll_list_entry))
1937  {
1938  list_remove(&query->poll_list_entry);
1939  list_init(&query->poll_list_entry);
1940  InterlockedIncrement(&query->counter_retrieved);
1941  return;
1942  }
1943 
1944  /* This can happen when an occlusion query is ended without being started,
1945  * in which case we don't want to poll, but still have to counter-balance
1946  * the increment of the main counter.
1947  *
1948  * This can also happen if an event query is re-issued before the first
1949  * fence was reached. In this case the query is already in the list and
1950  * the poll function will check the new fence. We have to counter-balance
1951  * the discarded increment. */
1952  if (op->flags & WINED3DISSUE_END)
1953  InterlockedIncrement(&query->counter_retrieved);
1954 }
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
uint32_t cs
Definition: isohybrid.c:75
#define WINED3DISSUE_BEGIN
Definition: wined3d.h:770
unsigned int BOOL
Definition: ntddk_ex.h:94
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
int poll(struct pollfd *ufds, int nfds, int timeout)
Definition: adnstest.c:68
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
#define InterlockedIncrement
Definition: armddk.h:53
#define WINED3DISSUE_END
Definition: wined3d.h:771
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_reset_state()

static void wined3d_cs_exec_reset_state ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1868 of file cs.c.

1869 {
1870  struct wined3d_adapter *adapter = cs->device->adapter;
1871 
1872  state_cleanup(&cs->state);
1873  memset(&cs->state, 0, sizeof(cs->state));
1874  state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
1876 }
struct wined3d_gl_info gl_info
struct wined3d_d3d_info d3d_info
uint32_t cs
Definition: isohybrid.c:75
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:527
#define WINED3D_STATE_NO_REF
void state_init(void *ipp)
Definition: dhclient.c:218
#define WINED3D_STATE_INIT_DEFAULT
#define memset(x, y, z)
Definition: compat.h:39

◆ wined3d_cs_exec_set_blend_state()

static void wined3d_cs_exec_set_blend_state ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1471 of file cs.c.

1472 {
1473  const struct wined3d_cs_set_blend_state *op = data;
1474 
1475  cs->state.blend_state = op->state;
1477 }
uint32_t cs
Definition: isohybrid.c:75
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define STATE_BLEND
void device_invalidate_state(const struct wined3d_device *device, DWORD state)
Definition: device.c:5293
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_set_clip_plane()

static void wined3d_cs_exec_set_clip_plane ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1596 of file cs.c.

1597 {
1598  const struct wined3d_cs_set_clip_plane *op = data;
1599 
1600  cs->state.clip_planes[op->plane_idx] = op->plane;
1601  device_invalidate_state(cs->device, STATE_CLIPPLANE(op->plane_idx));
1602 }
#define STATE_CLIPPLANE(a)
uint32_t cs
Definition: isohybrid.c:75
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
void device_invalidate_state(const struct wined3d_device *device, DWORD state)
Definition: device.c:5293
UINT op
Definition: effect.c:223

◆ wined3d_cs_exec_set_color_key()

static void wined3d_cs_exec_set_color_key ( struct wined3d_cs cs,
const void data 
)
static

Definition at line 1616 of file cs.c.

1617 {
1618  const struct wined3d_cs_set_color_key *op = data;
1619  struct wined3d_texture *texture = op->texture;
1620 
1621  if (op->set)
1622  {
1623  switch (op->flags)
1624  {
1625  case WINED3D_CKEY_DST_BLT:
1626  texture->async.dst_blt_color_key = op->color_key;
1627  texture->async.color_key_flags |= WINED3D_CKEY_DST_BLT;
1628  break;
1629 
1631  texture->async.dst_overlay_color_key = op->color_key;
1632  texture->async.color_key_flags |= WINED3D_CKEY_DST_OVERLAY;
1633  break;
1634 
1635  case WINED3D_CKEY_SRC_BLT:
1636  if (texture == cs->state.textures[0])
1637  {
1639  if (!(texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT))
1641  }
1642 
1643  texture->async.src_blt_color_key = op->color_key;
1644  texture->async.color_key_flags |= WINED3D_CKEY_SRC_BLT;
1645  break;
1646 
1648  texture->async.src_overlay_color_key = op->color_key;
1649  texture->async.color_key_flags |= WINED3D_CKEY_SRC_OVERLAY;
1650  break;
1651  }
1652  }
1653  else
1654  {
1655  switch (op->flags)
1656  {
1657  case WINED3D_CKEY_DST_BLT:
1658  texture->async.color_key_flags &= ~WINED3D_CKEY_DST_BLT;
1659  break;
1660 
1662  texture->async.color_key_flags &= ~WINED3D_CKEY_DST_OVERLAY;
1663  break;
1664 
1665  case WINED3D_CKEY_SRC_BLT:
1666  if (texture == cs->state.textures[0] && texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT)
1667