ReactOS  0.4.14-dev-115-g4576127
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_viewport
 
struct  wined3d_cs_set_scissor_rect
 
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_VIEWPORT,
  WINED3D_CS_OP_SET_SCISSOR_RECT, 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, DWORD 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_viewport (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_viewport (struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
 
static void wined3d_cs_exec_set_scissor_rect (struct wined3d_cs *cs, const void *data)
 
void wined3d_cs_emit_set_scissor_rect (struct wined3d_cs *cs, const RECT *rect)
 
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 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 voidwined3d_cs_queue_require_space (struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs)
 
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_VIEWPORT 
WINED3D_CS_OP_SET_SCISSOR_RECT 
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 731 of file cs.c.

732 {
735  state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
736 }
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:610
static void acquire_unordered_access_resources(const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
Definition: cs.c:676

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 839 of file cs.c.

841 {
842  unsigned int i;
843 
844  if (indexed)
845  wined3d_resource_acquire(&state->index_buffer->resource);
846  for (i = 0; i < ARRAY_SIZE(state->streams); ++i)
847  {
848  if (state->streams[i].buffer)
849  wined3d_resource_acquire(&state->streams[i].buffer->resource);
850  }
851  for (i = 0; i < ARRAY_SIZE(state->stream_output); ++i)
852  {
853  if (state->stream_output[i].buffer)
854  wined3d_resource_acquire(&state->stream_output[i].buffer->resource);
855  }
856  for (i = 0; i < ARRAY_SIZE(state->textures); ++i)
857  {
858  if (state->textures[i])
859  wined3d_resource_acquire(&state->textures[i]->resource);
860  }
861  for (i = 0; i < gl_info->limits.buffers; ++i)
862  {
863  if (state->fb->render_targets[i])
864  wined3d_resource_acquire(state->fb->render_targets[i]->resource);
865  }
866  if (state->fb->depth_stencil)
867  wined3d_resource_acquire(state->fb->depth_stencil->resource);
870  state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
871 }
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:610
#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:676

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 610 of file cs.c.

611 {
614  struct wined3d_shader *shader;
615  unsigned int i, j;
616 
617  for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
618  {
619  if (!(shader_mask & (1u << i)))
620  continue;
621 
622  if (!(shader = state->shader[i]))
623  continue;
624 
625  for (j = 0; j < WINED3D_MAX_CBS; ++j)
626  {
627  if (state->cb[i][j])
628  wined3d_resource_acquire(&state->cb[i][j]->resource);
629  }
630 
631  for (j = 0; j < shader->reg_maps.sampler_map.count; ++j)
632  {
633  entry = &shader->reg_maps.sampler_map.entries[j];
634 
635  if (!(view = state->shader_resource_view[i][entry->resource_idx]))
636  continue;
637 
638  wined3d_resource_acquire(view->resource);
639  }
640  }
641 }
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 676 of file cs.c.

678 {
679  unsigned int i;
680 
681  if (!shader)
682  return;
683 
684  for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i)
685  {
686  if (!shader->reg_maps.uav_resource_info[i].type)
687  continue;
688 
689  if (!views[i])
690  continue;
691 
693  }
694 }
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 2727 of file cs.c.

2728 {
2729  struct wined3d_query *query, *cursor;
2730 
2732  {
2733  if (!query->query_ops->query_poll(query, 0))
2734  continue;
2735 
2736  list_remove(&query->poll_list_entry);
2737  list_init(&query->poll_list_entry);
2738  InterlockedIncrement(&query->counter_retrieved);
2739  }
2740 }
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 643 of file cs.c.

644 {
647  struct wined3d_shader *shader;
648  unsigned int i, j;
649 
650  for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
651  {
652  if (!(shader_mask & (1u << i)))
653  continue;
654 
655  if (!(shader = state->shader[i]))
656  continue;
657 
658  for (j = 0; j < WINED3D_MAX_CBS; ++j)
659  {
660  if (state->cb[i][j])
661  wined3d_resource_release(&state->cb[i][j]->resource);
662  }
663 
664  for (j = 0; j < shader->reg_maps.sampler_map.count; ++j)
665  {
666  entry = &shader->reg_maps.sampler_map.entries[j];
667 
668  if (!(view = state->shader_resource_view[i][entry->resource_idx]))
669  continue;
670 
671  wined3d_resource_release(view->resource);
672  }
673  }
674 }
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 696 of file cs.c.

698 {
699  unsigned int i;
700 
701  if (!shader)
702  return;
703 
704  for (i = 0; i < MAX_UNORDERED_ACCESS_VIEWS; ++i)
705  {
706  if (!shader->reg_maps.uav_resource_info[i].type)
707  continue;
708 
709  if (!views[i])
710  continue;
711 
713  }
714 }
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 2828 of file cs.c.

2829 {
2830  const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
2831  struct wined3d_cs *cs;
2832 
2833  if (!(cs = heap_alloc_zero(sizeof(*cs))))
2834  return NULL;
2835 
2836  cs->ops = &wined3d_cs_st_ops;
2837  cs->device = device;
2838 
2839  state_init(&cs->state, &cs->fb, gl_info, &device->adapter->d3d_info,
2841 
2842  cs->data_size = WINED3D_INITIAL_CS_SIZE;
2843  if (!(cs->data = heap_alloc(cs->data_size)))
2844  goto fail;
2845 
2848  {
2849  cs->ops = &wined3d_cs_mt_ops;
2850 
2851  if (!(cs->event = CreateEventW(NULL, FALSE, FALSE, NULL)))
2852  {
2853  ERR("Failed to create command stream event.\n");
2854  heap_free(cs->data);
2855  goto fail;
2856  }
2857 
2858  if (!(GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
2859  (const WCHAR *)wined3d_cs_run, &cs->wined3d_module)))
2860  {
2861  ERR("Failed to get wined3d module handle.\n");
2862  CloseHandle(cs->event);
2863  heap_free(cs->data);
2864  goto fail;
2865  }
2866 
2867  if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, NULL)))
2868  {
2869  ERR("Failed to create wined3d command stream thread.\n");
2870  FreeLibrary(cs->wined3d_module);
2871  CloseHandle(cs->event);
2872  heap_free(cs->data);
2873  goto fail;
2874  }
2875  }
2876 
2877  return cs;
2878 
2879 fail:
2880  state_cleanup(&cs->state);
2881  heap_free(cs);
2882  return NULL;
2883 }
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:651
uint32_t cs
Definition: isohybrid.c:75
static const struct wined3d_cs_ops wined3d_cs_mt_ops
Definition: cs.c:2716
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:136
smooth NULL
Definition: ftsmooth.c:416
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:528
#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:2761
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:875
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:2569
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 2885 of file cs.c.

