d3d12: Remove Windows-specific macros

These all have trivial standard or Mesa replacements

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:05:29 -08:00
committed by Marge Bot
parent 4358af87e7
commit 244a41d6a8
7 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ allocate_function_from_predefined(struct dxil_module *mod,
const char *name,
enum overload_type overload)
{
for (unsigned i = 0; i < ARRAYSIZE(predefined_funcs); ++i) {
for (unsigned i = 0; i < ARRAY_SIZE(predefined_funcs); ++i) {
if (!strcmp(predefined_funcs[i].base_name, name)) {
return dxil_alloc_func(mod, name, overload,
predefined_funcs[i].retval_descr,
+6 -5
View File
@@ -30,6 +30,7 @@
#include "util/rb_tree.h"
#include <assert.h>
#include <stdio.h>
void
dxil_module_init(struct dxil_module *m, void *ralloc_ctx)
@@ -811,11 +812,11 @@ dxil_module_get_res_type(struct dxil_module *m, enum dxil_resource_kind kind,
const struct dxil_type *component_type = dxil_module_get_type_from_comp_type(m, comp_type);
const struct dxil_type *vec_type = dxil_module_get_vector_type(m, component_type, 4);
char class_name[64] = { 0 };
sprintf_s(class_name, 64, "class.%s%s<vector<%s, 4>%s>",
readwrite ? "RW" : "",
get_res_dimension_type_name(kind),
get_res_comp_type_name(comp_type),
get_res_ms_postfix(kind));
snprintf(class_name, 64, "class.%s%s<vector<%s, 4>%s>",
readwrite ? "RW" : "",
get_res_dimension_type_name(kind),
get_res_comp_type_name(comp_type),
get_res_ms_postfix(kind));
return dxil_module_get_struct_type(m, class_name, &vec_type, 1);
}
+1 -1
View File
@@ -4019,7 +4019,7 @@ emit_module(struct ntd_context *ctx, nir_shader *s, const struct nir_to_dxil_opt
}
if (ctx->mod.feats.native_low_precision)
ctx->mod.minor_version = max(ctx->mod.minor_version, 2);
ctx->mod.minor_version = MAX2(ctx->mod.minor_version, 2);
return emit_metadata(ctx, s) &&
dxil_emit_module(&ctx->mod);
@@ -256,7 +256,7 @@ void ResourceStateManager::ProcessTransitioningResource(ID3D12Resource* pTransit
bool bAllSubresourcesAtOnce = CurrentState.AreAllSubresourcesSame() && DestinationState.AreAllSubresourcesSame();
D3D12_RESOURCE_BARRIER TransitionDesc;
ZeroMemory(&TransitionDesc, sizeof(TransitionDesc));
memset(&TransitionDesc, 0, sizeof(TransitionDesc));
TransitionDesc.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
TransitionDesc.Transition.pResource = pTransitioningResource;