Home | History | Annotate | Download | only in vmwgfx

Lines Matching defs:shader

49 	struct vmw_shader shader;
134 * Shader management:
174 struct vmw_shader *shader = vmw_res_to_shader(res);
193 shader->size = size;
194 shader->type = type;
195 shader->num_input_sig = num_input_sig;
196 shader->num_output_sig = num_output_sig;
203 * GB shader code:
209 struct vmw_shader *shader = vmw_res_to_shader(res);
221 DRM_ERROR("Failed to allocate a shader id.\n");
239 cmd->body.type = shader->type;
240 cmd->body.sizeInBytes = shader->size;
350 * DX shader code:
354 * vmw_dx_shader_commit_notify - Notify that a shader operation has been
357 * @res: Pointer to the shader resource.
364 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res);
369 vmw_cotable_add_resource(shader->cotable,
370 &shader->cotable_head);
371 shader->committed = true;
372 res->id = shader->id;
376 list_del_init(&shader->cotable_head);
377 shader->committed = false;
384 * vmw_dx_shader_unscrub - Have the device reattach a MOB to a DX shader.
386 * @res: The shader resource
392 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res);
399 if (!list_empty(&shader->cotable_head) || !shader->committed)
402 cmd = VMW_FIFO_RESERVE_DX(dev_priv, sizeof(*cmd), shader->ctx->id);
408 cmd->body.cid = shader->ctx->id;
409 cmd->body.shid = shader->id;
414 vmw_cotable_add_resource(shader->cotable, &shader->cotable_head);
420 * vmw_dx_shader_create - The DX shader create callback
422 * @res: The DX shader resource
425 * makes sure that we unscrub the shader if it's previously been scrubbed.
430 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res);
433 WARN_ON_ONCE(!shader->committed);
441 res->id = shader->id;
446 * vmw_dx_shader_bind - The DX shader bind callback
448 * @res: The DX shader resource
467 * vmw_dx_shader_scrub - Have the device unbind a MOB from a DX shader.
469 * @res: The shader resource
471 * This function unbinds a MOB from the DX shader without requiring the
478 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res);
485 if (list_empty(&shader->cotable_head))
488 WARN_ON_ONCE(!shader->committed);
495 cmd->body.cid = shader->ctx->id;
501 list_del_init(&shader->cotable_head);
507 * vmw_dx_shader_unbind - The dx shader unbind callback.
509 * @res: The shader resource
548 * Scrubs all shader MOBs so that any subsequent shader unbind or shader
567 * vmw_dx_shader_res_free - The DX shader free callback
569 * @res: The shader resource
571 * Frees the DX shader resource and updates memory accounting.
576 struct vmw_dx_shader *shader = vmw_res_to_dx_shader(res);
578 vmw_resource_unreference(&shader->cotable);
579 kfree(shader);
584 * vmw_dx_shader_add - Add a shader resource as a command buffer managed
589 * @user_key: The id used for this shader.
590 * @shader_type: The shader type.
599 struct vmw_dx_shader *shader;
609 vmw_shader_dx_size = ttm_round_pot(sizeof(*shader));
618 DRM_ERROR("Out of graphics memory for shader "
623 shader = kmalloc(sizeof(*shader), GFP_KERNEL);
624 if (!shader) {
629 res = &shader->res;
630 shader->ctx = ctx;
631 shader->cotable = vmw_resource_reference
633 shader->id = user_key;
634 shader->committed = false;
635 INIT_LIST_HEAD(&shader->cotable_head);
642 * The user_key name-space is not per shader type for DX shaders,
643 * so when hashing, use a single zero shader type.
651 res->id = shader->id;
663 * User-space shader management:
670 shader.res);
676 container_of(res, struct vmw_user_shader, shader.res);
686 struct vmw_shader *shader = vmw_res_to_shader(res);
689 kfree(shader);
746 DRM_ERROR("Out of graphics memory for shader "
759 res = &ushader->shader.res;
799 struct vmw_shader *shader;
817 DRM_ERROR("Out of graphics memory for shader "
822 shader = kzalloc(sizeof(*shader), GFP_KERNEL);
823 if (unlikely(!shader)) {
830 res = &shader->res;
860 VMW_DEBUG_USER("Couldn't find buffer for shader creation.\n");
866 VMW_DEBUG_USER("Illegal buffer- or shader size.\n");
880 VMW_DEBUG_USER("Illegal shader type.\n");
900 * vmw_shader_id_ok - Check whether a compat shader user key and
901 * shader type are within valid bounds.
903 * @user_key: User space id of the shader.
904 * @shader_type: Shader type.
914 * vmw_shader_key - Compute a hash key suitable for a compat shader.
916 * @user_key: User space id of the shader.
917 * @shader_type: Shader type.
928 * vmw_shader_remove - Stage a compat shader for removal.
930 * @man: Pointer to the compat shader manager identifying the shader namespace.
931 * @user_key: The key that is used to identify the shader. The key is
932 * unique to the shader type.
933 * @shader_type: Shader type.
951 * vmw_compat_shader_add - Create a compat shader and stage it for addition
954 * @man: Pointer to the compat shader manager identifying the shader namespace.
955 * @user_key: The key that is used to identify the shader. The key is
956 * unique to the shader type.
957 * @bytecode: Pointer to the bytecode of the shader.
958 * @shader_type: Shader type.
959 * @tfile: Pointer to a struct ttm_object_file that the guest-backed shader is
995 /* Map and copy shader bytecode. */
1026 * vmw_shader_lookup - Look up a compat shader
1029 * the shader namespace.
1030 * @user_key: The user space id of the shader.
1031 * @shader_type: The shader type.
1033 * Returns a refcounted pointer to a struct vmw_resource if the shader was