2886 {
2887  if (cs->thread)
2888  {
2890  CloseHandle(cs->thread);
2891  if (!CloseHandle(cs->event))
2892  ERR("Closing event failed.\n");
2893  }
2894 
2895  state_cleanup(&cs->state);
2896  heap_free(cs->data);
2897  heap_free(cs);
2898 }
#define CloseHandle
Definition: compat.h:398
uint32_t cs
Definition: isohybrid.c:75
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:528
static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
Definition: cs.c:2449
#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 2353 of file cs.c.

2355 {
2357 
2358  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2360  op->texture = texture;
2361  op->layer = layer;
2362 
2363  wined3d_resource_acquire(&texture->resource);
2364 
2365  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2366 }
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 2172 of file cs.c.

2176 {
2178 
2179  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2181  op->dst_resource = dst_resource;
2182  op->dst_sub_resource_idx = dst_sub_resource_idx;
2183  op->dst_box = *dst_box;
2184  op->src_resource = src_resource;
2185  op->src_sub_resource_idx = src_sub_resource_idx;
2186  op->src_box = *src_box;
2187  op->flags = flags;
2188  if (fx)
2189  op->fx = *fx;
2190  else
2191  memset(&op->fx, 0, sizeof(op->fx));
2192  op->filter = filter;
2193 
2195  if (src_resource)
2197 
2198  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2200  cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT);
2201 }
struct wined3d_resource * src_resource
Definition: cs.c:394
#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:395
struct wined3d_box src_box
Definition: cs.c:396
struct wined3d_box dst_box
Definition: cs.c:393
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
struct wined3d_resource * dst_resource
Definition: cs.c:391
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:392

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 1873 of file cs.c.

1874 {
1875  struct wined3d_cs_callback *op;
1876 
1877  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1878  op->opcode = WINED3D_CS_OP_CALLBACK;
1879  op->callback = callback;
1880  op->object = object;
1881 
1882  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1883 }
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 536 of file cs.c.

538 {
539  unsigned int rt_count = cs->device->adapter->gl_info.limits.buffers;
540  const struct wined3d_state *state = &cs->device->state;
541  const struct wined3d_viewport *vp = &state->viewport;
542  struct wined3d_cs_clear *op;
543  unsigned int i;
544 
545  op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]),
547  op->opcode = WINED3D_CS_OP_CLEAR;
548  op->flags = flags;
549  op->rt_count = rt_count;
550  op->fb = &cs->fb;
551  SetRect(&op->draw_rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height);
552  if (state->render_states[WINED3D_RS_SCISSORTESTENABLE])
553  IntersectRect(&op->draw_rect, &op->draw_rect, &state->scissor_rect);
554  op->color = *color;
555  op->depth = depth;
556  op->stencil = stencil;
557  op->rect_count = rect_count;
558  memcpy(op->rects, rects, sizeof(*rects) * rect_count);
559 
561  {
562  for (i = 0; i < rt_count; ++i)
563  {
564  if (state->fb->render_targets[i])
565  wined3d_resource_acquire(state->fb->render_targets[i]->resource);
566  }
567  }
569  wined3d_resource_acquire(state->fb->depth_stencil->resource);
570 
571  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
572 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
#define WINED3DCLEAR_STENCIL
Definition: wined3d.h:999
GLint GLfloat GLint stencil
Definition: glext.h:6260
#define WINED3DCLEAR_ZBUFFER
Definition: wined3d.h:998
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:997
#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
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 574 of file cs.c.

576 {
577  struct wined3d_cs_clear *op;
578  size_t size;
579 
580  size = FIELD_OFFSET(struct wined3d_cs_clear, rects[1]) + sizeof(struct wined3d_fb_state);
581  op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
582  op->fb = (void *)&op->rects[1];
583 
584  op->opcode = WINED3D_CS_OP_CLEAR;
585  op->flags = flags;
587  {
588  op->rt_count = 1;
589  op->fb->render_targets[0] = view;
590  op->fb->depth_stencil = NULL;
591  op->color = *color;
592  }
593  else
594  {
595  op->rt_count = 0;
596  op->fb->render_targets[0] = NULL;
597  op->fb->depth_stencil = view;
598  op->depth = depth;
599  op->stencil = stencil;
600  }
601  SetRect(&op->draw_rect, 0, 0, view->width, view->height);
602  op->rect_count = 1;
603  op->rects[0] = *rect;
604 
605  wined3d_resource_acquire(view->resource);
606 
607  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
608 }
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:1781
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:997
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 2381 of file cs.c.

