d3d12: Clean up d3d12_compiler.h

Move some stuff from d3d12_context.h to d3d12_compiler.h, and
fix d3d12_compiler.h to not include d3d12_context.h.

This serves two purposes:
1. Putting declarations and definitions where they really belong.
2. Making it so only C++ code needs d3d12.h simplifies the helpers
   we need to add to add to support d3d12.h for Linux.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
This commit is contained in:
Jesse Natalie 2020-11-25 17:07:05 -08:00 committed by Marge Bot
parent 244a41d6a8
commit 80dcd63f64
2 changed files with 12 additions and 10 deletions

View File

@ -24,7 +24,7 @@
#ifndef D3D12_COMPILER_H
#define D3D12_COMPILER_H
#include "d3d12_context.h"
#include "dxil_nir_lower_int_samplers.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
@ -40,6 +40,16 @@ struct pipe_screen;
extern "C" {
#endif
enum d3d12_state_var {
D3D12_STATE_VAR_Y_FLIP = 0,
D3D12_STATE_VAR_PT_SPRITE,
D3D12_STATE_VAR_FIRST_VERTEX,
D3D12_STATE_VAR_DEPTH_TRANSFORM,
D3D12_MAX_STATE_VARS
};
#define D3D12_MAX_POINT_SIZE 255.0f
struct d3d12_validation_tools *d3d12_validator_create();
void d3d12_validator_destroy(struct d3d12_validation_tools *validator);
@ -169,6 +179,7 @@ struct d3d12_shader_selector {
struct d3d12_gs_variant_key gs_key;
};
struct d3d12_context;
struct d3d12_shader_selector *
d3d12_create_shader(struct d3d12_context *ctx,

View File

@ -40,7 +40,6 @@
#include <d3d12.h>
#define D3D12_GFX_SHADER_STAGES (PIPE_SHADER_TYPES - 1)
#define D3D12_MAX_POINT_SIZE 255.0f
enum d3d12_dirty_flags
{
@ -88,14 +87,6 @@ enum d3d12_binding_type {
D3D12_NUM_BINDING_TYPES
};
enum d3d12_state_var {
D3D12_STATE_VAR_Y_FLIP = 0,
D3D12_STATE_VAR_PT_SPRITE,
D3D12_STATE_VAR_FIRST_VERTEX,
D3D12_STATE_VAR_DEPTH_TRANSFORM,
D3D12_MAX_STATE_VARS
};
enum resource_dimension
{
RESOURCE_DIMENSION_UNKNOWN = 0,