intel/compiler: Stop including src/mesa/main/config.h
src/mesa/main includes are for Mesa's OpenGL implementation, and the compiler is used in Vulkan drivers and other tools. We really only needed one #define, which is that we offer 32 samplers. It probably makes more sense to have our own defined limit for that rather than importing a project-wide value which theoretically could be adjusted, so swap MAX_SAMPLERS for a new BRW_MAX_SAMPLERS and call it a day. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309>
This commit is contained in:

committed by
Marge Bot

parent
434bc468fe
commit
a141a351de
@@ -27,7 +27,6 @@
|
||||
#include <stdio.h>
|
||||
#include "c11/threads.h"
|
||||
#include "dev/intel_device_info.h"
|
||||
#include "main/config.h"
|
||||
#include "util/ralloc.h"
|
||||
#include "util/u_math.h"
|
||||
|
||||
@@ -177,6 +176,8 @@ enum PACKED gfx6_gather_sampler_wa {
|
||||
WA_16BIT = 4, /* if we have a 16bit format needing wa */
|
||||
};
|
||||
|
||||
#define BRW_MAX_SAMPLERS 32
|
||||
|
||||
/**
|
||||
* Sampler information needed by VS, WM, and GS program cache keys.
|
||||
*/
|
||||
@@ -184,7 +185,7 @@ struct brw_sampler_prog_key_data {
|
||||
/**
|
||||
* EXT_texture_swizzle and DEPTH_TEXTURE_MODE swizzles.
|
||||
*/
|
||||
uint16_t swizzles[MAX_SAMPLERS];
|
||||
uint16_t swizzles[BRW_MAX_SAMPLERS];
|
||||
|
||||
uint32_t gl_clamp_mask[3];
|
||||
|
||||
@@ -208,7 +209,7 @@ struct brw_sampler_prog_key_data {
|
||||
/**
|
||||
* For Sandybridge, which shader w/a we need for gather quirks.
|
||||
*/
|
||||
enum gfx6_gather_sampler_wa gfx6_gather_wa[MAX_SAMPLERS];
|
||||
enum gfx6_gather_sampler_wa gfx6_gather_wa[BRW_MAX_SAMPLERS];
|
||||
|
||||
/**
|
||||
* Texture units that have a YUV image bound.
|
||||
@@ -223,7 +224,7 @@ struct brw_sampler_prog_key_data {
|
||||
uint32_t bt2020_mask;
|
||||
|
||||
/* Scale factor for each texture. */
|
||||
float scale_factors[32];
|
||||
float scale_factors[BRW_MAX_SAMPLERS];
|
||||
};
|
||||
|
||||
/** An enum representing what kind of input gl_SubgroupSize is. */
|
||||
|
@@ -73,7 +73,7 @@ debug_sampler_recompile(const struct brw_compiler *c, void *log,
|
||||
found |= check("ayuv image bound", ayuv_image_mask);
|
||||
found |= check("xyuv image bound", xyuv_image_mask);
|
||||
|
||||
for (unsigned i = 0; i < MAX_SAMPLERS; i++) {
|
||||
for (unsigned i = 0; i < BRW_MAX_SAMPLERS; i++) {
|
||||
found |= check("EXT_texture_swizzle or DEPTH_TEXTURE_MODE", swizzles[i]);
|
||||
found |= check("textureGather workarounds", gfx6_gather_wa[i]);
|
||||
found |= check_float("scale factor", scale_factors[i]);
|
||||
|
Reference in New Issue
Block a user