2383 {
2385 
2386  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2388  op->view = view;
2389  op->clear_value = *clear_value;
2390 
2391  wined3d_resource_acquire(view->resource);
2392 
2393  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2394 }
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 2410 of file cs.c.

2412 {
2414 
2415  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2417  op->buffer = dst_buffer;
2418  op->offset = offset;
2419  op->view = uav;
2420 
2421  wined3d_resource_acquire(&dst_buffer->resource);
2423 
2424  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2425 }
static void wined3d_resource_acquire(struct wined3d_resource *resource)
size_t offset
Definition: cs.c:1780
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 738 of file cs.c.

740 {
741  const struct wined3d_state *state = &cs->device->state;
742  struct wined3d_cs_dispatch *op;
743 
744  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
745  op->opcode = WINED3D_CS_OP_DISPATCH;
746  op->parameters.indirect = FALSE;
747  op->parameters.u.direct.group_count_x = group_count_x;
748  op->parameters.u.direct.group_count_y = group_count_y;
749  op->parameters.u.direct.group_count_z = group_count_z;
750 
752 
753  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
754 }
uint32_t cs
Definition: isohybrid.c:75
static void acquire_compute_pipeline_resources(const struct wined3d_state *state)
Definition: cs.c:731
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 756 of file cs.c.

758 {
759  const struct wined3d_state *state = &cs->device->state;
760  struct wined3d_cs_dispatch *op;
761 
762  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
763  op->opcode = WINED3D_CS_OP_DISPATCH;
764  op->parameters.indirect = TRUE;
765  op->parameters.u.indirect.buffer = buffer;
766  op->parameters.u.indirect.offset = offset;
767 
769  wined3d_resource_acquire(&buffer->resource);
770 
771  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
772 }
#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:1780
uint32_t cs
Definition: isohybrid.c:75
static void acquire_compute_pipeline_resources(const struct wined3d_state *state)
Definition: cs.c:731
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 873 of file cs.c.

876 {
877  const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
878  const struct wined3d_state *state = &cs->device->state;
879  struct wined3d_cs_draw *op;
880 
881  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
882  op->opcode = WINED3D_CS_OP_DRAW;
883  op->primitive_type = primitive_type;
884  op->patch_vertex_count = patch_vertex_count;
885  op->parameters.indirect = FALSE;
886  op->parameters.u.direct.base_vertex_idx = base_vertex_idx;
887  op->parameters.u.direct.start_idx = start_idx;
888  op->parameters.u.direct.index_count = index_count;
889  op->parameters.u.direct.start_instance = start_instance;
890  op->parameters.u.direct.instance_count = instance_count;
891  op->parameters.indexed = indexed;
892 
893  acquire_graphics_pipeline_resources(state, indexed, gl_info);
894 
895  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
896 }
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:839
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 898 of file cs.c.

900 {
901  const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
902  const struct wined3d_state *state = &cs->device->state;
903  struct wined3d_cs_draw *op;
904 
905  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
906  op->opcode = WINED3D_CS_OP_DRAW;
907  op->primitive_type = primitive_type;
908  op->patch_vertex_count = patch_vertex_count;
909  op->parameters.indirect = TRUE;
910  op->parameters.u.indirect.buffer = buffer;
911  op->parameters.u.indirect.offset = offset;
912  op->parameters.indexed = indexed;
913 
914  acquire_graphics_pipeline_resources(state, indexed, gl_info);
915  wined3d_resource_acquire(&buffer->resource);
916 
917  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
918 }
#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:1780
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:839
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 930 of file cs.c.

931 {
932  struct wined3d_cs_flush *op;
933 
934  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
935  op->opcode = WINED3D_CS_OP_FLUSH;
936 
937  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
938  cs->queries_flushed = TRUE;
939 }
#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 2436 of file cs.c.

2437 {
2439 
2440  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2442  op->view = view;
2443 
2444  wined3d_resource_acquire(view->resource);
2445 
2446  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2447 }
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 1956 of file cs.c.

1957 {
1959 
1960  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1962  op->resource = resource;
1963 
1965 
1966  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1967 }
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,
DWORD  swap_interval,
DWORD  flags 
)

Definition at line 477 of file cs.c.

480 {
481  struct wined3d_cs_present *op;
482  unsigned int i;
483  LONG pending;
484 
485  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
486  op->opcode = WINED3D_CS_OP_PRESENT;
487  op->dst_window_override = dst_window_override;
488  op->swapchain = swapchain;
489  op->src_rect = *src_rect;
490  op->dst_rect = *dst_rect;
491  op->swap_interval = swap_interval;
492  op->flags = flags;
493 
494  pending = InterlockedIncrement(&cs->pending_presents);
495 
496  wined3d_resource_acquire(&swapchain->front_buffer->resource);
497  for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
498  {
499  wined3d_resource_acquire(&swapchain->back_buffers[i]->resource);
500  }
501 
502  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
503 
504  /* Limit input latency by limiting the number of presents that we can get
505  * ahead of the worker thread. We have a constant limit here, but
506  * IDXGIDevice1 allows tuning this. */
507  while (pending > 1)
508  {
509  wined3d_pause();
510  pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0);
511  }
512 }
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
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
DWORD swap_interval
Definition: cs.c:97

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 1934 of file cs.c.

1935 {
1936  struct wined3d_cs_query_issue *op;
1937 
1938  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1939  op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
1940  op->query = query;
1941  op->flags = flags;
1942 
1943  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1944  cs->queries_flushed = FALSE;
1945 }
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 1856 of file cs.c.

1857 {
1858  struct wined3d_cs_reset_state *op;
1859 
1860  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1861  op->opcode = WINED3D_CS_OP_RESET_STATE;
1862 
1863  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1864 }
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 1457 of file cs.c.

1458 {
1460 
1461  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1463  op->state = state;
1464 
1465  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1466 }
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 1582 of file cs.c.

1583 {
1584  struct wined3d_cs_set_clip_plane *op;
1585 
1586  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1587  op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
1588  op->plane_idx = plane_idx;
1589  op->plane = *plane;
1590 
1591  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1592 }
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 1657 of file cs.c.

1659 {
1660  struct wined3d_cs_set_color_key *op;
1661 
1662  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1663  op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
1664  op->texture = texture;
1665  op->flags = flags;
1666  if (color_key)
1667  {
1668  op->color_key = *color_key;
1669  op->set = 1;
1670  }
1671  else
1672  op->set = 0;
1673 
1674  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1675 }
struct wined3d_color_key color_key
Definition: cs.c:226
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 1228 of file cs.c.

1230 {
1232 
1233  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1235  op->type = type;
1236  op->cb_idx = cb_idx;
1237  op->buffer = buffer;
1238 
1239  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1240 }
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 1057 of file cs.c.

1058 {
1060 
1061  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1063  op->view = view;
1064 
1065  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1066 }
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 1198 of file cs.c.

1200 {
1202 
1203  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1205  op->buffer = buffer;
1206  op->format_id = format_id;
1207  op->offset = offset;
1208 
1209  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1210 }
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1780
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 1733 of file cs.c.

1734 {
1735  struct wined3d_cs_set_light *op;
1736 
1737  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1738  op->opcode = WINED3D_CS_OP_SET_LIGHT;
1739  op->light = *light;
1740 
1741  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1742 }
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 1766 of file cs.c.

1767 {
1769 
1770  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1772  op->idx = idx;
1773  op->enable = enable;
1774 
1775  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1776 }
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 1685 of file cs.c.

1686 {
1687  struct wined3d_cs_set_material *op;
1688 
1689  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1690  op->opcode = WINED3D_CS_OP_SET_MATERIAL;
1691  op->material = *material;
1692 
1693  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1694 }
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223
struct wined3d_material material
Definition: cs.c:313

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 949 of file cs.c.

950 {
952 
953  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
955  op->predicate = predicate;
956  op->value = value;
957 
958  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
959 }
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 1476 of file cs.c.

1478 {
1480 
1481  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1483  op->state = rasterizer_state;
1484 
1485  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1486 }
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 1496 of file cs.c.

1497 {
1499 
1500  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1502  op->state = state;
1503  op->value = value;
1504 
1505  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1506 }
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 1007 of file cs.c.

1009 {
1011 
1012  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1014  op->view_idx = view_idx;
1015  op->view = view;
1016 
1017  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1018 }
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 1411 of file cs.c.

1413 {
1414  struct wined3d_cs_set_sampler *op;
1415 
1416  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1417  op->opcode = WINED3D_CS_OP_SET_SAMPLER;
1418  op->type = type;
1419  op->sampler_idx = sampler_idx;
1420  op->sampler = sampler;
1421 
1422  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1423 }
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 1538 of file cs.c.

1540 {
1542 
1543  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1545  op->sampler_idx = sampler_idx;
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_sampler_state(), and wined3d_texture_set_lod().

◆ wined3d_cs_emit_set_scissor_rect()

void wined3d_cs_emit_set_scissor_rect ( struct wined3d_cs cs,
const RECT rect 
)

Definition at line 988 of file cs.c.

989 {
991 
992  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
994  op->rect = *rect;
995 
996  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
997 }
& rect
Definition: startmenu.cpp:1413
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

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

◆ 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 1437 of file cs.c.

1438 {
1439  struct wined3d_cs_set_shader *op;
1440 
1441  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1442  op->opcode = WINED3D_CS_OP_SET_SHADER;
1443  op->type = type;
1444  op->shader = shader;
1445 
1446  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1447 }
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 1352 of file cs.c.

1354 {
1356 
1357  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1359  op->type = type;
1360  op->view_idx = view_idx;
1361  op->view = view;
1362 
1363  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1364 }
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 1166 of file cs.c.

1168 {
1170 
1171  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1173  op->stream_idx = stream_idx;
1174  op->buffer = buffer;
1175  op->offset = offset;
1176 
1177  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1178 }
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1780
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 1107 of file cs.c.

1109 {
1111 
1112  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1114  op->stream_idx = stream_idx;
1115  op->buffer = buffer;
1116  op->offset = offset;
1117  op->stride = stride;
1118 
1119  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1120 }
GLuint buffer
Definition: glext.h:5915
size_t offset
Definition: cs.c:1780
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 1134 of file cs.c.

1135 {
1137 
1138  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1140  op->stream_idx = stream_idx;
1141  op->frequency = frequency;
1142  op->flags = flags;
1143 
1144  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1145 }
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 1321 of file cs.c.

1322 {
1323  struct wined3d_cs_set_texture *op;
1324 
1325  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1326  op->opcode = WINED3D_CS_OP_SET_TEXTURE;
1327  op->stage = stage;
1328  op->texture = texture;
1329 
1330  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1331 }
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 1516 of file cs.c.

1518 {
1520 
1521  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1523  op->stage = stage;
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_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 1561 of file cs.c.

1563 {
1564  struct wined3d_cs_set_transform *op;
1565 
1566  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1567  op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
1568  op->state = state;
1569  op->matrix = *matrix;
1570 
1571  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1572 }
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 1385 of file cs.c.

1387 {
1389 
1390  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1392  op->pipeline = pipeline;
1393  op->view_idx = view_idx;
1394  op->view = view;
1395  op->initial_count = initial_count;
1396 
1397  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1398 }
enum wined3d_pipeline pipeline
Definition: cs.c:240
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 1076 of file cs.c.

1077 {
1079 
1080  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
1082  op->declaration = declaration;
1083 
1084  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
1085 }
struct wined3d_vertex_declaration * declaration
Definition: cs.c:169
uint32_t cs
Definition: isohybrid.c:75
UINT op
Definition: effect.c:223

Referenced by wined3d_device_set_vertex_declaration().

◆ wined3d_cs_emit_set_viewport()

void wined3d_cs_emit_set_viewport ( struct wined3d_cs cs,
const struct wined3d_viewport viewport 
)

Definition at line 969 of file cs.c.

970 {
971  struct wined3d_cs_set_viewport *op;
972 
973  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
974  op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
975  op->viewport = *viewport;
976 
977  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
978 }
uint32_t cs
Definition: isohybrid.c:75
struct wined3d_viewport viewport
Definition: cs.c:144
UINT op
Definition: effect.c:223

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

◆ wined3d_cs_emit_stop()

static void wined3d_cs_emit_stop ( struct wined3d_cs cs)
static

Definition at line 2449 of file cs.c.

2450 {
2451  struct wined3d_cs_stop *op;
2452 
2453  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
2454  op->opcode = WINED3D_CS_OP_STOP;
2455 
2456  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2457  cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT);
2458 }
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 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_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 2260 of file cs.c.

2263 {
2265 #if defined(STAGING_CSMT)
2266  size_t data_size, size;
2267 
2268  if (resource->type != WINED3D_RTYPE_BUFFER && resource->format_flags & WINED3DFMT_FLAG_BLOCKS)
2269  goto no_async;
2270 
2271  data_size = 0;
2272  switch (resource->type)
2273  {
2275  data_size += (box->back - box->front - 1) * slice_pitch;
2276  /* fall-through */
2278  data_size += (box->bottom - box->top - 1) * row_pitch;
2279  /* fall-through */
2281  data_size += (box->right - box->left) * resource->format->byte_count;
2282  break;
2283  case WINED3D_RTYPE_BUFFER:
2284  data_size = box->right - box->left;
2285  break;
2286  case WINED3D_RTYPE_NONE:
2287  return;
2288  }
2289 
2290  size = FIELD_OFFSET(struct wined3d_cs_update_sub_resource, copy_data[data_size]);
2291  if (!cs->ops->check_space(cs, size, WINED3D_CS_QUEUE_DEFAULT))
2292  goto no_async;
2293 
2294  op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
2296  op->resource = resource;
2297  op->sub_resource_idx = sub_resource_idx;
2298  op->box = *box;
2299  op->data.row_pitch = row_pitch;
2300  op->data.slice_pitch = slice_pitch;
2301  op->data.data = op->copy_data;
2302  memcpy(op->copy_data, data, data_size);
2303 
2305 
2306  cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
2307  return;
2308 
2309 no_async:
2311 #endif /* STAGING_CSMT */
2312 
2313  op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
2315  op->resource = resource;
2316  op->sub_resource_idx = sub_resource_idx;
2317  op->box = *box;
2318  op->data.row_pitch = row_pitch;
2319  op->data.slice_pitch = slice_pitch;
2320  op->data.data = data;
2321 
2323 
2324  cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP);
2325 #if !defined(STAGING_CSMT)
2326  /* The data pointer may go away, so we need to wait until it is read.
2327  * Copying the data may be faster if it's small. */
2328 #endif /* STAGING_CSMT */
2329  cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP);
2330 }
#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:407
unsigned int sub_resource_idx
Definition: cs.c:406
size_t size
Definition: cs.c:1781
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 2332 of file cs.c.

2333 {
2335  struct wined3d_texture *texture = op->texture;
2336  unsigned int sub_resource_idx, i;
2337  struct wined3d_context *context;
2338 
2339  context = context_acquire(cs->device, NULL, 0);
2340  sub_resource_idx = op->layer * texture->level_count;
2341  for (i = 0; i < texture->level_count; ++i, ++sub_resource_idx)
2342  {
2345  else
2346  ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
2347  }
2349 
2350  wined3d_resource_release(&texture->resource);
2351 }
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:6396
smooth NULL
Definition: ftsmooth.c:416
void context_release(struct wined3d_context *context)
Definition: context.c:1571
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:4242
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:159
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
Definition: texture.c:229
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 2052 of file cs.c.

2053 {
2054  const struct wined3d_cs_blt_sub_resource *op = data;
2055 
2056  if (op->dst_resource->type == WINED3D_RTYPE_BUFFER)
2057  {
2058  wined3d_buffer_copy(buffer_from_resource(op->dst_resource), op->dst_box.left,
2059  buffer_from_resource(op->src_resource), op->src_box.left,
2060  op->src_box.right - op->src_box.left);
2061  }
2062  else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_2D)
2063  {
2064  struct wined3d_surface *dst_surface, *src_surface;
2065  struct wined3d_texture *dst_texture, *src_texture;
2066  RECT dst_rect, src_rect;
2067 
2068  dst_texture = texture_from_resource(op->dst_resource);
2069  src_texture = texture_from_resource(op->src_resource);
2070  dst_surface = dst_texture->sub_resources[op->dst_sub_resource_idx].u.surface;
2071  src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface;
2072  SetRect(&dst_rect, op->dst_box.left, op->dst_box.top, op->dst_box.right, op->dst_box.bottom);
2073  SetRect(&src_rect, op->src_box.left, op->src_box.top, op->src_box.right, op->src_box.bottom);
2074 
2075  if (FAILED(wined3d_surface_blt(dst_surface, &dst_rect, src_surface,
2076  &src_rect, op->flags, &op->fx, op->filter)))
2077  FIXME("Blit failed.\n");
2078  }
2079  else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_3D)
2080  {
2081  struct wined3d_texture *src_texture, *dst_texture;
2082  unsigned int level, update_w, update_h, update_d;
2083  unsigned int row_pitch, slice_pitch;
2084  struct wined3d_context *context;
2085  struct wined3d_bo_address addr;
2086 
2087  if (op->flags & ~WINED3D_BLT_RAW)
2088  {
2089  FIXME("Flags %#x not implemented for %s resources.\n",
2090  op->flags, debug_d3dresourcetype(op->dst_resource->type));
2091  goto error;
2092  }
2093 
2094  if (!(op->flags & WINED3D_BLT_RAW) && op->src_resource->format != op->dst_resource->format)
2095  {
2096  FIXME("Format conversion not implemented for %s resources.\n",
2097  debug_d3dresourcetype(op->dst_resource->type));
2098  goto error;
2099  }
2100 
2101  update_w = op->dst_box.right - op->dst_box.left;
2102  update_h = op->dst_box.bottom - op->dst_box.top;
2103  update_d = op->dst_box.back - op->dst_box.front;
2104  if (op->src_box.right - op->src_box.left != update_w
2105  || op->src_box.bottom - op->src_box.top != update_h
2106  || op->src_box.back - op->src_box.front != update_d)
2107  {
2108  FIXME("Stretching not implemented for %s resources.\n",
2109  debug_d3dresourcetype(op->dst_resource->type));
2110  goto error;
2111  }
2112 
2113  if (op->src_box.left || op->src_box.top || op->src_box.front)
2114  {
2115  FIXME("Source box %s not supported for %s resources.\n",
2116  debug_box(&op->src_box), debug_d3dresourcetype(op->dst_resource->type));
2117  goto error;
2118  }
2119 
2120  dst_texture = texture_from_resource(op->dst_resource);
2121  src_texture = texture_from_resource(op->src_resource);
2122 
2123  context = context_acquire(cs->device, NULL, 0);
2124 
2125  if (!wined3d_texture_load_location(src_texture, op->src_sub_resource_idx,
2126  context, src_texture->resource.map_binding))
2127  {
2128  ERR("Failed to load source sub-resource into %s.\n",
2129  wined3d_debug_location(src_texture->resource.map_binding));
2131  goto error;
2132  }
2133 
2134  level = op->dst_sub_resource_idx % dst_texture->level_count;
2135  if (update_w == wined3d_texture_get_level_width(dst_texture, level)
2136  && update_h == wined3d_texture_get_level_height(dst_texture, level)
2137  && update_d == wined3d_texture_get_level_depth(dst_texture, level))
2138  {
2140  }
2141  else if (!wined3d_texture_load_location(dst_texture, op->dst_sub_resource_idx,
2143  {
2144  ERR("Failed to load destination sub-resource.\n");
2146  goto error;
2147  }
2148 
2149  wined3d_texture_get_memory(src_texture, op->src_sub_resource_idx, &addr, src_texture->resource.map_binding);
2150  wined3d_texture_get_pitch(src_texture, op->src_sub_resource_idx % src_texture->level_count,
2151  &row_pitch, &slice_pitch);
2152 
2154  wined3d_texture_upload_data(dst_texture, op->dst_sub_resource_idx, context, &op->dst_box,
2155  wined3d_const_bo_address(&addr), row_pitch, slice_pitch);
2156  wined3d_texture_validate_location(dst_texture, op->dst_sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB);
2157  wined3d_texture_invalidate_location(dst_texture, op->dst_sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB);
2158 
2160  }
2161  else
2162  {
2163  FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(op->dst_resource->type));
2164  }
2165 
2166 error:
2167  if (op->src_resource)
2168  wined3d_resource_release(op->src_resource);
2169  wined3d_resource_release(op->dst_resource);
2170 }
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:1546
static unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture, unsigned int level)
const char * debug_box(const struct wined3d_box *box)
Definition: utils.c:3939
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:6396
HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: surface.c:3998
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_bo_address *data, DWORD locations)
Definition: texture.c:285
void context_release(struct wined3d_context *context)
Definition: context.c:1571
void wined3d_texture_validate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
Definition: texture.c:135
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)
struct wined3d_texture::wined3d_texture_sub_resource sub_resources[1]
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:4242
static void wined3d_resource_release(struct wined3d_resource *resource)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
Definition: texture.c:159
#define WINED3D_LOCATION_TEXTURE_RGB
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
Definition: texture.c:229
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
Definition: utils.c:4329
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:868
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:1195
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:1168
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_context *context, const struct wined3d_box *box, const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch)
Definition: texture.c:1696

◆ wined3d_cs_exec_callback()

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

Definition at line 1866 of file cs.c.

1867 {
1868  const struct wined3d_cs_callback *op = data;
1869 
1870  op->callback(op->object);
1871 }
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 514 of file cs.c.

515 {
516  const struct wined3d_cs_clear *op = data;
517  struct wined3d_device *device;
518  unsigned int i;
519 
520  device = cs->device;
521  device->blitter->ops->blitter_clear(device->blitter, device, op->rt_count, op->fb,
522  op->rect_count, op->rects, &op->draw_rect, op->flags, &op->color, op->depth, op->stencil);
523 
524  if (op->flags & WINED3DCLEAR_TARGET)
525  {
526  for (i = 0; i < op->rt_count; ++i)
527  {
528  if (op->fb->render_targets[i])
529  wined3d_resource_release(op->fb->render_targets[i]->resource);
530  }
531  }
533  wined3d_resource_release(op->fb->depth_stencil->resource);
534 }
#define WINED3DCLEAR_STENCIL
Definition: wined3d.h:999
#define WINED3DCLEAR_ZBUFFER
Definition: wined3d.h:998
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:997
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 2368 of file cs.c.

2369 {
2371  struct wined3d_unordered_access_view *view = op->view;
2372  struct wined3d_context *context;
2373 
2374  context = context_acquire(cs->device, NULL, 0);
2377 
2378  wined3d_resource_release(view->resource);
2379 }
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:1571
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:1004
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:4242
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 2396 of file cs.c.

2397 {
2398  const struct wined3d_cs_copy_uav_counter *op = data;
2399  struct wined3d_unordered_access_view *view = op->view;
2400  struct wined3d_context *context;
2401 
2402  context = context_acquire(cs->device, NULL, 0);
2405 
2406  wined3d_resource_release(&op->buffer->resource);
2407  wined3d_resource_release(view->resource);
2408 }
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:1063
uint32_t cs
Definition: isohybrid.c:75
smooth NULL
Definition: ftsmooth.c:416
void context_release(struct wined3d_context *context)
Definition: context.c:1571
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:4242
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 716 of file cs.c.

717 {
718  const struct wined3d_cs_dispatch *op = data;
719  struct wined3d_state *state = &cs->state;
720 
721  dispatch_compute(cs->device, state, &op->parameters);
722 
723  if (op->parameters.indirect)
724  wined3d_resource_release(&op->parameters.u.indirect.buffer->resource);
725 
728  state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
729 }
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:4327
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:643
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:696
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 774 of file cs.c.

775 {
776  const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
777  struct wined3d_state *state = &cs->state;
778  const struct wined3d_cs_draw *op = data;
779  int load_base_vertex_idx;
780  unsigned int i;
781 
782  /* ARB_draw_indirect always supports a base vertex offset. */
783  if (!op->parameters.indirect && !gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
784  load_base_vertex_idx = op->parameters.u.direct.base_vertex_idx;
785  else
786  load_base_vertex_idx = 0;
787 
788  if (state->load_base_vertex_index != load_base_vertex_idx)
789  {
790  state->load_base_vertex_index = load_base_vertex_idx;
792  }
793 
794  if (state->gl_primitive_type != op->primitive_type)
795  {
796  if (state->gl_primitive_type == GL_POINTS || op->primitive_type == GL_POINTS)
798  state->gl_primitive_type = op->primitive_type;
799  }
800  state->gl_patch_vertices = op->patch_vertex_count;
801 
802  draw_primitive(cs->device, state, &op->parameters);
803 
804  if (op->parameters.indirect)
805  {
806  struct wined3d_buffer *buffer = op->parameters.u.indirect.buffer;
807  wined3d_resource_release(&buffer->resource);
808  }
809 
810  if (op->parameters.indexed)
811  wined3d_resource_release(&state->index_buffer->resource);
812  for (i = 0; i < ARRAY_SIZE(state->streams); ++i)
813  {
814  if (state->streams[i].buffer)
815  wined3d_resource_release(&state->streams[i].buffer->resource);
816  }
817  for (i = 0; i < ARRAY_SIZE(state->stream_output); ++i)
818  {
819  if (state->stream_output[i].buffer)
820  wined3d_resource_release(&state->stream_output[i].buffer->resource);
821  }
822  for (i = 0; i < ARRAY_SIZE(state->textures); ++i)
823  {
824  if (state->textures[i])
825  wined3d_resource_release(&state->textures[i]->resource);
826  }
827  for (i = 0; i < gl_info->limits.buffers; ++i)
828  {
829  if (state->fb->render_targets[i])
830  wined3d_resource_release(state->fb->render_targets[i]->resource);
831  }
832  if (state->fb->depth_stencil)
833  wined3d_resource_release(state->fb->depth_stencil->resource);
836  state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
837 }
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
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:643
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:5263
static void release_unordered_access_resources(const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
Definition: cs.c:696
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:4924
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 920 of file cs.c.

921 {
922  struct wined3d_context *context;
923 
924  context = context_acquire(cs->device, NULL, 0);
925  if (context->valid)
926  context->gl_info->gl_ops.gl.p_glFlush();
928 }
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:1571
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:4242

◆ wined3d_cs_exec_generate_mipmaps()

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

Definition at line 2427 of file cs.c.

2428 {
2429  const struct wined3d_cs_generate_mipmaps *op = data;
2430  struct wined3d_shader_resource_view *view = op->view;
2431 
2433  wined3d_resource_release(view->resource);
2434 }
void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view *view)
Definition: view.c:851
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 1991 of file cs.c.

1992 {
1993  const struct wined3d_cs_map *op = data;
1994  struct wined3d_resource *resource = op->resource;
1995 
1996  *op->hr = resource->resource_ops->resource_sub_resource_map(resource,
1997  op->sub_resource_idx, op->map_desc, op->box, op->flags);
1998 }
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 1947 of file cs.c.

1948 {
1949  const struct wined3d_cs_preload_resource *op = data;
1950  struct wined3d_resource *resource = op->resource;
1951 
1952  resource->resource_ops->resource_preload(resource);
1954 }
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 
460  if (op->swap_interval && swapchain->desc.swap_interval != op->swap_interval)
461  {
462  swapchain->desc.swap_interval = op->swap_interval;
464  }
465 
466  swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags);
467 
468  wined3d_resource_release(&swapchain->front_buffer->resource);
469  for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
470  {
471  wined3d_resource_release(&swapchain->back_buffers[i]->resource);
472  }
473 
474  InterlockedDecrement(&cs->pending_presents);
475 }
struct wined3d_texture * front_buffer
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)
void swapchain_update_swap_interval(struct wined3d_swapchain *swapchain)
Definition: swapchain.c:1144
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 1821 of file cs.c.

1822 {
1823  const struct wined3d_cs_push_constants *op = data;
1824 
1825  wined3d_cs_st_push_constants(cs, op->type, op->start_idx, op->count, op->constants);
1826 }
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:1800

◆ wined3d_cs_exec_query_issue()

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

Definition at line 1895 of file cs.c.

1896 {
1897  const struct wined3d_cs_query_issue *op = data;
1898  struct wined3d_query *query = op->query;
1899  BOOL poll;
1900 
1901  poll = query->query_ops->query_issue(query, op->flags);
1902 
1903  if (!cs->thread)
1904  return;
1905 
1906  if (poll && list_empty(&query->poll_list_entry))
1907  {
1908  list_add_tail(&cs->query_poll_list, &query->poll_list_entry);
1909  return;
1910  }
1911 
1912  /* This can happen if occlusion queries are restarted. This discards the
1913  * old result, since polling it could result in a GL error. */
1914  if ((op->flags & WINED3DISSUE_BEGIN) && !poll && !list_empty(&query->poll_list_entry))
1915  {
1916  list_remove(&query->poll_list_entry);
1917  list_init(&query->poll_list_entry);
1918  InterlockedIncrement(&query->counter_retrieved);
1919  return;
1920  }
1921 
1922  /* This can happen when an occlusion query is ended without being started,
1923  * in which case we don't want to poll, but still have to counter-balance
1924  * the increment of the main counter.
1925  *
1926  * This can also happen if an event query is re-issued before the first
1927  * fence was reached. In this case the query is already in the list and
1928  * the poll function will check the new fence. We have to counter-balance
1929  * the discarded increment. */
1930  if (op->flags & WINED3DISSUE_END)
1931  InterlockedIncrement(&query->counter_retrieved);
1932 }
__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:761
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:762
__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 1846 of file cs.c.

1847 {
1848  struct wined3d_adapter *adapter = cs->device->adapter;
1849 
1850  state_cleanup(&cs->state);
1851  memset(&cs->state, 0, sizeof(cs->state));
1852  state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info,
1854 }
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:528
#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 1449 of file cs.c.

1450 {
1451  const struct wined3d_cs_set_blend_state *op = data;
1452 
1453  cs->state.blend_state = op->state;
1455 }
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:5263
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 1574 of file cs.c.

1575 {
1576  const struct wined3d_cs_set_clip_plane *op = data;
1577 
1578  cs->state.clip_planes[op->plane_idx] = op->plane;
1579  device_invalidate_state(cs->device, STATE_CLIPPLANE(op->plane_idx));
1580 }
#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:5263
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 1594 of file cs.c.

1595 {
1596  const struct wined3d_cs_set_color_key *op = data;
1597  struct wined3d_texture *texture = op->texture;
1598 
1599  if (op->set)
1600  {
1601  switch (op->flags)
1602  {
1603  case WINED3D_CKEY_DST_BLT:
1604  texture->async.dst_blt_color_key = op->color_key;
1605  texture->async.color_key_flags |= WINED3D_CKEY_DST_BLT;
1606  break;
1607 
1609  texture->async.dst_overlay_color_key = op->color_key;
1610  texture->async.color_key_flags |= WINED3D_CKEY_DST_OVERLAY;
1611  break;
1612 
1613  case WINED3D_CKEY_SRC_BLT:
1614  if (texture == cs->state.textures[0])
1615  {
1617  if (!(texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT))
1619  }
1620 
1621  texture->async.src_blt_color_key = op->color_key;
1622  texture->async.color_key_flags |= WINED3D_CKEY_SRC_BLT;
1623  break;
1624 
1626  texture->async.src_overlay_color_key = op->color_key;
1627  texture->async.color_key_flags |= WINED3D_CKEY_SRC_OVERLAY;
1628  break;
1629  }
1630  }
1631  else
1632  {
1633  switch (op->flags)
1634  {
1635  case WINED3D_CKEY_DST_BLT:
1636  texture->async.color_key_flags &= ~WINED3D_CKEY_DST_BLT;
1637  break;
1638 
1640  texture->async.color_key_flags &= ~WINED3D_CKEY_DST_OVERLAY;
1641  break;
1642 
1643  case WINED3D_CKEY_SRC_BLT:
1644  if (texture == cs->state.textures[0] && texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT)
1646 
1647  texture->async.color_key_flags &= ~WINED3D_CKEY_SRC_BLT;
1648  break;
1649 
1651  texture->async.color_key_flags &= ~WINED3D_CKEY_SRC_OVERLAY;
1652  break;
1653  }
1654  }
1655 }
#define WINED3D_CKEY_DST_OVERLAY
Definition: wined3d.h:1335
#define WINED3D_CKEY_SRC_BLT
Definition: wined3d.h:1336
#define STATE_COLOR_KEY
uint32_t cs
Definition: isohybrid.c:75
#define WINED3D_CKEY_SRC_OVERLAY
Definition: wined3d.h:1337
GLenum GLuint texture
Definition: glext.h:6295
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define STATE_RENDER(a)
void device_invalidate_state(const struct wined3d_device *device, DWORD state)
Definition: device.c:5263
UINT op
Definition: effect.c:223
#define WINED3D_CKEY_DST_BLT
Definition: wined3d.h:1334

◆ wined3d_cs_exec_set_constant_buffer()

static void wined3d_cs_exec_set_constant_buffer ( struct wined3d_cs